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.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 # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Data GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

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 # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Show GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Generic GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Associated Types

type Rep GetKeyPolicy :: Type -> Type #

Hashable GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

ToJSON GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

AWSRequest GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Associated Types

type Rs GetKeyPolicy :: Type #

ToHeaders GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

ToPath GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

ToQuery GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

NFData GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Methods

rnf :: GetKeyPolicy -> () #

type Rep GetKeyPolicy Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

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

Defined in Network.AWS.KMS.GetKeyPolicy

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 # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Data GetKeyPolicyResponse Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

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 # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Show GetKeyPolicyResponse Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Generic GetKeyPolicyResponse Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Associated Types

type Rep GetKeyPolicyResponse :: Type -> Type #

NFData GetKeyPolicyResponse Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Methods

rnf :: GetKeyPolicyResponse -> () #

type Rep GetKeyPolicyResponse Source # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

type Rep GetKeyPolicyResponse = D1 (MetaData "GetKeyPolicyResponse" "Network.AWS.KMS.GetKeyPolicy" "amazonka-kms-1.6.1-1UDljZYfeha1jjHbbMax4v" False) (C1 (MetaCons "GetKeyPolicyResponse'" PrefixI True) (S1 (MetaSel (Just "_gkprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_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.