Struct aws_sdk_kms::client::fluent_builders::GetParametersForImport
source · pub struct GetParametersForImport { /* private fields */ }
Expand description
Fluent builder constructing a request to GetParametersForImport
.
Returns the items you need to import key material into a symmetric encryption KMS key. For more information about importing key material into KMS, see Importing key material in the 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 encryption KMS key into which you will import key material. This KMS key'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 KMS key, an HMAC KMS key, or on any KMS key in a different Amazon Web Services 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 KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:GetParametersForImport (key policy)
Related operations:
-
ImportKeyMaterial
-
DeleteImportedKeyMaterial
Implementations§
source§impl GetParametersForImport
impl GetParametersForImport
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<GetParametersForImport, AwsResponseRetryClassifier>, SdkError<GetParametersForImportError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<GetParametersForImport, AwsResponseRetryClassifier>, SdkError<GetParametersForImportError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<GetParametersForImportOutput, SdkError<GetParametersForImportError>>
pub async fn send(
self
) -> Result<GetParametersForImportOutput, SdkError<GetParametersForImportError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn key_id(self, input: impl Into<String>) -> Self
pub fn key_id(self, input: impl Into<String>) -> Self
The identifier of the symmetric encryption KMS key into which you will import key material. The Origin
of the KMS key must be EXTERNAL
.
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
.
sourcepub fn set_key_id(self, input: Option<String>) -> Self
pub fn set_key_id(self, input: Option<String>) -> Self
The identifier of the symmetric encryption KMS key into which you will import key material. The Origin
of the KMS key must be EXTERNAL
.
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
.
sourcepub fn wrapping_algorithm(self, input: AlgorithmSpec) -> Self
pub fn wrapping_algorithm(self, input: AlgorithmSpec) -> Self
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 Key Management Service Developer Guide.
sourcepub fn set_wrapping_algorithm(self, input: Option<AlgorithmSpec>) -> Self
pub fn set_wrapping_algorithm(self, input: Option<AlgorithmSpec>) -> Self
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 Key Management Service Developer Guide.
sourcepub fn wrapping_key_spec(self, input: WrappingKeySpec) -> Self
pub fn wrapping_key_spec(self, input: WrappingKeySpec) -> Self
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
sourcepub fn set_wrapping_key_spec(self, input: Option<WrappingKeySpec>) -> Self
pub fn set_wrapping_key_spec(self, input: Option<WrappingKeySpec>) -> Self
The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.
Trait Implementations§
source§impl Clone for GetParametersForImport
impl Clone for GetParametersForImport
source§fn clone(&self) -> GetParametersForImport
fn clone(&self) -> GetParametersForImport
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more