# CfnSessionProps

Properties for defining a `CfnSession`.

Extends: CfnSessionProps
Used as props by: CfnSession

- Source: Generated code
- Type last changed: v2.268.0 · 2 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_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',
};
```

## Properties

- `command`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSession.SessionCommandProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnSession.SessionCommandProperty.html) (required) — The SessionCommand that runs the job.

- `connections`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSession.ConnectionsListProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnSession.ConnectionsListProperty.html) — Specifies the connections used by the session.

- `defaultArguments`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — A map array of key-value pairs.

  Max is 75 pairs.

- `description`: string — The description of the session.

- `glueVersion`: string — The Glue version determines the versions of Apache Spark and Python that Glue supports.

  The GlueVersion must be greater than 2.0.

- `id`: string (required) — The ID of the session.

- `idleTimeout`: number — The number of minutes when idle before session times out.

  Default is the value of Timeout.

- `maxCapacity`: number — The number of Glue data processing units (DPUs) that can be allocated when the job runs.

- `numberOfWorkers`: number — The number of workers of a defined WorkerType to use for the session.

- `requestOrigin`: string — The origin of the request.

- `role`: string (required) — The IAM Role ARN.

- `securityConfiguration`: string — The name of the SecurityConfiguration structure to be used with the session.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags belonging to the session.

- `timeout`: number — The number of minutes before session times out.

- `workerType`: string — The type of predefined worker that is allocated when a session runs.
