libZSservicesZSamazonka-kmsZSamazonka-kms
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • 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.

  • 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.

Instances

Instances details
Eq ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Read ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Show ListKeys Source # 
Instance details

Defined in Amazonka.KMS.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 #

NFData ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

rnf :: ListKeys -> () #

Hashable ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

hashWithSalt :: Int -> ListKeys -> Int #

hash :: ListKeys -> Int #

ToJSON 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 #

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

type Rep ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

type Rep ListKeys = D1 ('MetaData "ListKeys" "Amazonka.KMS.ListKeys" "libZSservicesZSamazonka-kmsZSamazonka-kms" 'False) (C1 ('MetaCons "ListKeys'" 'PrefixI 'True) (S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))))
type AWSResponse ListKeys Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

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: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.

$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.

Request Lenses

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.

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.

Destructuring the Response

data ListKeysResponse Source #

See: newListKeysResponse smart constructor.

Constructors

ListKeysResponse' 

Fields

  • 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.

  • 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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Read ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Show ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Generic ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Associated Types

type Rep ListKeysResponse :: Type -> Type #

NFData ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

Methods

rnf :: ListKeysResponse -> () #

type Rep ListKeysResponse Source # 
Instance details

Defined in Amazonka.KMS.ListKeys

type Rep ListKeysResponse = D1 ('MetaData "ListKeysResponse" "Amazonka.KMS.ListKeys" "libZSservicesZSamazonka-kmsZSamazonka-kms" 'False) (C1 ('MetaCons "ListKeysResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "truncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "keys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [KeyListEntry]))) :*: (S1 ('MetaSel ('Just "nextMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: 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:truncated: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:keys:ListKeysResponse', listKeysResponse_keys - A list of KMS keys.

$sel:nextMarker: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.

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

Response Lenses

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_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_httpStatus :: Lens' ListKeysResponse Int Source #

The response's http status code.