# NamespaceKeyEntryProperty

A namespace variable key definition with optional validation rules.

- Source: Generated code
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

```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 namespaceKeyEntryProperty: bedrockagentcore.CfnMemory.NamespaceKeyEntryProperty = {
  key: 'key',

  // the properties below are optional
  validation: {
    allowedValues: ['allowedValues'],
    regexPattern: 'regexPattern',
  },
};
```

## Properties

- `key`: string (required) — A namespace variable key name.

  Must start with a lowercase letter and contain only lowercase alphanumeric characters. Cannot be a built-in variable (memoryStrategyId, sessionId, actorId).

- `validation`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.NamespaceKeyValidationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.NamespaceKeyValidationProperty.html) — Validation rules for namespace variable values.

  Multiple rules can be specified and all must pass.
