amazonka-kms-1.6.0: Amazon Key Management Service SDK.

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

Network.AWS.KMS.ListKeyPolicies

Contents

Description

Gets the names of the key policies that are attached to a customer master key (CMK). This operation is designed to get policy names that you can use in a GetKeyPolicy operation. However, the only valid policy name is default . You cannot perform this operation on a CMK in a different AWS account.

This operation returns paginated results.

Synopsis

Creating a Request

listKeyPolicies #

Creates a value of ListKeyPolicies with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • lkpMarker - 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.
  • lkpLimit - Use this parameter to specify the maximum number of items to return. When this value is present, AWS 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. Currently only 1 policy can be attached to a key.
  • lkpKeyId - A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey .

data ListKeyPolicies #

See: listKeyPolicies smart constructor.

Instances
Eq ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Data ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListKeyPolicies -> c ListKeyPolicies #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListKeyPolicies #

toConstr :: ListKeyPolicies -> Constr #

dataTypeOf :: ListKeyPolicies -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ListKeyPolicies) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListKeyPolicies) #

gmapT :: (forall b. Data b => b -> b) -> ListKeyPolicies -> ListKeyPolicies #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListKeyPolicies -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListKeyPolicies -> r #

gmapQ :: (forall d. Data d => d -> u) -> ListKeyPolicies -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ListKeyPolicies -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListKeyPolicies -> m ListKeyPolicies #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListKeyPolicies -> m ListKeyPolicies #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListKeyPolicies -> m ListKeyPolicies #

Read ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Show ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Generic ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Associated Types

type Rep ListKeyPolicies :: * -> * #

Hashable ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

ToJSON ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

AWSPager ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

AWSRequest ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Associated Types

type Rs ListKeyPolicies :: * #

ToHeaders ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

ToPath ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

ToQuery ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

NFData ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Methods

rnf :: ListKeyPolicies -> () #

type Rep ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

type Rep ListKeyPolicies = D1 (MetaData "ListKeyPolicies" "Network.AWS.KMS.ListKeyPolicies" "amazonka-kms-1.6.0-J0DpkKKCQ2By8yYSyE2w7" False) (C1 (MetaCons "ListKeyPolicies'" PrefixI True) (S1 (MetaSel (Just "_lkpMarker") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_lkpLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat)) :*: S1 (MetaSel (Just "_lkpKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs ListKeyPolicies # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Request Lenses

lkpMarker :: Lens' ListKeyPolicies (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.

lkpLimit :: Lens' ListKeyPolicies (Maybe Natural) #

Use this parameter to specify the maximum number of items to return. When this value is present, AWS 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. Currently only 1 policy can be attached to a key.

lkpKeyId :: Lens' ListKeyPolicies Text #

A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey .

Destructuring the Response

listKeyPoliciesResponse #

Creates a value of ListKeyPoliciesResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • lkprsPolicyNames - A list of key policy names. Currently, there is only one key policy per CMK and it is always named default .
  • lkprsTruncated - 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 this response to the Marker parameter in a subsequent request.
  • lkprsNextMarker - When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.
  • lkprsResponseStatus - -- | The response status code.

data ListKeyPoliciesResponse #

See: listKeyPoliciesResponse smart constructor.

Instances
Eq ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Data ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListKeyPoliciesResponse -> c ListKeyPoliciesResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListKeyPoliciesResponse #

toConstr :: ListKeyPoliciesResponse -> Constr #

dataTypeOf :: ListKeyPoliciesResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ListKeyPoliciesResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListKeyPoliciesResponse) #

gmapT :: (forall b. Data b => b -> b) -> ListKeyPoliciesResponse -> ListKeyPoliciesResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListKeyPoliciesResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListKeyPoliciesResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> ListKeyPoliciesResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ListKeyPoliciesResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListKeyPoliciesResponse -> m ListKeyPoliciesResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListKeyPoliciesResponse -> m ListKeyPoliciesResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListKeyPoliciesResponse -> m ListKeyPoliciesResponse #

Read ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Show ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Generic ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Associated Types

type Rep ListKeyPoliciesResponse :: * -> * #

NFData ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

Methods

rnf :: ListKeyPoliciesResponse -> () #

type Rep ListKeyPoliciesResponse # 
Instance details

Defined in Network.AWS.KMS.ListKeyPolicies

type Rep ListKeyPoliciesResponse = D1 (MetaData "ListKeyPoliciesResponse" "Network.AWS.KMS.ListKeyPolicies" "amazonka-kms-1.6.0-J0DpkKKCQ2By8yYSyE2w7" False) (C1 (MetaCons "ListKeyPoliciesResponse'" PrefixI True) ((S1 (MetaSel (Just "_lkprsPolicyNames") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 (MetaSel (Just "_lkprsTruncated") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 (MetaSel (Just "_lkprsNextMarker") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_lkprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text] #

A list of key policy names. Currently, there is only one key policy per CMK and it is always named default .

lkprsTruncated :: Lens' ListKeyPoliciesResponse (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 this response to the Marker parameter in a subsequent request.

lkprsNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text) #

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

lkprsResponseStatus :: Lens' ListKeyPoliciesResponse Int #

  • - | The response status code.