@Generated(value="software.amazon.awssdk:codegen") public class ImportKeyMaterialRequest extends KMSRequest implements ToCopyableBuilder<ImportKeyMaterialRequest.Builder,ImportKeyMaterialRequest>
| Modifier and Type | Class and Description |
|---|---|
static interface |
ImportKeyMaterialRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ImportKeyMaterialRequest.Builder |
builder() |
ByteBuffer |
encryptedKeyMaterial()
The encrypted key material to import.
|
boolean |
equals(Object obj) |
ExpirationModelType |
expirationModel()
Specifies whether the key material expires.
|
String |
expirationModelAsString()
Specifies whether the key material expires.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest. |
int |
hashCode() |
ByteBuffer |
importToken()
The import token that you received in the response to a previous GetParametersForImport request.
|
String |
keyId()
The identifier of the CMK to import the key material into.
|
static Class<? extends ImportKeyMaterialRequest.Builder> |
serializableBuilderClass() |
ImportKeyMaterialRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
Instant |
validTo()
The time at which the imported key material expires.
|
requestOverrideConfigcopypublic String keyId()
The identifier of the CMK to import the key material into. The CMK's Origin 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.
Origin 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 ByteBuffer importToken()
The import token that you received in the response to a previous GetParametersForImport request. It must be from the same response that contained the public key that you used to encrypt the key material.
This method will return a new read-only ByteBuffer each time it is invoked.
public ByteBuffer encryptedKeyMaterial()
The encrypted key material to import. It must be encrypted with the public key that you received in the response to a previous GetParametersForImport request, using the wrapping algorithm that you specified in that request.
This method will return a new read-only ByteBuffer each time it is invoked.
public Instant validTo()
The time at which the imported key material expires. When the key material expires, AWS KMS deletes the key
material and the CMK becomes unusable. You must omit this parameter when the ExpirationModel
parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE. Otherwise it is required.
ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE. Otherwise it
is required.public ExpirationModelType expirationModel()
Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES, in which case you
must include the ValidTo parameter. When this parameter is set to
KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.
If the service returns an enum value that is not available in the current SDK version, expirationModel
will return ExpirationModelType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is
available from expirationModelAsString().
KEY_MATERIAL_EXPIRES, in which
case you must include the ValidTo parameter. When this parameter is set to
KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.ExpirationModelTypepublic String expirationModelAsString()
Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES, in which case you
must include the ValidTo parameter. When this parameter is set to
KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.
If the service returns an enum value that is not available in the current SDK version, expirationModel
will return ExpirationModelType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is
available from expirationModelAsString().
KEY_MATERIAL_EXPIRES, in which
case you must include the ValidTo parameter. When this parameter is set to
KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.ExpirationModelTypepublic ImportKeyMaterialRequest.Builder toBuilder()
ToCopyableBuildertoBuilder in interface ToCopyableBuilder<ImportKeyMaterialRequest.Builder,ImportKeyMaterialRequest>toBuilder in class KMSRequestpublic static ImportKeyMaterialRequest.Builder builder()
public static Class<? extends ImportKeyMaterialRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequestSdkRequest. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will
again be available.getValueForField in class SdkRequestfieldName - The name of the member to be retrieved.clazz - The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.