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

Contents

Description

Gets a key policy attached to the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.

Synopsis

Creating a Request

getKeyPolicy Source #

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

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

  • gkpKeyId - 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 .
  • gkpPolicyName - Specifies the name of the key policy. The only valid name is default . To get the names of key policies, use ListKeyPolicies .

data GetKeyPolicy Source #

See: getKeyPolicy smart constructor.

Instances

Eq GetKeyPolicy Source # 
Data GetKeyPolicy Source # 

Methods

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

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

toConstr :: GetKeyPolicy -> Constr #

dataTypeOf :: GetKeyPolicy -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetKeyPolicy Source # 
Show GetKeyPolicy Source # 
Generic GetKeyPolicy Source # 

Associated Types

type Rep GetKeyPolicy :: * -> * #

Hashable GetKeyPolicy Source # 
ToJSON GetKeyPolicy Source # 
NFData GetKeyPolicy Source # 

Methods

rnf :: GetKeyPolicy -> () #

AWSRequest GetKeyPolicy Source # 
ToHeaders GetKeyPolicy Source # 
ToPath GetKeyPolicy Source # 
ToQuery GetKeyPolicy Source # 
type Rep GetKeyPolicy Source # 
type Rep GetKeyPolicy = D1 * (MetaData "GetKeyPolicy" "Network.AWS.KMS.GetKeyPolicy" "amazonka-kms-1.6.0-6a1SDMHmleyARI8mxMgB7S" False) (C1 * (MetaCons "GetKeyPolicy'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_gkpKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_gkpPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))
type Rs GetKeyPolicy Source # 

Request Lenses

gkpKeyId :: Lens' GetKeyPolicy Text Source #

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 .

gkpPolicyName :: Lens' GetKeyPolicy Text Source #

Specifies the name of the key policy. The only valid name is default . To get the names of key policies, use ListKeyPolicies .

Destructuring the Response

getKeyPolicyResponse Source #

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

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

data GetKeyPolicyResponse Source #

See: getKeyPolicyResponse smart constructor.

Instances

Eq GetKeyPolicyResponse Source # 
Data GetKeyPolicyResponse Source # 

Methods

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

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

toConstr :: GetKeyPolicyResponse -> Constr #

dataTypeOf :: GetKeyPolicyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetKeyPolicyResponse Source # 
Show GetKeyPolicyResponse Source # 
Generic GetKeyPolicyResponse Source # 
NFData GetKeyPolicyResponse Source # 

Methods

rnf :: GetKeyPolicyResponse -> () #

type Rep GetKeyPolicyResponse Source # 
type Rep GetKeyPolicyResponse = D1 * (MetaData "GetKeyPolicyResponse" "Network.AWS.KMS.GetKeyPolicy" "amazonka-kms-1.6.0-6a1SDMHmleyARI8mxMgB7S" False) (C1 * (MetaCons "GetKeyPolicyResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_gkprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_gkprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

gkprsPolicy :: Lens' GetKeyPolicyResponse (Maybe Text) Source #

A key policy document in JSON format.

gkprsResponseStatus :: Lens' GetKeyPolicyResponse Int Source #

  • - | The response status code.