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.
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' )
string
[REQUIRED]
The authentication type for the users in the user pool to describe. You must specify USERPOOL.
integer
The maximum size of each page of results.
string
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.
dict
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.
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' )
string
[REQUIRED]
The email address of the user.
string
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.
string
The first name, or given name, of the user.
string
The last name, or surname, of the user.
string
[REQUIRED]
The authentication type for the user. You must specify USERPOOL.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes a user from the user pool.
See also: AWS API Documentation
Request Syntax
client.delete_user( UserName='string', AuthenticationType='API'|'SAML'|'USERPOOL' )
string
[REQUIRED]
The email address of the user.
string
[REQUIRED]
The authentication type for the user. You must specify USERPOOL.
dict
Response Syntax
{}
Response Structure
(dict) --
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' )
string
The name of the stack that is associated with the user.
string
The email address of the user who is associated with the stack.
string
The authentication type for the user who is associated with the stack. You must specify USERPOOL.
integer
The maximum size of each page of results.
string
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.
dict
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.
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' )
string
[REQUIRED]
The email address of the user.
string
[REQUIRED]
The authentication type for the user. You must specify USERPOOL.
dict
Response Syntax
{}
Response Structure
(dict) --
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 }, ] )
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.
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.
dict
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.
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' )
string
[REQUIRED]
The email address of the user.
string
[REQUIRED]
The authentication type for the user. You must specify USERPOOL.
dict
Response Syntax
{}
Response Structure
(dict) --
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 }, ] )
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.
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.
dict
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.