Listing the EIM Access Keys Associated with a User

You can get information about the access keys associated with a user. If the user does not have any associated access key, this action returns an empty list.

You can use this action for access keys associated with the root user. Therefore, you can use it to manage root credentials even if the OUTSCALE account has no associated EIM users.

Listing the EIM Access Keys Associated with a User Using Cockpit v2

In the EIM Users dashboard, click the IconView details icon of the user for which you want to get information about the access keys associated with.

Listing the EIM Access Keys Associated with a User Using OSC CLI

The ReadAccessKeys command lists the access key IDs of either your root account or an EIM user.

Request sample: Example with access key/secret key authentication
$ osc-cli api ReadAccessKeys --profile "default" \
    --Filters '{
        "States": ["ACTIVE"]
      }'
Request sample: Example with login/password authentication
$ osc-cli api ReadAccessKeys --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
    --Filters '{
        "States": ["ACTIVE"]
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Filters: (optional) One or more filters.

    • AccessKeyIds: (optional) The IDs of the access keys.

    • States: (optional) The states of the access keys (ACTIVE | INACTIVE).

  • UserName: (optional) The name of the EIM user. By default, the user who sends the request (which can be the root account).

The ReadAccessKeys command returns the following elements:

  • AccessKeys: A list of access keys.

    • AccessKeyId: The ID of the access key.

    • CreationDate: The date and time (UTC) at which the access key was created.

    • ExpirationDate: The date and time (UTC) at which the access key expires.

    • LastModificationDate: The date and time (UTC) at which the access key was last modified.

    • State: The state of the access key (ACTIVE if the key is valid for API calls, or INACTIVE if not).

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "AccessKeys": [
    {
      "State": "ACTIVE",
      "AccessKeyId": "ABCDEFGHIJ0123456789",
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "ExpirationDate": "2063-04-05T00:00:00.000+0000",
      "LastModificationDate": "2010-10-01T12:34:56.789+0000"
    }
  ]
}

Listing the EIM Access Keys Associated with a User Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To list the access keys associated with a user, use the list-access-keys command following this syntax:

Request sample
$ aws iam list-access-keys \
    --profile YOUR_PROFILE \
    --user-name USER_NAME \
    --endpoint https://eim.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) user-name: The name of the user.

    If you do not specify a user name, this action lists the access keys associated with the user who sends the request.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The list-access-keys command returns the following elements:

  • AccessKeyMetadata: Information about one or more access keys associated with the specified user. This element contains the following information:

    • UserName: The name of the user with which the access key is associated.

    • Status: The state of the access key (Active | Inactive).

    • CreateDate: The date and time of the access key creation.

    • AccessKeyId: The ID of the access key.

Result sample
"AccessKeyMetadata": [
    {
        "UserName": "USER_NAME",
        "Status": "Active",
        "CreateDate": "2016-05-12T14:58:06.364Z",
        "AccessKeyId": "NOPQR2STUVWX3YZABCDE"
    },
    {
        "UserName": "USER_NAME",
        "Status": "Inactive",
        "CreateDate": "2015-09-26T12:12:32.201Z",
        "AccessKeyId": "FGHIJKLMNOPQ4RSTUVWX"
    }
]

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.