amazonka-kms-2.0: Amazon Key Management 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.KMS.ListKeys

Description

Gets a list of all KMS keys in the caller's Amazon Web Services account and Region.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:ListKeys (IAM policy)

Related operations:

  • CreateKey
  • DescribeKey
  • ListAliases
  • ListResourceTags

This operation returns paginated results.

Synopsis

Creating a Request

data ListKeys Source #

See: newListKeys smart constructor.

Constructors

ListKeys' 

Fields

  • limit :: Maybe Natural

    Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.

    This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

  • marker :: Maybe Text

    Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

Instances

Instances details
ToJSON ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

ToHeaders ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

toHeaders :: ListKeys -> [Header] #

ToPath ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

ToQuery ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

AWSPager ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

AWSRequest ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Associated Types

type AWSResponse ListKeys #

Generic ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Associated Types

type Rep ListKeys :: Type -> Type #

Methods

from :: ListKeys -> Rep ListKeys x #

to :: Rep ListKeys x -> ListKeys #

Read ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Show ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

NFData ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

rnf :: ListKeys -> () #

Eq ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Hashable ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

hashWithSalt :: Int -> ListKeys -> Int #

hash :: ListKeys -> Int #

type AWSResponse ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

type Rep ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

type Rep ListKeys = D1 ('MetaData "ListKeys" "Amazonka.KMS.ListKeys" "amazonka-kms-2.0-6YhT3Ymbf9Z5PoaGoz7tbG" 'False) (C1 ('MetaCons "ListKeys'" 'PrefixI 'True) (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))

newListKeys :: ListKeys Source #

Create a value of ListKeys 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:limit:ListKeys', listKeys_limit - Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

$sel:marker:ListKeys', listKeys_marker - Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

Request Lenses

listKeys_limit :: Lens' ListKeys (Maybe Natural) Source #

Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

listKeys_marker :: Lens' ListKeys (Maybe Text) Source #

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

Destructuring the Response

data ListKeysResponse Source #

See: newListKeysResponse smart constructor.

Constructors

ListKeysResponse' 

Fields

  • keys :: Maybe [KeyListEntry]

    A list of KMS keys.

  • nextMarker :: Maybe Text

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

  • truncated :: Maybe Bool

    A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in thisresponse to the Marker parameter in a subsequent request.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Associated Types

type Rep ListKeysResponse :: Type -> Type #

Read ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Show ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

NFData ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

rnf :: ListKeysResponse -> () #

Eq ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

type Rep ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

type Rep ListKeysResponse = D1 ('MetaData "ListKeysResponse" "Amazonka.KMS.ListKeys" "amazonka-kms-2.0-6YhT3Ymbf9Z5PoaGoz7tbG" 'False) (C1 ('MetaCons "ListKeysResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "keys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [KeyListEntry])) :*: S1 ('MetaSel ('Just "nextMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "truncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListKeysResponse Source #

Create a value of ListKeysResponse 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:keys:ListKeysResponse', listKeysResponse_keys - A list of KMS keys.

ListKeysResponse, listKeysResponse_nextMarker - When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

ListKeysResponse, listKeysResponse_truncated - A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in thisresponse to the Marker parameter in a subsequent request.

$sel:httpStatus:ListKeysResponse', listKeysResponse_httpStatus - The response's http status code.

Response Lenses

listKeysResponse_nextMarker :: Lens' ListKeysResponse (Maybe Text) Source #

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

listKeysResponse_truncated :: Lens' ListKeysResponse (Maybe Bool) Source #

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in thisresponse to the Marker parameter in a subsequent request.

listKeysResponse_httpStatus :: Lens' ListKeysResponse Int Source #

The response's http status code.