选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

GetAccessKeyInfo

聚焦模式
GetAccessKeyInfo - AWS Security Token Service
此页面尚未翻译为您的语言。 请求翻译

Returns the account identifier for the specified access key ID.

Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). For more information about access keys, see Managing Access Keys for IAM Users in the IAM User Guide.

When you pass an access key ID to this operation, it returns the ID of the AWS account to which the keys belong. Access key IDs beginning with AKIA are long-term credentials for an IAM user or the AWS account root user. Access key IDs beginning with ASIA are temporary credentials that are created using AWS STS operations. If the account in the response belongs to you, you can sign in as the root user and review your root user access keys. Then, you can pull a credentials report to learn which IAM user owns the keys. To learn who requested the temporary credentials for an ASIA access key, view the AWS STS events in your CloudTrail logs in the IAM User Guide.

This operation does not indicate the state of the access key. The key might be active, inactive, or deleted. Active keys might not have permissions to perform an operation. Providing a deleted access key might return an error that the key doesn't exist.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

AccessKeyId

The identifier of an access key.

This parameter allows (through its regex pattern) a string of characters that can consist of any upper- or lowercase letter or digit.

Type: String

Length Constraints: Minimum length of 16. Maximum length of 128.

Pattern: [\w]*

Required: Yes

Response Elements

The following element is returned by the service.

Account

The number used to identify the AWS account.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

Examples

Example

This example illustrates one usage of GetAccessKeyInfo.

Sample Request

https://sts.amazonaws.com/ ?Version=2011-06-15 &Action=GetAccessKeyInfo &AccessKeyId=AKIAI44QH8DHBEXAMPLE &AUTHPARAMS

Sample Response

<GetAccessKeyInfoResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/"> <GetAccessKeyInfoResult> <Account>111122223333</Account> </GetAccessKeyInfoResult> <ResponseMetadata> <RequestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestId> </ResponseMetadata> </GetAccessKeyInfoResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

本页内容

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。