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

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

Network.AWS.KMS.GetParametersForImport

Contents

Description

Returns the items you need in order to import key material into AWS KMS from your existing key management infrastructure. For more information about importing key material into AWS KMS, see Importing Key Material in the AWS Key Management Service Developer Guide .

You must specify the key ID of the customer master key (CMK) into which you will import key material. This CMK's Origin must be EXTERNAL . You must also specify the wrapping algorithm and type of wrapping key (public key) that you will use to encrypt the key material.

This operation returns a public key and an import token. Use the public key to encrypt the key material. Store the import token to send with a subsequent ImportKeyMaterial request. The public key and import token from the same response must be used together. These items are valid for 24 hours, after which they cannot be used for a subsequent ImportKeyMaterial request. To retrieve new ones, send another GetParametersForImport request.

Synopsis

Creating a Request

getParametersForImport #

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

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

  • gpfiKeyId - The identifier of the CMK into which you will import key material. The CMK's Origin must be EXTERNAL . A valid identifier is the unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples: * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
  • gpfiWrappingAlgorithm - The algorithm you will use to encrypt the key material before importing it with ImportKeyMaterial . For more information, see Encrypt the Key Material in the AWS Key Management Service Developer Guide .
  • gpfiWrappingKeySpec - The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.

data GetParametersForImport #

See: getParametersForImport smart constructor.

Instances

Eq GetParametersForImport # 
Data GetParametersForImport # 

Methods

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

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

toConstr :: GetParametersForImport -> Constr #

dataTypeOf :: GetParametersForImport -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetParametersForImport # 
Show GetParametersForImport # 
Generic GetParametersForImport # 
Hashable GetParametersForImport # 
ToJSON GetParametersForImport # 
NFData GetParametersForImport # 

Methods

rnf :: GetParametersForImport -> () #

AWSRequest GetParametersForImport # 
ToQuery GetParametersForImport # 
ToPath GetParametersForImport # 
ToHeaders GetParametersForImport # 
type Rep GetParametersForImport # 
type Rep GetParametersForImport = D1 (MetaData "GetParametersForImport" "Network.AWS.KMS.GetParametersForImport" "amazonka-kms-1.4.5-5KQpvh5Ruw27D0B5DkiMna" False) (C1 (MetaCons "GetParametersForImport'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gpfiKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "_gpfiWrappingAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 AlgorithmSpec)) (S1 (MetaSel (Just Symbol "_gpfiWrappingKeySpec") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 WrappingKeySpec)))))
type Rs GetParametersForImport # 

Request Lenses

gpfiKeyId :: Lens' GetParametersForImport Text #

The identifier of the CMK into which you will import key material. The CMK's Origin must be EXTERNAL . A valid identifier is the unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples: * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

gpfiWrappingAlgorithm :: Lens' GetParametersForImport AlgorithmSpec #

The algorithm you will use to encrypt the key material before importing it with ImportKeyMaterial . For more information, see Encrypt the Key Material in the AWS Key Management Service Developer Guide .

gpfiWrappingKeySpec :: Lens' GetParametersForImport WrappingKeySpec #

The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.

Destructuring the Response

getParametersForImportResponse #

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

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

  • gpfirsKeyId - The identifier of the CMK to use in a subsequent ImportKeyMaterial request. This is the same CMK specified in the GetParametersForImport request.
  • gpfirsPublicKey - The public key to use to encrypt the key material before importing it with ImportKeyMaterial .-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.
  • gpfirsParametersValidTo - The time at which the import token and public key are no longer valid. After this time, you cannot use them to make an ImportKeyMaterial request and you must send another GetParametersForImport request to retrieve new ones.
  • gpfirsImportToken - The import token to send in a subsequent ImportKeyMaterial request.-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.
  • gpfirsResponseStatus - -- | The response status code.

data GetParametersForImportResponse #

See: getParametersForImportResponse smart constructor.

Instances

Eq GetParametersForImportResponse # 
Data GetParametersForImportResponse # 

Methods

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

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

toConstr :: GetParametersForImportResponse -> Constr #

dataTypeOf :: GetParametersForImportResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetParametersForImportResponse # 
Show GetParametersForImportResponse # 
Generic GetParametersForImportResponse # 
NFData GetParametersForImportResponse # 
type Rep GetParametersForImportResponse # 
type Rep GetParametersForImportResponse = D1 (MetaData "GetParametersForImportResponse" "Network.AWS.KMS.GetParametersForImport" "amazonka-kms-1.4.5-5KQpvh5Ruw27D0B5DkiMna" False) (C1 (MetaCons "GetParametersForImportResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_gpfirsKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_gpfirsPublicKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Base64))))) ((:*:) (S1 (MetaSel (Just Symbol "_gpfirsParametersValidTo") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe POSIX))) ((:*:) (S1 (MetaSel (Just Symbol "_gpfirsImportToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Base64))) (S1 (MetaSel (Just Symbol "_gpfirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))))

Response Lenses

gpfirsKeyId :: Lens' GetParametersForImportResponse (Maybe Text) #

The identifier of the CMK to use in a subsequent ImportKeyMaterial request. This is the same CMK specified in the GetParametersForImport request.

gpfirsPublicKey :: Lens' GetParametersForImportResponse (Maybe ByteString) #

The public key to use to encrypt the key material before importing it with ImportKeyMaterial .-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

gpfirsParametersValidTo :: Lens' GetParametersForImportResponse (Maybe UTCTime) #

The time at which the import token and public key are no longer valid. After this time, you cannot use them to make an ImportKeyMaterial request and you must send another GetParametersForImport request to retrieve new ones.

gpfirsImportToken :: Lens' GetParametersForImportResponse (Maybe ByteString) #

The import token to send in a subsequent ImportKeyMaterial request.-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.