pub struct DeleteKeyFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to DeleteKey.
Deletes the key material and all metadata associated with Amazon Web Services Payment Cryptography key.
Key deletion is irreversible. After a key is deleted, you can't perform cryptographic operations using the key. For example, you can't decrypt data that was encrypted by a deleted Amazon Web Services Payment Cryptography key, and the data may become unrecoverable. Because key deletion is destructive, Amazon Web Services Payment Cryptography has a safety mechanism to prevent accidental deletion of a key. When you call this operation, Amazon Web Services Payment Cryptography disables the specified key but doesn't delete it until after a waiting period. The default waiting period is 7 days. To set a different waiting period, set DeleteKeyInDays. During the waiting period, the KeyState is DELETE_PENDING. After the key is deleted, the KeyState is DELETE_COMPLETE.
If you delete key material, you can use ImportKey to reimport the same key material into the Amazon Web Services Payment Cryptography key.
You should delete a key only when you are sure that you don't need to use it anymore and no other parties are utilizing this key. If you aren't sure, consider deactivating it instead by calling StopKeyUsage.
Cross-account use: This operation can't be used across different Amazon Web Services accounts.
Related operations:
-
RestoreKey -
StartKeyUsage -
StopKeyUsage
Implementations§
source§impl DeleteKeyFluentBuilder
impl DeleteKeyFluentBuilder
sourcepub fn as_input(&self) -> &DeleteKeyInputBuilder
pub fn as_input(&self) -> &DeleteKeyInputBuilder
Access the DeleteKey as a reference.
sourcepub async fn send(
self
) -> Result<DeleteKeyOutput, SdkError<DeleteKeyError, HttpResponse>>
pub async fn send( self ) -> Result<DeleteKeyOutput, SdkError<DeleteKeyError, HttpResponse>>
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 customize(
self
) -> CustomizableOperation<DeleteKeyOutput, DeleteKeyError, Self>
pub fn customize( self ) -> CustomizableOperation<DeleteKeyOutput, DeleteKeyError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn key_identifier(self, input: impl Into<String>) -> Self
pub fn key_identifier(self, input: impl Into<String>) -> Self
The KeyARN of the key that is scheduled for deletion.
sourcepub fn set_key_identifier(self, input: Option<String>) -> Self
pub fn set_key_identifier(self, input: Option<String>) -> Self
The KeyARN of the key that is scheduled for deletion.
sourcepub fn get_key_identifier(&self) -> &Option<String>
pub fn get_key_identifier(&self) -> &Option<String>
The KeyARN of the key that is scheduled for deletion.
sourcepub fn delete_key_in_days(self, input: i32) -> Self
pub fn delete_key_in_days(self, input: i32) -> Self
The waiting period for key deletion. The default value is seven days.
sourcepub fn set_delete_key_in_days(self, input: Option<i32>) -> Self
pub fn set_delete_key_in_days(self, input: Option<i32>) -> Self
The waiting period for key deletion. The default value is seven days.
sourcepub fn get_delete_key_in_days(&self) -> &Option<i32>
pub fn get_delete_key_in_days(&self) -> &Option<i32>
The waiting period for key deletion. The default value is seven days.
Trait Implementations§
source§impl Clone for DeleteKeyFluentBuilder
impl Clone for DeleteKeyFluentBuilder
source§fn clone(&self) -> DeleteKeyFluentBuilder
fn clone(&self) -> DeleteKeyFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more