Class CfnSession

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ISessionRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:04.455Z") @Stability(Stable) public class CfnSession extends CfnResource implements IInspectable, ISessionRef, ITaggableV2
Definition of AWS::Bedrock::Session Resource Type.

Example:

 // 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.*;
 CfnSession cfnSession = CfnSession.Builder.create(this, "MyCfnSession")
         .encryptionKeyArn("encryptionKeyArn")
         .sessionMetadata(Map.of(
                 "sessionMetadataKey", "sessionMetadata"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnSession

      protected CfnSession(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnSession

      protected CfnSession(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnSession

      @Stability(Stable) public CfnSession(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnSessionProps props)
      Create a new AWS::Bedrock::Session.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnSession

      @Stability(Stable) public CfnSession(@NotNull software.constructs.Construct scope, @NotNull String id)
      Create a new AWS::Bedrock::Session.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • arnForSession

      @Stability(Stable) @NotNull public static String arnForSession(@NotNull ISessionRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnSession

      @Stability(Stable) @NotNull public static Boolean isCfnSession(@NotNull Object x)
      Checks whether the given object is a CfnSession.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp for when the session was created.
    • getAttrLastUpdatedAt

      @Stability(Stable) @NotNull public String getAttrLastUpdatedAt()
      The timestamp for when the session was last modified.
    • getAttrSessionArn

      @Stability(Stable) @NotNull public String getAttrSessionArn()
      The Amazon Resource Name (ARN) of the session.
    • getAttrSessionId

      @Stability(Stable) @NotNull public String getAttrSessionId()
      The unique identifier of the session in UUID format.
    • getAttrSessionStatus

      @Stability(Stable) @NotNull public String getAttrSessionStatus()
      The current status of the session.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getSessionRef

      @Stability(Stable) @NotNull public SessionReference getSessionRef()
      A reference to a Session resource.
      Specified by:
      getSessionRef in interface ISessionRef
    • getEncryptionKeyArn

      @Stability(Stable) @Nullable public String getEncryptionKeyArn()
      The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data.
    • setEncryptionKeyArn

      @Stability(Stable) public void setEncryptionKeyArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data.
    • getSessionMetadata

      @Stability(Stable) @Nullable public Object getSessionMetadata()
      A map of key-value pairs containing attributes to be persisted across the session.

      Returns union: either IResolvable or Mapinvalid input: '<'String, String>

    • setSessionMetadata

      @Stability(Stable) public void setSessionMetadata(@Nullable IResolvable value)
      A map of key-value pairs containing attributes to be persisted across the session.
    • setSessionMetadata

      @Stability(Stable) public void setSessionMetadata(@Nullable Map<String,String> value)
      A map of key-value pairs containing attributes to be persisted across the session.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A list of tags associated with the session.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A list of tags associated with the session.