Class CfnSession

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

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:50:57.163Z") @Stability(Stable) public class CfnSession extends CfnResource implements IInspectable, ISessionRef
An Athena session is a Spark-based interactive environment for running calculations within a workgroup.

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.athena.*;
 CfnSession cfnSession = CfnSession.Builder.create(this, "MyCfnSession")
         .engineConfiguration(EngineConfigurationProperty.builder()
                 .maxConcurrentDpus(123)
                 // the properties below are optional
                 .additionalConfigs(Map.of(
                         "additionalConfigsKey", "additionalConfigs"))
                 .coordinatorDpuSize(123)
                 .defaultExecutorDpuSize(123)
                 .sparkProperties(Map.of(
                         "sparkPropertiesKey", "sparkProperties"))
                 .build())
         .workGroup("workGroup")
         // the properties below are optional
         .executionRole("executionRole")
         .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, @NotNull CfnSessionProps props)
      Create a new AWS::Athena::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. 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.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the session.
    • getAttrEngineConfigurationAdditionalConfigs

      @Stability(Stable) @NotNull public IResolvable getAttrEngineConfigurationAdditionalConfigs()
      Contains additional notebook engine parameter mappings.
    • getAttrEngineConfigurationSparkProperties

      @Stability(Stable) @NotNull public IResolvable getAttrEngineConfigurationSparkProperties()
      Specifies custom jar files and Spark properties.
    • getAttrEngineVersion

      @Stability(Stable) @NotNull public String getAttrEngineVersion()
      The engine version used by the session.
    • getAttrSessionId

      @Stability(Stable) @NotNull public String getAttrSessionId()
      The session ID.
    • 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
    • getEngineConfiguration

      @Stability(Stable) @NotNull public Object getEngineConfiguration()
      Contains engine data processing unit (DPU) configuration settings.

      Returns union: either IResolvable or CfnSession.EngineConfigurationProperty

    • setEngineConfiguration

      @Stability(Stable) public void setEngineConfiguration(@NotNull IResolvable value)
      Contains engine data processing unit (DPU) configuration settings.
    • setEngineConfiguration

      @Stability(Stable) public void setEngineConfiguration(@NotNull CfnSession.EngineConfigurationProperty value)
      Contains engine data processing unit (DPU) configuration settings.
    • getWorkGroup

      @Stability(Stable) @NotNull public String getWorkGroup()
      The workgroup to which the session belongs.
    • setWorkGroup

      @Stability(Stable) public void setWorkGroup(@NotNull String value)
      The workgroup to which the session belongs.
    • getExecutionRole

      @Stability(Stable) @Nullable public String getExecutionRole()
      The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups.
    • setExecutionRole

      @Stability(Stable) public void setExecutionRole(@Nullable String value)
      The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups.