amazonka-sts-2.0: Amazon Security Token Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.STS.GetAccessKeyInfo

Description

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 Amazon Web Services account to which the keys belong. Access key IDs beginning with AKIA are long-term credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with ASIA are temporary credentials that are created using 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 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.

Synopsis

Creating a Request

data GetAccessKeyInfo Source #

See: newGetAccessKeyInfo smart constructor.

Constructors

GetAccessKeyInfo' 

Fields

  • accessKeyId :: AccessKey

    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.

Instances

Instances details
ToHeaders GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

ToPath GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

ToQuery GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

AWSRequest GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Associated Types

type AWSResponse GetAccessKeyInfo #

Generic GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Associated Types

type Rep GetAccessKeyInfo :: Type -> Type #

Read GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Show GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

NFData GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Methods

rnf :: GetAccessKeyInfo -> () #

Eq GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Hashable GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

type AWSResponse GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

type Rep GetAccessKeyInfo Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

type Rep GetAccessKeyInfo = D1 ('MetaData "GetAccessKeyInfo" "Amazonka.STS.GetAccessKeyInfo" "amazonka-sts-2.0-4mYLKqRkMcBDaDLjBZpuhO" 'False) (C1 ('MetaCons "GetAccessKeyInfo'" 'PrefixI 'True) (S1 ('MetaSel ('Just "accessKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AccessKey)))

newGetAccessKeyInfo Source #

Create a value of GetAccessKeyInfo with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:accessKeyId:GetAccessKeyInfo', getAccessKeyInfo_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.

Request Lenses

getAccessKeyInfo_accessKeyId :: Lens' GetAccessKeyInfo AccessKey Source #

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.

Destructuring the Response

data GetAccessKeyInfoResponse Source #

See: newGetAccessKeyInfoResponse smart constructor.

Constructors

GetAccessKeyInfoResponse' 

Fields

Instances

Instances details
Generic GetAccessKeyInfoResponse Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Associated Types

type Rep GetAccessKeyInfoResponse :: Type -> Type #

Read GetAccessKeyInfoResponse Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Show GetAccessKeyInfoResponse Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

NFData GetAccessKeyInfoResponse Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

Eq GetAccessKeyInfoResponse Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

type Rep GetAccessKeyInfoResponse Source # 
Instance details

Defined in Amazonka.STS.GetAccessKeyInfo

type Rep GetAccessKeyInfoResponse = D1 ('MetaData "GetAccessKeyInfoResponse" "Amazonka.STS.GetAccessKeyInfo" "amazonka-sts-2.0-4mYLKqRkMcBDaDLjBZpuhO" 'False) (C1 ('MetaCons "GetAccessKeyInfoResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "account") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newGetAccessKeyInfoResponse Source #

Create a value of GetAccessKeyInfoResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:account:GetAccessKeyInfoResponse', getAccessKeyInfoResponse_account - The number used to identify the Amazon Web Services account.

$sel:httpStatus:GetAccessKeyInfoResponse', getAccessKeyInfoResponse_httpStatus - The response's http status code.

Response Lenses

getAccessKeyInfoResponse_account :: Lens' GetAccessKeyInfoResponse (Maybe Text) Source #

The number used to identify the Amazon Web Services account.