CmdID

CmdID / aws / aws cognito-idp

aws cognito-idp admin-list-devices

Lists a user's registered devices. AWS CLI reference

1 example 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To list devices for a user

The following admin-list-devices example lists devices for the user diego.

aws cognito-idp admin-list-devices --user-pool-id us-west-2_EXAMPLE --username diego --limit 1Identify
--user-pool-idThe ID of the user pool where the device owner is a user.
--usernameThe name of the user that you want to query or modify.
--limitThe maximum number of devices that you want Amazon Cognito to return in the response.
Its output, shortened
{
    "Devices": [
        {
            "DeviceKey": "us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "DeviceAttributes": [
                {
                    "Name": "device_status",
                    "Value": "valid"
                },
                {
                    "Name": "device_name",
                    "Value": "MyDevice"
                },
                {
                    "Name": "dev:device_arn",
                    "Value": "arn:aws:cognito-idp:us-west-2:123456789012:owner/diego.us-west-2_EXAMPLE/device/us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
                },
                {
                    "Name": "dev:device_owner",
                    "Value": "diego.us-west-2_EXAMPLE"
                },
                {
                    "Name": "last_ip_used",
                    "Value": "192.0.2.1"
                },
                {
                    "Name": "dev:device_remembered_status",
                    "Value": "remembered"
                },
                {
… 10 more lines

For more information, see Working with user devices in your user pool in the Amazon Cognito Developer Guide.

Options

4 in the AWS CLI reference
--limitThe maximum number of devices that you want Amazon Cognito to return in the response.
--pagination-tokenThis API operation returns a limited number of results.
--user-pool-idThe ID of the user pool where the device owner is a user.
--usernameThe name of the user that you want to query or modify.