batch_associate_user_stack

batch_associate_user_stack(**kwargs)

Associates the specified users with the specified stacks. Users in a user pool cannot be assigned to stacks with fleets that are joined to an Active Directory domain.

See also: AWS API Documentation

Request Syntax

response = client.batch_associate_user_stack(
    UserStackAssociations=[
        {
            'StackName': 'string',
            'UserName': 'string',
            'AuthenticationType': 'API'|'SAML'|'USERPOOL'|'AWS_AD',
            'SendEmailNotification': True|False
        },
    ]
)
Parameters
UserStackAssociations (list) --

[REQUIRED]

The list of UserStackAssociation objects.

  • (dict) --

    Describes a user in the user pool and the associated stack.

    • StackName (string) -- [REQUIRED]

      The name of the stack that is associated with the user.

    • UserName (string) -- [REQUIRED]

      The email address of the user who is associated with the stack.

      Note

      Users' email addresses are case-sensitive.

    • AuthenticationType (string) -- [REQUIRED]

      The authentication type for the user.

    • SendEmailNotification (boolean) --

      Specifies whether a welcome email is sent to a user after the user is created in the user pool.

Return type
dict
Returns
Response Syntax
{
    'errors': [
        {
            'UserStackAssociation': {
                'StackName': 'string',
                'UserName': 'string',
                'AuthenticationType': 'API'|'SAML'|'USERPOOL'|'AWS_AD',
                'SendEmailNotification': True|False
            },
            'ErrorCode': 'STACK_NOT_FOUND'|'USER_NAME_NOT_FOUND'|'DIRECTORY_NOT_FOUND'|'INTERNAL_ERROR',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • errors (list) --

      The list of UserStackAssociationError objects.

      • (dict) --

        Describes the error that is returned when a user can’t be associated with or disassociated from a stack.

        • UserStackAssociation (dict) --

          Information about the user and associated stack.

          • StackName (string) --

            The name of the stack that is associated with the user.

          • UserName (string) --

            The email address of the user who is associated with the stack.

            Note

            Users' email addresses are case-sensitive.

          • AuthenticationType (string) --

            The authentication type for the user.

          • SendEmailNotification (boolean) --

            Specifies whether a welcome email is sent to a user after the user is created in the user pool.

        • ErrorCode (string) --

          The error code for the error that is returned when a user can’t be associated with or disassociated from a stack.

        • ErrorMessage (string) --

          The error message for the error that is returned when a user can’t be associated with or disassociated from a stack.

Exceptions

  • AppStream.Client.exceptions.OperationNotPermittedException
  • AppStream.Client.exceptions.InvalidParameterCombinationException