#[non_exhaustive]pub struct GenerateDataKeyOutput {
pub ciphertext_blob: Option<Blob>,
pub plaintext: Option<Blob>,
pub key_id: Option<String>,
pub ciphertext_for_recipient: Option<Blob>,
/* private fields */
}
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.ciphertext_blob: Option<Blob>
The encrypted copy of the data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
plaintext: Option<Blob>
The plaintext data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.
If the response includes the CiphertextForRecipient
field, the Plaintext
field is null or empty.
key_id: Option<String>
The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.
ciphertext_for_recipient: Option<Blob>
The plaintext data key encrypted with the public key from the Nitro enclave. This ciphertext can be decrypted only by using a private key in the Nitro enclave.
This field is included in the response only when the Recipient
parameter in the request includes a valid attestation document from an Amazon Web Services Nitro enclave. For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.
Implementations§
source§impl GenerateDataKeyOutput
impl GenerateDataKeyOutput
sourcepub fn ciphertext_blob(&self) -> Option<&Blob>
pub fn ciphertext_blob(&self) -> Option<&Blob>
The encrypted copy of the data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
sourcepub fn plaintext(&self) -> Option<&Blob>
pub fn plaintext(&self) -> Option<&Blob>
The plaintext data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.
If the response includes the CiphertextForRecipient
field, the Plaintext
field is null or empty.
sourcepub fn key_id(&self) -> Option<&str>
pub fn key_id(&self) -> Option<&str>
The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.
sourcepub fn ciphertext_for_recipient(&self) -> Option<&Blob>
pub fn ciphertext_for_recipient(&self) -> Option<&Blob>
The plaintext data key encrypted with the public key from the Nitro enclave. This ciphertext can be decrypted only by using a private key in the Nitro enclave.
This field is included in the response only when the Recipient
parameter in the request includes a valid attestation document from an Amazon Web Services Nitro enclave. For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.
source§impl GenerateDataKeyOutput
impl GenerateDataKeyOutput
sourcepub fn builder() -> GenerateDataKeyOutputBuilder
pub fn builder() -> GenerateDataKeyOutputBuilder
Creates a new builder-style object to manufacture GenerateDataKeyOutput
.
Trait Implementations§
source§impl Clone for GenerateDataKeyOutput
impl Clone for GenerateDataKeyOutput
source§fn clone(&self) -> GenerateDataKeyOutput
fn clone(&self) -> GenerateDataKeyOutput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GenerateDataKeyOutput
impl Debug for GenerateDataKeyOutput
source§impl PartialEq for GenerateDataKeyOutput
impl PartialEq for GenerateDataKeyOutput
source§fn eq(&self, other: &GenerateDataKeyOutput) -> bool
fn eq(&self, other: &GenerateDataKeyOutput) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RequestId for GenerateDataKeyOutput
impl RequestId for GenerateDataKeyOutput
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.