Class GetParametersForImportRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.kms.model.KmsRequest
-
- software.amazon.awssdk.services.kms.model.GetParametersForImportRequest
-
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<GetParametersForImportRequest.Builder,GetParametersForImportRequest>
@Generated("software.amazon.awssdk:codegen") public final class GetParametersForImportRequest extends KmsRequest implements ToCopyableBuilder<GetParametersForImportRequest.Builder,GetParametersForImportRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
GetParametersForImportRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GetParametersForImportRequest.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
String
keyId()
The identifier of the KMS key that will be associated with the imported key material.List<SdkField<?>>
sdkFields()
static Class<? extends GetParametersForImportRequest.Builder>
serializableBuilderClass()
GetParametersForImportRequest.Builder
toBuilder()
String
toString()
Returns a string representation of this object.AlgorithmSpec
wrappingAlgorithm()
The algorithm you will use with the RSA public key (PublicKey
) in the response to protect your key material during import.String
wrappingAlgorithmAsString()
The algorithm you will use with the RSA public key (PublicKey
) in the response to protect your key material during import.WrappingKeySpec
wrappingKeySpec()
The type of RSA public key to return in the response.String
wrappingKeySpecAsString()
The type of RSA public key to return in the response.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
keyId
public final String keyId()
The identifier of the KMS key that will be associated with the imported key material. The
Origin
of the KMS key must beEXTERNAL
.All KMS key types are supported, including multi-Region keys. However, you cannot import key material into a KMS key in a custom key store.
Specify the key ID or key ARN of the KMS key.
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 KMS key, use ListKeys or DescribeKey.
- Returns:
- The identifier of the KMS key that will be associated with the imported key material. The
Origin
of the KMS key must beEXTERNAL
.All KMS key types are supported, including multi-Region keys. However, you cannot import key material into a KMS key in a custom key store.
Specify the key ID or key ARN of the KMS key.
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 KMS key, use ListKeys or DescribeKey.
-
-
-
wrappingAlgorithm
public final AlgorithmSpec wrappingAlgorithm()
The algorithm you will use with the RSA public key (
PublicKey
) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.
The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.
-
RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.
-
RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.
-
RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.
If the service returns an enum value that is not available in the current SDK version,
wrappingAlgorithm
will returnAlgorithmSpec.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromwrappingAlgorithmAsString()
.- Returns:
- The algorithm you will use with the RSA public key (
PublicKey
) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.
The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.
-
RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.
-
RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.
-
RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.
-
- See Also:
AlgorithmSpec
-
-
wrappingAlgorithmAsString
public final String wrappingAlgorithmAsString()
The algorithm you will use with the RSA public key (
PublicKey
) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.
The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.
-
RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.
-
RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.
-
RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.
If the service returns an enum value that is not available in the current SDK version,
wrappingAlgorithm
will returnAlgorithmSpec.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromwrappingAlgorithmAsString()
.- Returns:
- The algorithm you will use with the RSA public key (
PublicKey
) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.
The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.
-
RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.
-
RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.
-
RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key).
You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.
-
RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not support the RSAES_PKCS1_V1_5 wrapping algorithm.
-
- See Also:
AlgorithmSpec
-
-
wrappingKeySpec
public final WrappingKeySpec wrappingKeySpec()
The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.
Use the longest RSA wrapping key that is practical.
You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.
If the service returns an enum value that is not available in the current SDK version,
wrappingKeySpec
will returnWrappingKeySpec.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromwrappingKeySpecAsString()
.- Returns:
- The type of RSA public key to return in the response. You will use this wrapping key with the specified
wrapping algorithm to protect your key material during import.
Use the longest RSA wrapping key that is practical.
You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.
- See Also:
WrappingKeySpec
-
wrappingKeySpecAsString
public final String wrappingKeySpecAsString()
The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.
Use the longest RSA wrapping key that is practical.
You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.
If the service returns an enum value that is not available in the current SDK version,
wrappingKeySpec
will returnWrappingKeySpec.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromwrappingKeySpecAsString()
.- Returns:
- The type of RSA public key to return in the response. You will use this wrapping key with the specified
wrapping algorithm to protect your key material during import.
Use the longest RSA wrapping key that is practical.
You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.
- See Also:
WrappingKeySpec
-
toBuilder
public GetParametersForImportRequest.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<GetParametersForImportRequest.Builder,GetParametersForImportRequest>
- Specified by:
toBuilder
in classKmsRequest
-
builder
public static GetParametersForImportRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends GetParametersForImportRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equals
in classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForField
in classSdkRequest
-
-