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 #

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 #

See: getKeyPolicy smart constructor.

Instances
Eq GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

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

Defined in Network.AWS.KMS.GetKeyPolicy

Show GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Generic GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Associated Types

type Rep GetKeyPolicy :: * -> * #

Hashable GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

ToJSON GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

AWSRequest GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Associated Types

type Rs GetKeyPolicy :: * #

ToHeaders GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

ToPath GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

ToQuery GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

NFData GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Methods

rnf :: GetKeyPolicy -> () #

type Rep GetKeyPolicy # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

type Rep GetKeyPolicy = D1 (MetaData "GetKeyPolicy" "Network.AWS.KMS.GetKeyPolicy" "amazonka-kms-1.6.0-J0DpkKKCQ2By8yYSyE2w7" 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 # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Request Lenses

gkpKeyId :: Lens' GetKeyPolicy 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 .

gkpPolicyName :: Lens' GetKeyPolicy Text #

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 #

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 #

See: getKeyPolicyResponse smart constructor.

Instances
Eq GetKeyPolicyResponse # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

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

Defined in Network.AWS.KMS.GetKeyPolicy

Show GetKeyPolicyResponse # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Generic GetKeyPolicyResponse # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Associated Types

type Rep GetKeyPolicyResponse :: * -> * #

NFData GetKeyPolicyResponse # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

Methods

rnf :: GetKeyPolicyResponse -> () #

type Rep GetKeyPolicyResponse # 
Instance details

Defined in Network.AWS.KMS.GetKeyPolicy

type Rep GetKeyPolicyResponse = D1 (MetaData "GetKeyPolicyResponse" "Network.AWS.KMS.GetKeyPolicy" "amazonka-kms-1.6.0-J0DpkKKCQ2By8yYSyE2w7" 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) #

A key policy document in JSON format.

gkprsResponseStatus :: Lens' GetKeyPolicyResponse Int #

  • - | The response status code.