<a id="cli-aws-qconnect-create-session"></a>

# create-session

## Description

Creates a session. A session is a contextual container used for generating recommendations. Connect Customer creates a new Amazon Q in Connect session for each contact on which Amazon Q in Connect is enabled.

See also: [AWS API Documentation](https://docs.aws.amazon.com/goto/WebAPI/qconnect-2020-10-19/CreateSession)

## Synopsis

```
  create-session
[--client-token <value>]
--assistant-id <value>
--name <value>
[--description <value>]
[--tags <value>]
[--tag-filter <value>]
[--ai-agent-configuration <value>]
[--contact-arn <value>]
[--orchestrator-configuration-list <value>]
[--remove-orchestrator-configuration-list | --no-remove-orchestrator-configuration-list]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
```

## Options

`--client-token` (string)

> A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see [Making retries safe with idempotent APIs](http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/) .

> Constraints:

> * min: `1`
> * max: `4096`

`--assistant-id` (string) [required]

> The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

> Constraints:

> * pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}`

`--name` (string) [required]

> The name of the session.

> Constraints:

> * min: `1`
> * max: `255`
> * pattern: `[a-zA-Z0-9\s_.,-]+.*`

`--description` (string)

> The description.

> Constraints:

> * min: `1`
> * max: `255`
> * pattern: `[a-zA-Z0-9\s_.,-]+.*`

`--tags` (map)

> The tags used to organize, track, or control access for this resource.

> key -> (string)

> > Constraints:

> > * min: `1`
> > * max: `128`
> > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> value -> (string)

> > Constraints:

> > * min: `1`
> > * max: `256`

Shorthand Syntax:

```
KeyName1=string,KeyName2=string
```

JSON Syntax:

```json
{"string": "string"
  ...}
```

`--tag-filter` (tagged union structure)

> An object that can be used to specify Tag conditions.

> #### NOTE
> This is a Tagged Union structure. Only one of the following top level keys can be set: `tagCondition`, `andConditions`, `orConditions`.

> tagCondition -> (structure)

> > A leaf node condition which can be used to specify a tag condition.

> > key -> (string) [required]

> > > The tag key in the tag condition.

> > > Constraints:

> > > * min: `1`
> > > * max: `128`
> > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > value -> (string)

> > > The tag value in the tag condition.

> > > Constraints:

> > > * min: `1`
> > > * max: `256`

> andConditions -> (list)

> > A list of conditions which would be applied together with an `AND` condition.

> > (structure)

> > > A leaf node condition which can be used to specify a tag condition.

> > > key -> (string) [required]

> > > > The tag key in the tag condition.

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `128`
> > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > value -> (string)

> > > > The tag value in the tag condition.

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `256`

> orConditions -> (list)

> > A list of conditions which would be applied together with an `OR` condition.

> > (tagged union structure)

> > > A list of conditions which would be applied together with an `OR` condition.

> > > #### NOTE
> > > This is a Tagged Union structure. Only one of the following top level keys can be set: `andConditions`, `tagCondition`.

> > > andConditions -> (list)

> > > > A list of conditions which would be applied together with an `AND` condition.

> > > > (structure)

> > > > > A leaf node condition which can be used to specify a tag condition.

> > > > > key -> (string) [required]

> > > > > > The tag key in the tag condition.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `128`
> > > > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > > > value -> (string)

> > > > > > The tag value in the tag condition.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `256`

> > > tagCondition -> (structure)

> > > > A leaf node condition which can be used to specify a tag condition.

> > > > key -> (string) [required]

> > > > > The tag key in the tag condition.

> > > > > Constraints:

> > > > > * min: `1`
> > > > > * max: `128`
> > > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > > value -> (string)

> > > > > The tag value in the tag condition.

> > > > > Constraints:

> > > > > * min: `1`
> > > > > * max: `256`

JSON Syntax:

```json
{
  "tagCondition": {
    "key": "string",
    "value": "string"
  },
  "andConditions": [
    {
      "key": "string",
      "value": "string"
    }
    ...
  ],
  "orConditions": [
    {
      "andConditions": [
        {
          "key": "string",
          "value": "string"
        }
        ...
      ],
      "tagCondition": {
        "key": "string",
        "value": "string"
      }
    }
    ...
  ]
}
```

`--ai-agent-configuration` (map)

> The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.

> key -> (string)

> > Possible values:

> > * `MANUAL_SEARCH`
> > * `ANSWER_RECOMMENDATION`
> > * `SELF_SERVICE`
> > * `EMAIL_RESPONSE`
> > * `EMAIL_OVERVIEW`
> > * `EMAIL_GENERATIVE_ANSWER`
> > * `ORCHESTRATION`
> > * `NOTE_TAKING`
> > * `CASE_SUMMARIZATION`

> value -> (structure)

> > A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

> > aiAgentId -> (string) [required]

> > > The ID of the AI Agent to be configured.

> > > Constraints:

> > > * pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(:[A-Z0-9_$]+){0,1}`

> > enabled -> (boolean)

> > > Indicates whether the AI Agent configured for this AI Agent type is enabled. When this value is omitted or set to true, the configured AI Agent runs; when set to false, the AI Agent ID is retained but no AI Agent runs for the AI Agent type. Setting this value to false is currently supported only for the `ANSWER_RECOMMENDATION` AI Agent type; other requests to set it to false are rejected with a validation error.

Shorthand Syntax:

```
  KeyName1={aiAgentId=string,enabled=boolean},KeyName2={aiAgentId=string,enabled=boolean}

Where valid key names are:
  MANUAL_SEARCH
  ANSWER_RECOMMENDATION
  SELF_SERVICE
  EMAIL_RESPONSE
  EMAIL_OVERVIEW
  EMAIL_GENERATIVE_ANSWER
  ORCHESTRATION
  NOTE_TAKING
  CASE_SUMMARIZATION
```

JSON Syntax:

```json
{"MANUAL_SEARCH"|"ANSWER_RECOMMENDATION"|"SELF_SERVICE"|"EMAIL_RESPONSE"|"EMAIL_OVERVIEW"|"EMAIL_GENERATIVE_ANSWER"|"ORCHESTRATION"|"NOTE_TAKING"|"CASE_SUMMARIZATION": {
      "aiAgentId": "string",
      "enabled": true|false
    }
  ...}
```

`--contact-arn` (string)

> The Amazon Resource Name (ARN) of the email contact in Connect Customer. Used to retrieve email content and establish session context for AI-powered email assistance.

> Constraints:

> * min: `1`
> * max: `2048`
> * pattern: `arn:[a-z-]+?:[a-z-]+?:[a-z0-9-]*?:([0-9]{12})?:[a-zA-Z0-9-:/]+`

`--orchestrator-configuration-list` (list)

> The list of orchestrator configurations for the session being created.

> (structure)

> > An entry in the orchestrator configuration list.

> > aiAgentId -> (string)

> > > The identifier of the AI Agent in the orchestrator configuration.

> > > Constraints:

> > > * pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(:[A-Z0-9_$]+){0,1}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}(:[A-Z0-9_$]+){0,1}`

> > orchestratorUseCase -> (string) [required]

> > > The use case for the orchestrator configuration. (for example Connect.SelfService, Connect.AgentAssistance)

> > > Constraints:

> > > * min: `1`
> > > * max: `4096`

Shorthand Syntax:

```
aiAgentId=string,orchestratorUseCase=string ...
```

JSON Syntax:

```json
[
  {
    "aiAgentId": "string",
    "orchestratorUseCase": "string"
  }
  ...
]
```

`--remove-orchestrator-configuration-list` | `--no-remove-orchestrator-configuration-list` (boolean)

> The list of orchestrator configurations to remove from the session.

`--cli-input-json` | `--cli-input-yaml` (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by `--generate-cli-skeleton`. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with `--cli-input-yaml`.

`--generate-cli-skeleton` (string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value `input`, prints a sample input JSON that can be used as an argument for `--cli-input-json`. Similarly, if provided `yaml-input` it will print a sample input YAML that can be used with `--cli-input-yaml`. If provided with the value `output`, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

## Global Options

`--debug` (boolean)

Turn on debug logging.

`--endpoint-url` (string)

Override command’s default URL with the given URL.

`--no-verify-ssl` (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

`--no-paginate` (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

`--output` (string)

The formatting style for command output.

* json
* text
* table
* yaml
* yaml-stream
* off

`--query` (string)

A JMESPath query to use in filtering the response data.

`--profile` (string)

Use a specific profile from your credential file.

`--region` (string)

The region to use. Overrides config/env settings.

`--version` (string)

Display the version of this tool.

`--color` (string)

Turn on/off color output.

* on
* off
* auto

`--no-sign-request` (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

`--ca-bundle` (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

`--cli-read-timeout` (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

`--cli-connect-timeout` (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

`--cli-binary-format` (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob `fileb://` will always be treated as binary and use the file contents directly regardless of the `cli-binary-format` setting. When using `file://` the file contents will need to properly formatted for the configured `cli-binary-format`.

* base64
* raw-in-base64-out

`--no-cli-pager` (boolean)

Disable cli pager for output.

`--cli-auto-prompt` (boolean)

Automatically prompt for CLI input parameters.

`--no-cli-auto-prompt` (boolean)

Disable automatically prompt for CLI input parameters.

`--cli-error-format` (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

* legacy
* json
* yaml
* text
* table
* enhanced

`--help` (boolean)

Display help for the command/subcommand.

## Output

session -> (structure)

> The session.

> sessionArn -> (string) [required]

> > The Amazon Resource Name (ARN) of the session.

> > Constraints:

> > * pattern: `arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}`

> sessionId -> (string) [required]

> > The identifier of the session.

> > Constraints:

> > * pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}`

> name -> (string) [required]

> > The name of the session.

> > Constraints:

> > * min: `1`
> > * max: `255`
> > * pattern: `[a-zA-Z0-9\s_.,-]+.*`

> description -> (string)

> > The description of the session.

> > Constraints:

> > * min: `1`
> > * max: `255`
> > * pattern: `[a-zA-Z0-9\s_.,-]+.*`

> tags -> (map)

> > The tags used to organize, track, or control access for this resource.

> > key -> (string)

> > > Constraints:

> > > * min: `1`
> > > * max: `128`
> > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > value -> (string)

> > > Constraints:

> > > * min: `1`
> > > * max: `256`

> integrationConfiguration -> (structure)

> > The configuration information for the session integration.

> > topicIntegrationArn -> (string)

> > > The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

> > > Constraints:

> > > * min: `1`
> > > * max: `2048`
> > > * pattern: `arn:[a-z-]+?:[a-z-]+?:[a-z0-9-]*?:([0-9]{12})?:[a-zA-Z0-9-:/]+`

> tagFilter -> (tagged union structure)

> > An object that can be used to specify Tag conditions.

> > #### NOTE
> > This is a Tagged Union structure. Only one of the following top level keys can be set: `tagCondition`, `andConditions`, `orConditions`.

> > tagCondition -> (structure)

> > > A leaf node condition which can be used to specify a tag condition.

> > > key -> (string) [required]

> > > > The tag key in the tag condition.

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `128`
> > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > value -> (string)

> > > > The tag value in the tag condition.

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `256`

> > andConditions -> (list)

> > > A list of conditions which would be applied together with an `AND` condition.

> > > (structure)

> > > > A leaf node condition which can be used to specify a tag condition.

> > > > key -> (string) [required]

> > > > > The tag key in the tag condition.

> > > > > Constraints:

> > > > > * min: `1`
> > > > > * max: `128`
> > > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > > value -> (string)

> > > > > The tag value in the tag condition.

> > > > > Constraints:

> > > > > * min: `1`
> > > > > * max: `256`

> > orConditions -> (list)

> > > A list of conditions which would be applied together with an `OR` condition.

> > > (tagged union structure)

> > > > A list of conditions which would be applied together with an `OR` condition.

> > > > #### NOTE
> > > > This is a Tagged Union structure. Only one of the following top level keys can be set: `andConditions`, `tagCondition`.

> > > > andConditions -> (list)

> > > > > A list of conditions which would be applied together with an `AND` condition.

> > > > > (structure)

> > > > > > A leaf node condition which can be used to specify a tag condition.

> > > > > > key -> (string) [required]

> > > > > > > The tag key in the tag condition.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `128`
> > > > > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > > > > value -> (string)

> > > > > > > The tag value in the tag condition.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `256`

> > > > tagCondition -> (structure)

> > > > > A leaf node condition which can be used to specify a tag condition.

> > > > > key -> (string) [required]

> > > > > > The tag key in the tag condition.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `128`
> > > > > > * pattern: `(?!aws:)[a-zA-Z+-=._:/]+`

> > > > > value -> (string)

> > > > > > The tag value in the tag condition.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `256`

> aiAgentConfiguration -> (map)

> > The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.

> > key -> (string)

> > > Possible values:

> > > * `MANUAL_SEARCH`
> > > * `ANSWER_RECOMMENDATION`
> > > * `SELF_SERVICE`
> > > * `EMAIL_RESPONSE`
> > > * `EMAIL_OVERVIEW`
> > > * `EMAIL_GENERATIVE_ANSWER`
> > > * `ORCHESTRATION`
> > > * `NOTE_TAKING`
> > > * `CASE_SUMMARIZATION`

> > value -> (structure)

> > > A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

> > > aiAgentId -> (string) [required]

> > > > The ID of the AI Agent to be configured.

> > > > Constraints:

> > > > * pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(:[A-Z0-9_$]+){0,1}`

> > > enabled -> (boolean)

> > > > Indicates whether the AI Agent configured for this AI Agent type is enabled. When this value is omitted or set to true, the configured AI Agent runs; when set to false, the AI Agent ID is retained but no AI Agent runs for the AI Agent type. Setting this value to false is currently supported only for the `ANSWER_RECOMMENDATION` AI Agent type; other requests to set it to false are rejected with a validation error.

> origin -> (string)

> > The origin of the Session to be listed. `SYSTEM` for a default Session created by Amazon Q in Connect or `CUSTOMER` for a Session created by calling [CreateSession](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_CreateSession.html) API.

> > Possible values:

> > * `SYSTEM`
> > * `CUSTOMER`

> orchestratorConfigurationList -> (list)

> > The list of orchestrator configurations for the session.

> > (structure)

> > > An entry in the orchestrator configuration list.

> > > aiAgentId -> (string)

> > > > The identifier of the AI Agent in the orchestrator configuration.

> > > > Constraints:

> > > > * pattern: `[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(:[A-Z0-9_$]+){0,1}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}(:[A-Z0-9_$]+){0,1}`

> > > orchestratorUseCase -> (string) [required]

> > > > The use case for the orchestrator configuration. (for example Connect.SelfService, Connect.AgentAssistance)

> > > > Constraints:

> > > > * min: `1`
> > > > * max: `4096`
