Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- getParametersForImport :: Text -> AlgorithmSpec -> WrappingKeySpec -> GetParametersForImport
- data GetParametersForImport
- gpfiKeyId :: Lens' GetParametersForImport Text
- gpfiWrappingAlgorithm :: Lens' GetParametersForImport AlgorithmSpec
- gpfiWrappingKeySpec :: Lens' GetParametersForImport WrappingKeySpec
- getParametersForImportResponse :: Int -> GetParametersForImportResponse
- data GetParametersForImportResponse
- gpfirsKeyId :: Lens' GetParametersForImportResponse (Maybe Text)
- gpfirsPublicKey :: Lens' GetParametersForImportResponse (Maybe ByteString)
- gpfirsParametersValidTo :: Lens' GetParametersForImportResponse (Maybe UTCTime)
- gpfirsImportToken :: Lens' GetParametersForImportResponse (Maybe ByteString)
- gpfirsResponseStatus :: Lens' GetParametersForImportResponse Int
Creating a Request
getParametersForImport Source #
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'sOrigin
must beEXTERNAL
. 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 withImportKeyMaterial
. 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 Source #
See: getParametersForImport
smart constructor.
Request Lenses
gpfiKeyId :: Lens' GetParametersForImport Text Source #
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 Source #
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 Source #
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Destructuring the Response
getParametersForImportResponse Source #
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 subsequentImportKeyMaterial
request. This is the same CMK specified in theGetParametersForImport
request.gpfirsPublicKey
- The public key to use to encrypt the key material before importing it withImportKeyMaterial
.-- Note: ThisLens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLens
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 anImportKeyMaterial
request and you must send anotherGetParametersForImport
request to retrieve new ones.gpfirsImportToken
- The import token to send in a subsequentImportKeyMaterial
request.-- Note: ThisLens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLens
accepts and returns only raw unencoded data.gpfirsResponseStatus
- -- | The response status code.
data GetParametersForImportResponse Source #
See: getParametersForImportResponse
smart constructor.
Response Lenses
gpfirsKeyId :: Lens' GetParametersForImportResponse (Maybe Text) Source #
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) Source #
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) Source #
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) Source #
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 :: Lens' GetParametersForImportResponse Int Source #
- - | The response status code.