Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ListAccessKeysCommand

Returns information about the access key IDs associated with the specified IAM user. If there is none, the operation returns an empty list.

Although each user is limited to a small number of keys, you can still paginate the results using the MaxItems and Marker parameters.

If the UserName field is not specified, the user name is determined implicitly based on the Amazon Web Services access key ID used to sign the request. This operation works for access keys under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated users.

To ensure the security of your Amazon Web Services account, the secret access key is accessible only during key and user creation.

example

Use a bare-bones client and the command you need to make an API call.

import { IAMClient, ListAccessKeysCommand } from "@aws-sdk/client-iam"; // ES Modules import
// const { IAMClient, ListAccessKeysCommand } = require("@aws-sdk/client-iam"); // CommonJS import
const client = new IAMClient(config);
const command = new ListAccessKeysCommand(input);
const response = await client.send(command);
see

ListAccessKeysCommandInput for command's input shape.

see

ListAccessKeysCommandOutput for command's response shape.

see

config for command's input shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: ListAccessKeysCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<ListAccessKeysCommandInput, ListAccessKeysCommandOutput>