Struct aws_sdk_kms::input::ImportKeyMaterialInput
source · [−]#[non_exhaustive]pub struct ImportKeyMaterialInput {
pub key_id: Option<String>,
pub import_token: Option<Blob>,
pub encrypted_key_material: Option<Blob>,
pub valid_to: Option<DateTime>,
pub expiration_model: Option<ExpirationModelType>,
}Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key_id: Option<String>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.
import_token: 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.
encrypted_key_material: 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.
valid_to: 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.
expiration_model: 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.
Implementations
sourceimpl ImportKeyMaterialInput
impl ImportKeyMaterialInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ImportKeyMaterial, AwsErrorRetryPolicy>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ImportKeyMaterial, AwsErrorRetryPolicy>, BuildError>
Consumes the builder and constructs an Operation<ImportKeyMaterial>
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ImportKeyMaterialInput
sourceimpl 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
sourceimpl Clone for ImportKeyMaterialInput
impl Clone for ImportKeyMaterialInput
sourcefn clone(&self) -> ImportKeyMaterialInput
fn clone(&self) -> ImportKeyMaterialInput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ImportKeyMaterialInput
impl Debug for ImportKeyMaterialInput
sourceimpl PartialEq<ImportKeyMaterialInput> for ImportKeyMaterialInput
impl PartialEq<ImportKeyMaterialInput> for ImportKeyMaterialInput
sourcefn eq(&self, other: &ImportKeyMaterialInput) -> bool
fn eq(&self, other: &ImportKeyMaterialInput) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ImportKeyMaterialInput) -> bool
fn ne(&self, other: &ImportKeyMaterialInput) -> bool
This method tests for !=.
impl StructuralPartialEq for ImportKeyMaterialInput
Auto Trait Implementations
impl RefUnwindSafe for ImportKeyMaterialInput
impl Send for ImportKeyMaterialInput
impl Sync for ImportKeyMaterialInput
impl Unpin for ImportKeyMaterialInput
impl UnwindSafe for ImportKeyMaterialInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more