# NamespaceKeyValidationProperty

Validation rules for namespace variable values.

Multiple rules can be specified and all must pass.

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const namespaceKeyValidationProperty: bedrockagentcore.CfnMemory.NamespaceKeyValidationProperty = {
  allowedValues: ['allowedValues'],
  regexPattern: 'regexPattern',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrockagentcore as bedrockagentcore

namespace_key_validation_property = bedrockagentcore.CfnMemory.NamespaceKeyValidationProperty(
    allowed_values=["allowedValues"],
    regex_pattern="regexPattern"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrockagentcore.*;

NamespaceKeyValidationProperty namespaceKeyValidationProperty = NamespaceKeyValidationProperty.builder()
        .allowedValues(List.of("allowedValues"))
        .regexPattern("regexPattern")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.BedrockAgentCore;

var namespaceKeyValidationProperty = new NamespaceKeyValidationProperty {
    AllowedValues = new [] { "allowedValues" },
    RegexPattern = "regexPattern"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

namespaceKeyValidationProperty := &NamespaceKeyValidationProperty{
	AllowedValues: []*string{
		jsii.String("allowedValues"),
	},
	RegexPattern: jsii.String("regexPattern"),
}
```

## Properties

- `allowedValues`: string[] — List of allowed values for this namespace variable.

- `regexPattern`: string — A regex pattern that a namespace variable value must match.
