CognitoIdentityProvider / Client / admin_list_devices
admin_list_devices#
- CognitoIdentityProvider.Client.admin_list_devices(**kwargs)#
Lists a user’s registered devices.
Note
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
See also: AWS API Documentation
Request Syntax
response = client.admin_list_devices( UserPoolId='string', Username='string', Limit=123, PaginationToken='string' )
- Parameters:
UserPoolId (string) –
[REQUIRED]
The user pool ID.
Username (string) –
[REQUIRED]
The username of the user that you want to query or modify. The value of this parameter is typically your user’s username, but it can be any of their alias attributes. If
username
isn’t an alias attribute in your user pool, this value must be thesub
of a local user or the username of a user from a third-party IdP.Limit (integer) – The limit of the devices request.
PaginationToken (string) – This API operation returns a limited number of results. The pagination token is an identifier that you can present in an additional API request with the same parameters. When you include the pagination token, Amazon Cognito returns the next set of items after the current list. Subsequent requests return a new pagination token. By use of this token, you can paginate through the full list of items.
- Return type:
dict
- Returns:
Response Syntax
{ 'Devices': [ { 'DeviceKey': 'string', 'DeviceAttributes': [ { 'Name': 'string', 'Value': 'string' }, ], 'DeviceCreateDate': datetime(2015, 1, 1), 'DeviceLastModifiedDate': datetime(2015, 1, 1), 'DeviceLastAuthenticatedDate': datetime(2015, 1, 1) }, ], 'PaginationToken': 'string' }
Response Structure
(dict) –
Lists the device’s response, as an administrator.
Devices (list) –
The devices in the list of devices response.
(dict) –
Information about a user’s device that they’ve registered for device SRP authentication in your application. For more information, see Working with user devices in your user pool.
The data type is a response parameter of AdminGetDevice, AdminListDevices, and GetDevice.
DeviceKey (string) –
The device key, for example
us-west-2_EXAMPLE-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222
.DeviceAttributes (list) –
Metadata about a user’s device, like name and last-access source IP.
(dict) –
The name and value of a user attribute.
This data type is a request parameter of AdminUpdateUserAttributes and UpdateUserAttributes.
Name (string) –
The name of the attribute.
Value (string) –
The value of the attribute.
DeviceCreateDate (datetime) –
The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java
Date
object.DeviceLastModifiedDate (datetime) –
The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java
Date
object.DeviceLastAuthenticatedDate (datetime) –
The date when the user last signed in with the device.
PaginationToken (string) –
The identifier that Amazon Cognito returned with the previous request to this operation. When you include a pagination token in your request, Amazon Cognito returns the next set of items in the list. By use of this token, you can paginate through the full list of items.
Exceptions
CognitoIdentityProvider.Client.exceptions.InvalidParameterException
CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException
CognitoIdentityProvider.Client.exceptions.InvalidUserPoolConfigurationException
CognitoIdentityProvider.Client.exceptions.TooManyRequestsException
CognitoIdentityProvider.Client.exceptions.InternalErrorException
CognitoIdentityProvider.Client.exceptions.NotAuthorizedException