public class GetParametersForImportRequest extends AmazonWebServiceRequest implements java.io.Serializable
Returns the items you need to import key material into a symmetric, customer managed customer master key (CMK). For more information about importing key material into AWS KMS, see Importing Key Material in the AWS Key Management Service Developer Guide.
This operation returns a public key and an import token. Use the public key to encrypt the symmetric key material. Store the import token to send with a subsequent ImportKeyMaterial request.
You must specify the key ID of the symmetric 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. You cannot perform this
operation on an asymmetric CMK or on any CMK in a different AWS account.
To import key material, you must use the public key and import token from the
same response. These items are valid for 24 hours. The expiration date and
time appear in the GetParametersForImport
response. You cannot
use an expired token in an ImportKeyMaterial request. If your key and
token expire, send another GetParametersForImport
request.
The CMK that you use for this operation must be in a compatible key state. For details, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
Cross-account use: No. You cannot perform this operation on a CMK in a different AWS account.
Required permissions: kms:GetParametersForImport (key policy)
Related operations:
Constructor and Description |
---|
GetParametersForImportRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKeyId()
The identifier of the symmetric CMK into which you will import key
material.
|
java.lang.String |
getWrappingAlgorithm()
The algorithm you will use to encrypt the key material before importing
it with ImportKeyMaterial.
|
java.lang.String |
getWrappingKeySpec()
The type of wrapping key (public key) to return in the response.
|
int |
hashCode() |
void |
setKeyId(java.lang.String keyId)
The identifier of the symmetric CMK into which you will import key
material.
|
void |
setWrappingAlgorithm(AlgorithmSpec wrappingAlgorithm)
The algorithm you will use to encrypt the key material before importing
it with ImportKeyMaterial.
|
void |
setWrappingAlgorithm(java.lang.String wrappingAlgorithm)
The algorithm you will use to encrypt the key material before importing
it with ImportKeyMaterial.
|
void |
setWrappingKeySpec(java.lang.String wrappingKeySpec)
The type of wrapping key (public key) to return in the response.
|
void |
setWrappingKeySpec(WrappingKeySpec wrappingKeySpec)
The type of wrapping key (public key) to return in the response.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GetParametersForImportRequest |
withKeyId(java.lang.String keyId)
The identifier of the symmetric CMK into which you will import key
material.
|
GetParametersForImportRequest |
withWrappingAlgorithm(AlgorithmSpec wrappingAlgorithm)
The algorithm you will use to encrypt the key material before importing
it with ImportKeyMaterial.
|
GetParametersForImportRequest |
withWrappingAlgorithm(java.lang.String wrappingAlgorithm)
The algorithm you will use to encrypt the key material before importing
it with ImportKeyMaterial.
|
GetParametersForImportRequest |
withWrappingKeySpec(java.lang.String wrappingKeySpec)
The type of wrapping key (public key) to return in the response.
|
GetParametersForImportRequest |
withWrappingKeySpec(WrappingKeySpec wrappingKeySpec)
The type of wrapping key (public key) to return in the response.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getKeyId()
The identifier of the symmetric CMK into which you will import key
material. The Origin
of the CMK must be
EXTERNAL
.
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.
Constraints:
Length: 1 - 2048
The identifier of the symmetric CMK into which you will import
key material. The Origin
of the CMK must be
EXTERNAL
.
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.
public void setKeyId(java.lang.String keyId)
The identifier of the symmetric CMK into which you will import key
material. The Origin
of the CMK must be
EXTERNAL
.
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.
Constraints:
Length: 1 - 2048
keyId
-
The identifier of the symmetric CMK into which you will import
key material. The Origin
of the CMK must be
EXTERNAL
.
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.
public GetParametersForImportRequest withKeyId(java.lang.String keyId)
The identifier of the symmetric CMK into which you will import key
material. The Origin
of the CMK must be
EXTERNAL
.
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 2048
keyId
-
The identifier of the symmetric CMK into which you will import
key material. The Origin
of the CMK must be
EXTERNAL
.
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.
public java.lang.String getWrappingAlgorithm()
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.
Constraints:
Allowed Values: RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1,
RSAES_OAEP_SHA_256
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.
AlgorithmSpec
public void setWrappingAlgorithm(java.lang.String wrappingAlgorithm)
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.
Constraints:
Allowed Values: RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1,
RSAES_OAEP_SHA_256
wrappingAlgorithm
- 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.
AlgorithmSpec
public GetParametersForImportRequest withWrappingAlgorithm(java.lang.String wrappingAlgorithm)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1,
RSAES_OAEP_SHA_256
wrappingAlgorithm
- 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.
AlgorithmSpec
public void setWrappingAlgorithm(AlgorithmSpec wrappingAlgorithm)
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.
Constraints:
Allowed Values: RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1,
RSAES_OAEP_SHA_256
wrappingAlgorithm
- 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.
AlgorithmSpec
public GetParametersForImportRequest withWrappingAlgorithm(AlgorithmSpec wrappingAlgorithm)
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1,
RSAES_OAEP_SHA_256
wrappingAlgorithm
- 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.
AlgorithmSpec
public java.lang.String getWrappingKeySpec()
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Constraints:
Allowed Values: RSA_2048
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
WrappingKeySpec
public void setWrappingKeySpec(java.lang.String wrappingKeySpec)
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Constraints:
Allowed Values: RSA_2048
wrappingKeySpec
- The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
WrappingKeySpec
public GetParametersForImportRequest withWrappingKeySpec(java.lang.String wrappingKeySpec)
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: RSA_2048
wrappingKeySpec
- The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
WrappingKeySpec
public void setWrappingKeySpec(WrappingKeySpec wrappingKeySpec)
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Constraints:
Allowed Values: RSA_2048
wrappingKeySpec
- The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
WrappingKeySpec
public GetParametersForImportRequest withWrappingKeySpec(WrappingKeySpec wrappingKeySpec)
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: RSA_2048
wrappingKeySpec
- The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
WrappingKeySpec
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.