Struct aws_sdk_kms::input::ImportKeyMaterialInput
source · #[non_exhaustive]pub struct ImportKeyMaterialInput { /* private fields */ }
Implementations§
source§impl ImportKeyMaterialInput
impl ImportKeyMaterialInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ImportKeyMaterial, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ImportKeyMaterial, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<ImportKeyMaterial
>
Examples found in repository?
4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ImportKeyMaterial,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ImportKeyMaterialError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// 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](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ImportKeyMaterialOutput,
aws_smithy_http::result::SdkError<crate::error::ImportKeyMaterialError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ImportKeyMaterialInput
.
source§impl ImportKeyMaterialInput
impl ImportKeyMaterialInput
sourcepub fn key_id(&self) -> Option<&str>
pub fn key_id(&self) -> Option<&str>
The identifier of the symmetric encryption KMS key that receives the imported key material. This must be the same KMS key specified in the KeyID
parameter of the corresponding GetParametersForImport
request. The Origin
of the KMS key must be EXTERNAL
. You cannot perform this operation on an asymmetric KMS key, an HMAC KMS key, a KMS key in a custom key store, or on a KMS key in a different Amazon Web Services account
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 import_token(&self) -> Option<&Blob>
pub fn import_token(&self) -> Option<&Blob>
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.
sourcepub fn encrypted_key_material(&self) -> Option<&Blob>
pub fn encrypted_key_material(&self) -> Option<&Blob>
The encrypted key material to import. The key material must be encrypted with the public wrapping key that GetParametersForImport
returned, using the wrapping algorithm that you specified in the same GetParametersForImport
request.
sourcepub fn valid_to(&self) -> Option<&DateTime>
pub fn valid_to(&self) -> Option<&DateTime>
The time at which the imported key material expires. When the key material expires, KMS deletes the key material and the KMS key becomes unusable. You must omit this parameter when the ExpirationModel
parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE
. Otherwise it is required.
sourcepub fn expiration_model(&self) -> Option<&ExpirationModelType>
pub fn expiration_model(&self) -> Option<&ExpirationModelType>
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.
Trait Implementations§
source§impl Clone for ImportKeyMaterialInput
impl Clone for ImportKeyMaterialInput
source§fn clone(&self) -> ImportKeyMaterialInput
fn clone(&self) -> ImportKeyMaterialInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more