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 is not specified, the user name is determined implicitly
based on the Amazon Web Services access key ID used to sign the request. If a temporary access key is
used, then UserName is required. If a long-term key is assigned to the
user, then UserName is not required. 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.
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
andMarker
parameters.If the
UserName
is not specified, the user name is determined implicitly based on the Amazon Web Services access key ID used to sign the request. If a temporary access key is used, thenUserName
is required. If a long-term key is assigned to the user, thenUserName
is not required. 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.
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);
ListAccessKeysCommandInput for command's
input
shape.ListAccessKeysCommandOutput for command's
response
shape.config for IAMClient's
config
shape.