Amazon AppStream

2018/10/18 - Amazon AppStream - 8 new api methods

Changes  This API update adds support for creating, managing, and deleting users in the AppStream 2.0 user pool.

DescribeUsers (new) Link ¶

Retrieves a list that describes one or more specified users in the user pool, if user names are provided. Otherwise, all users in the user pool are described.

See also: AWS API Documentation

Request Syntax

client.describe_users(
    AuthenticationType='API'|'SAML'|'USERPOOL',
    MaxResults=123,
    NextToken='string'
)
type AuthenticationType

string

param AuthenticationType

[REQUIRED]

The authentication type for the users in the user pool to describe. You must specify USERPOOL.

type MaxResults

integer

param MaxResults

The maximum size of each page of results.

type NextToken

string

param NextToken

The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

rtype

dict

returns

Response Syntax

{
    'Users': [
        {
            'Arn': 'string',
            'UserName': 'string',
            'Enabled': True|False,
            'Status': 'string',
            'FirstName': 'string',
            'LastName': 'string',
            'CreatedTime': datetime(2015, 1, 1),
            'AuthenticationType': 'API'|'SAML'|'USERPOOL'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Users (list) --

      Information about users in the user pool.

      • (dict) --

        Describes a user in the user pool.

        • Arn (string) --

          The ARN of the user.

        • UserName (string) --

          The email address of the user.

        • Enabled (boolean) --

          Specifies whether the user in the user pool is enabled.

        • Status (string) --

          The status of the user in the user pool. The status can be one of the following:

          • UNCONFIRMED – The user is created but not confirmed.

          • CONFIRMED – The user is confirmed.

          • ARCHIVED – The user is no longer active.

          • COMPROMISED – The user is disabled because of a potential security threat.

          • UNKNOWN – The user status is not known.

        • FirstName (string) --

          The first name, or given name, of the user.

        • LastName (string) --

          The last name, or surname, of the user.

        • CreatedTime (datetime) --

          The date and time the user was created in the user pool.

        • AuthenticationType (string) --

          The authentication type for the user.

    • NextToken (string) --

      The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.

CreateUser (new) Link ¶

Creates a new user in the user pool.

See also: AWS API Documentation

Request Syntax

client.create_user(
    UserName='string',
    MessageAction='SUPPRESS'|'RESEND',
    FirstName='string',
    LastName='string',
    AuthenticationType='API'|'SAML'|'USERPOOL'
)
type UserName

string

param UserName

[REQUIRED]

The email address of the user.

type MessageAction

string

param MessageAction

The action to take for the welcome email that is sent to a user after the user is created in the user pool. If you specify SUPPRESS, no email is sent. If you specify RESEND, do not specify the first name or last name of the user. If the value is null, the email is sent.

Note

The temporary password in the welcome email is valid for only 7 days. If users don’t set their passwords within 7 days, you must send them a new welcome email.

type FirstName

string

param FirstName

The first name, or given name, of the user.

type LastName

string

param LastName

The last name, or surname, of the user.

type AuthenticationType

string

param AuthenticationType

[REQUIRED]

The authentication type for the user. You must specify USERPOOL.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteUser (new) Link ¶

Deletes a user from the user pool.

See also: AWS API Documentation

Request Syntax

client.delete_user(
    UserName='string',
    AuthenticationType='API'|'SAML'|'USERPOOL'
)
type UserName

string

param UserName

[REQUIRED]

The email address of the user.

type AuthenticationType

string

param AuthenticationType

[REQUIRED]

The authentication type for the user. You must specify USERPOOL.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeUserStackAssociations (new) Link ¶

Retrieves a list that describes the UserStackAssociation objects. You must specify either or both of the following:

  • The stack name

  • The user name (email address of the user associated with the stack) and the authentication type for the user

See also: AWS API Documentation

Request Syntax

client.describe_user_stack_associations(
    StackName='string',
    UserName='string',
    AuthenticationType='API'|'SAML'|'USERPOOL',
    MaxResults=123,
    NextToken='string'
)
type StackName

string

param StackName

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

type UserName

string

param UserName

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

type AuthenticationType

string

param AuthenticationType

The authentication type for the user who is associated with the stack. You must specify USERPOOL.

type MaxResults

integer

param MaxResults

The maximum size of each page of results.

type NextToken

string

param NextToken

The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

rtype

dict

returns

Response Syntax

{
    'UserStackAssociations': [
        {
            'StackName': 'string',
            'UserName': 'string',
            'AuthenticationType': 'API'|'SAML'|'USERPOOL',
            'SendEmailNotification': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • UserStackAssociations (list) --

      The UserStackAssociation objects.

      • (dict) --

        Describes a user in the user pool and the 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.

        • 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.

    • NextToken (string) --

      The pagination token to use to retrieve the next page of results for this operation. If there are no more pages, this value is null.

EnableUser (new) Link ¶

Enables a user in the user pool. After being enabled, users can sign in to AppStream 2.0 and open applications from the stacks to which they are assigned.

See also: AWS API Documentation

Request Syntax

client.enable_user(
    UserName='string',
    AuthenticationType='API'|'SAML'|'USERPOOL'
)
type UserName

string

param UserName

[REQUIRED]

The email address of the user.

type AuthenticationType

string

param AuthenticationType

[REQUIRED]

The authentication type for the user. You must specify USERPOOL.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

BatchDisassociateUserStack (new) Link ¶

Disassociates the specified users from the specified stacks.

See also: AWS API Documentation

Request Syntax

client.batch_disassociate_user_stack(
    UserStackAssociations=[
        {
            'StackName': 'string',
            'UserName': 'string',
            'AuthenticationType': 'API'|'SAML'|'USERPOOL',
            'SendEmailNotification': True|False
        },
    ]
)
type UserStackAssociations

list

param UserStackAssociations

[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.

    • 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.

rtype

dict

returns

Response Syntax

{
    'errors': [
        {
            'UserStackAssociation': {
                'StackName': 'string',
                'UserName': 'string',
                'AuthenticationType': 'API'|'SAML'|'USERPOOL',
                'SendEmailNotification': True|False
            },
            'ErrorCode': 'STACK_NOT_FOUND'|'USER_NAME_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.

          • 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.

DisableUser (new) Link ¶

Disables the specified user in the user pool. Users can't sign in to AppStream 2.0 until they are re-enabled. This action does not delete the user.

See also: AWS API Documentation

Request Syntax

client.disable_user(
    UserName='string',
    AuthenticationType='API'|'SAML'|'USERPOOL'
)
type UserName

string

param UserName

[REQUIRED]

The email address of the user.

type AuthenticationType

string

param AuthenticationType

[REQUIRED]

The authentication type for the user. You must specify USERPOOL.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

BatchAssociateUserStack (new) Link ¶

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

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

list

param UserStackAssociations

[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.

    • 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.

rtype

dict

returns

Response Syntax

{
    'errors': [
        {
            'UserStackAssociation': {
                'StackName': 'string',
                'UserName': 'string',
                'AuthenticationType': 'API'|'SAML'|'USERPOOL',
                'SendEmailNotification': True|False
            },
            'ErrorCode': 'STACK_NOT_FOUND'|'USER_NAME_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.

          • 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.