# CfnSessionProps

Properties for defining a `CfnSession`.

Used as props by: [CfnSession](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnSession.html)

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 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_bedrock as bedrock } from 'aws-cdk-lib';
const cfnSessionProps: bedrock.CfnSessionProps = {
  encryptionKeyArn: 'encryptionKeyArn',
  sessionMetadata: {
    sessionMetadataKey: 'sessionMetadata',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

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

cfn_session_props = bedrock.CfnSessionProps(
    encryption_key_arn="encryptionKeyArn",
    session_metadata={
        "session_metadata_key": "sessionMetadata"
    },
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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.bedrock.*;

CfnSessionProps cfnSessionProps = CfnSessionProps.builder()
        .encryptionKeyArn("encryptionKeyArn")
        .sessionMetadata(Map.of(
                "sessionMetadataKey", "sessionMetadata"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.Bedrock;

var cfnSessionProps = new CfnSessionProps {
    EncryptionKeyArn = "encryptionKeyArn",
    SessionMetadata = new Dictionary<string, string> {
        { "sessionMetadataKey", "sessionMetadata" }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnSessionProps := &CfnSessionProps{
	EncryptionKeyArn: jsii.String("encryptionKeyArn"),
	SessionMetadata: map[string]*string{
		"sessionMetadataKey": jsii.String("sessionMetadata"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `encryptionKeyArn`: string — The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data.

- `sessionMetadata`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — A map of key-value pairs containing attributes to be persisted across the session.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of tags associated with the session.
