amazonka-iam-2.0: Amazon Identity and Access Management 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.IAM.ListAccessKeys

Description

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.

This operation returns paginated results.

Synopsis

Creating a Request

data ListAccessKeys Source #

See: newListAccessKeys smart constructor.

Constructors

ListAccessKeys' 

Fields

  • marker :: Maybe Text

    Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

  • maxItems :: Maybe Natural

    Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

    If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

  • userName :: Maybe Text

    The name of the user.

    This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Instances

Instances details
ToHeaders ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

ToPath ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

ToQuery ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

AWSPager ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

AWSRequest ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Associated Types

type AWSResponse ListAccessKeys #

Generic ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Associated Types

type Rep ListAccessKeys :: Type -> Type #

Read ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Show ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

NFData ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Methods

rnf :: ListAccessKeys -> () #

Eq ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Hashable ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

type AWSResponse ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

type Rep ListAccessKeys Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

type Rep ListAccessKeys = D1 ('MetaData "ListAccessKeys" "Amazonka.IAM.ListAccessKeys" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "ListAccessKeys'" 'PrefixI 'True) (S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxItems") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "userName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

newListAccessKeys :: ListAccessKeys Source #

Create a value of ListAccessKeys 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:

ListAccessKeys, listAccessKeys_marker - Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

$sel:maxItems:ListAccessKeys', listAccessKeys_maxItems - Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

ListAccessKeys, listAccessKeys_userName - The name of the user.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Request Lenses

listAccessKeys_marker :: Lens' ListAccessKeys (Maybe Text) Source #

Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

listAccessKeys_maxItems :: Lens' ListAccessKeys (Maybe Natural) Source #

Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

listAccessKeys_userName :: Lens' ListAccessKeys (Maybe Text) Source #

The name of the user.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Destructuring the Response

data ListAccessKeysResponse Source #

Contains the response to a successful ListAccessKeys request.

See: newListAccessKeysResponse smart constructor.

Constructors

ListAccessKeysResponse' 

Fields

  • isTruncated :: Maybe Bool

    A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.

  • marker :: Maybe Text

    When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

  • httpStatus :: Int

    The response's http status code.

  • accessKeyMetadata :: [AccessKeyMetadata]

    A list of objects containing metadata about the access keys.

Instances

Instances details
Generic ListAccessKeysResponse Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Associated Types

type Rep ListAccessKeysResponse :: Type -> Type #

Read ListAccessKeysResponse Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Show ListAccessKeysResponse Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

NFData ListAccessKeysResponse Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

Methods

rnf :: ListAccessKeysResponse -> () #

Eq ListAccessKeysResponse Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

type Rep ListAccessKeysResponse Source # 
Instance details

Defined in Amazonka.IAM.ListAccessKeys

type Rep ListAccessKeysResponse = D1 ('MetaData "ListAccessKeysResponse" "Amazonka.IAM.ListAccessKeys" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "ListAccessKeysResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "isTruncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "accessKeyMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [AccessKeyMetadata]))))

newListAccessKeysResponse Source #

Create a value of ListAccessKeysResponse 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:

ListAccessKeysResponse, listAccessKeysResponse_isTruncated - A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.

ListAccessKeys, listAccessKeysResponse_marker - When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

$sel:httpStatus:ListAccessKeysResponse', listAccessKeysResponse_httpStatus - The response's http status code.

$sel:accessKeyMetadata:ListAccessKeysResponse', listAccessKeysResponse_accessKeyMetadata - A list of objects containing metadata about the access keys.

Response Lenses

listAccessKeysResponse_isTruncated :: Lens' ListAccessKeysResponse (Maybe Bool) Source #

A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.

listAccessKeysResponse_marker :: Lens' ListAccessKeysResponse (Maybe Text) Source #

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

listAccessKeysResponse_accessKeyMetadata :: Lens' ListAccessKeysResponse [AccessKeyMetadata] Source #

A list of objects containing metadata about the access keys.