Skip to content
v2.278.0

CfnSessionProps Struct ​

Properties for defining a CfnSession.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';
const cfnSessionProps: glue.CfnSessionProps = {
  command: {
    name: 'name',
    pythonVersion: 'pythonVersion',
  },
  id: 'id',
  role: 'role',

  // the properties below are optional
  connections: {
    connections: ['connections'],
  },
  defaultArguments: {
    defaultArgumentsKey: 'defaultArguments',
  },
  description: 'description',
  glueVersion: 'glueVersion',
  idleTimeout: 123,
  maxCapacity: 123,
  numberOfWorkers: 123,
  requestOrigin: 'requestOrigin',
  securityConfiguration: 'securityConfiguration',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  timeout: 123,
  workerType: 'workerType',
};
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_glue as glue

cfn_session_props = glue.CfnSessionProps(
    command=glue.CfnSession.SessionCommandProperty(
        name="name",
        python_version="pythonVersion"
    ),
    id="id",
    role="role",

    # the properties below are optional
    connections=glue.CfnSession.ConnectionsListProperty(
        connections=["connections"]
    ),
    default_arguments={
        "default_arguments_key": "defaultArguments"
    },
    description="description",
    glue_version="glueVersion",
    idle_timeout=123,
    max_capacity=123,
    number_of_workers=123,
    request_origin="requestOrigin",
    security_configuration="securityConfiguration",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    timeout=123,
    worker_type="workerType"
)
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.glue.*;

CfnSessionProps cfnSessionProps = CfnSessionProps.builder()
        .command(SessionCommandProperty.builder()
                .name("name")
                .pythonVersion("pythonVersion")
                .build())
        .id("id")
        .role("role")

        // the properties below are optional
        .connections(ConnectionsListProperty.builder()
                .connections(List.of("connections"))
                .build())
        .defaultArguments(Map.of(
                "defaultArgumentsKey", "defaultArguments"))
        .description("description")
        .glueVersion("glueVersion")
        .idleTimeout(123)
        .maxCapacity(123)
        .numberOfWorkers(123)
        .requestOrigin("requestOrigin")
        .securityConfiguration("securityConfiguration")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .timeout(123)
        .workerType("workerType")
        .build();
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.Glue;

var cfnSessionProps = new CfnSessionProps {
    Command = new SessionCommandProperty {
        Name = "name",
        PythonVersion = "pythonVersion"
    },
    Id = "id",
    Role = "role",

    // the properties below are optional
    Connections = new ConnectionsListProperty {
        Connections = new [] { "connections" }
    },
    DefaultArguments = new Dictionary<string, string> {
        { "defaultArgumentsKey", "defaultArguments" }
    },
    Description = "description",
    GlueVersion = "glueVersion",
    IdleTimeout = 123,
    MaxCapacity = 123,
    NumberOfWorkers = 123,
    RequestOrigin = "requestOrigin",
    SecurityConfiguration = "securityConfiguration",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    Timeout = 123,
    WorkerType = "workerType"
};
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{
	Command: &SessionCommandProperty{
		Name: jsii.String("name"),
		PythonVersion: jsii.String("pythonVersion"),
	},
	Id: jsii.String("id"),
	Role: jsii.String("role"),

	// the properties below are optional
	Connections: &ConnectionsListProperty{
		Connections: []*string{
			jsii.String("connections"),
		},
	},
	DefaultArguments: map[string]*string{
		"defaultArgumentsKey": jsii.String("defaultArguments"),
	},
	Description: jsii.String("description"),
	GlueVersion: jsii.String("glueVersion"),
	IdleTimeout: jsii.Number(123),
	MaxCapacity: jsii.Number(123),
	NumberOfWorkers: jsii.Number(123),
	RequestOrigin: jsii.String("requestOrigin"),
	SecurityConfiguration: jsii.String("securityConfiguration"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	Timeout: jsii.Number(123),
	WorkerType: jsii.String("workerType"),
}

Properties ​

commandIResolvable | CfnSession.SessionCommandPropertycommandtyping.Union[IResolvable, SessionCommandProperty]commandIResolvableCommandIResolvableCommandinterface{} required #
The SessionCommand that runs the job.
connectionsoptionalIResolvable | CfnSession.ConnectionsListPropertyconnectionsoptionaltyping.Union[IResolvable, ConnectionsListProperty]connectionsoptionalIResolvableConnectionsoptionalIResolvableConnectionsoptionalinterface{} #
Specifies the connections used by the session.
defaultArgumentsoptionalIResolvable | { [key: string]: string }default_argumentsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]defaultArgumentsoptionalIResolvableDefaultArgumentsoptionalIResolvableDefaultArgumentsoptionalinterface{} #
A map array of key-value pairs.

Max is 75 pairs.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description of the session.
glueVersionoptionalstringglue_versionoptionalstrglueVersionoptionalStringGlueVersionoptionalstringGlueVersionoptional*string #
The Glue version determines the versions of Apache Spark and Python that Glue supports.

The GlueVersion must be greater than 2.0.

idstringidstridStringIdstringId*string required #
The ID of the session.
idleTimeoutoptionalnumberidle_timeoutoptionalint | floatidleTimeoutoptionalNumberIdleTimeoutoptionaldoubleIdleTimeoutoptional*float64 #
The number of minutes when idle before session times out.

Default is the value of Timeout.

maxCapacityoptionalnumbermax_capacityoptionalint | floatmaxCapacityoptionalNumberMaxCapacityoptionaldoubleMaxCapacityoptional*float64 #
The number of Glue data processing units (DPUs) that can be allocated when the job runs.
numberOfWorkersoptionalnumbernumber_of_workersoptionalint | floatnumberOfWorkersoptionalNumberNumberOfWorkersoptionaldoubleNumberOfWorkersoptional*float64 #
The number of workers of a defined WorkerType to use for the session.
requestOriginoptionalstringrequest_originoptionalstrrequestOriginoptionalStringRequestOriginoptionalstringRequestOriginoptional*string #
The origin of the request.
rolestringrolestrroleStringRolestringRole*string required #
The IAM Role ARN.
securityConfigurationoptionalstringsecurity_configurationoptionalstrsecurityConfigurationoptionalStringSecurityConfigurationoptionalstringSecurityConfigurationoptional*string #
The name of the SecurityConfiguration structure to be used with the session.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags belonging to the session.
timeoutoptionalnumbertimeoutoptionalint | floattimeoutoptionalNumberTimeoutoptionaldoubleTimeoutoptional*float64 #
The number of minutes before session times out.
workerTypeoptionalstringworker_typeoptionalstrworkerTypeoptionalStringWorkerTypeoptionalstringWorkerTypeoptional*string #
The type of predefined worker that is allocated when a session runs.