Connect / Client / create_auth_code

create_auth_code

Connect.Client.create_auth_code(**kwargs)

Creates an authorization code for the specified Connect Customer instance. The authorization code can be used to establish a session with scoped permissions defined by the specified scope parameters.

See also: AWS API Documentation

Request Syntax

response = client.create_auth_code(
    InstanceId='string',
    Scope={
        'SecurityProfileIds': [
            'string',
        ],
        'EntityType': 'CUSTOMER_PROFILE',
        'EntityId': 'string',
        'DomainName': 'string'
    },
    MaxSessionDurationMinutes=123,
    SessionInactivityDurationMinutes=123
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • Scope (dict) –

    [REQUIRED]

    The scope for the authorization code. Defines the permissions and access boundaries for the session.

    • SecurityProfileIds (list) –

      The list of security profile identifiers to scope the session to. Maximum of 10 security profiles.

      • (string) –

    • EntityType (string) – [REQUIRED]

      The type of entity to scope the session to.

    • EntityId (string) –

      The identifier of the entity to scope the session to.

    • DomainName (string) –

      The name of the Customer Profiles domain to scope the session to.

  • MaxSessionDurationMinutes (integer) – The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.

  • SessionInactivityDurationMinutes (integer) –

    [REQUIRED]

    The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).

Return type:

dict

Returns:

Response Syntax

{
    'AuthCode': 'string',
    'SessionId': 'string',
    'EntityType': 'CUSTOMER_PROFILE',
    'EntityId': 'string'
}

Response Structure

  • (dict) –

    • AuthCode (string) –

      The authorization code to use for establishing a session.

    • SessionId (string) –

      The identifier of the session created with the authorization code.

    • EntityType (string) –

      The type of entity associated with the authorization code.

    • EntityId (string) –

      The identifier of the entity associated with the authorization code.

Exceptions