amazonka-kms-1.6.1: 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.ListGrants

Contents

Description

Gets a list of all grants for the specified customer master key (CMK).

To perform this operation on a CMK in a different AWS account, specify the key ARN in the value of the KeyId parameter.

This operation returns paginated results.

Synopsis

Creating a Request

listGrants Source #

Arguments

:: Text

lgKeyId

-> ListGrants 

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

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

  • lgMarker - 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.
  • lgLimit - 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 100, inclusive. If you do not include a value, it defaults to 50.
  • lgKeyId - A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN. 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 ListGrants Source #

See: listGrants smart constructor.

Instances
Eq ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Data ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Methods

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

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

toConstr :: ListGrants -> Constr #

dataTypeOf :: ListGrants -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Show ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Generic ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Associated Types

type Rep ListGrants :: Type -> Type #

Hashable ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

ToJSON ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

AWSPager ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

AWSRequest ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Associated Types

type Rs ListGrants :: Type #

ToHeaders ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Methods

toHeaders :: ListGrants -> [Header] #

ToPath ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

ToQuery ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

NFData ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Methods

rnf :: ListGrants -> () #

type Rep ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

type Rep ListGrants = D1 (MetaData "ListGrants" "Network.AWS.KMS.ListGrants" "amazonka-kms-1.6.1-1UDljZYfeha1jjHbbMax4v" False) (C1 (MetaCons "ListGrants'" PrefixI True) (S1 (MetaSel (Just "_lgMarker") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_lgLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat)) :*: S1 (MetaSel (Just "_lgKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs ListGrants Source # 
Instance details

Defined in Network.AWS.KMS.ListGrants

Request Lenses

lgMarker :: Lens' ListGrants (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.

lgLimit :: Lens' ListGrants (Maybe Natural) Source #

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 100, inclusive. If you do not include a value, it defaults to 50.

lgKeyId :: Lens' ListGrants Text Source #

A unique identifier for the customer master key (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN. 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

listGrantsResponse :: ListGrantsResponse Source #

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

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

  • lgTruncated - 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.
  • lgGrants - A list of grants.
  • lgNextMarker - When Truncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent request.

data ListGrantsResponse Source #

See: listGrantsResponse smart constructor.

Instances
Eq ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

Data ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

Methods

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

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

toConstr :: ListGrantsResponse -> Constr #

dataTypeOf :: ListGrantsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

Show ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

Generic ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

Associated Types

type Rep ListGrantsResponse :: Type -> Type #

Hashable ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

FromJSON ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

NFData ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

Methods

rnf :: ListGrantsResponse -> () #

type Rep ListGrantsResponse Source # 
Instance details

Defined in Network.AWS.KMS.Types.Product

type Rep ListGrantsResponse = D1 (MetaData "ListGrantsResponse" "Network.AWS.KMS.Types.Product" "amazonka-kms-1.6.1-1UDljZYfeha1jjHbbMax4v" False) (C1 (MetaCons "ListGrantsResponse'" PrefixI True) (S1 (MetaSel (Just "_lgTruncated") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 (MetaSel (Just "_lgGrants") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [GrantListEntry])) :*: S1 (MetaSel (Just "_lgNextMarker") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))

Response Lenses

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

lgNextMarker :: Lens' ListGrantsResponse (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.