Struct aws_sdk_kms::operation::get_public_key::GetPublicKeyOutput
source · #[non_exhaustive]pub struct GetPublicKeyOutput {
pub key_id: Option<String>,
pub public_key: Option<Blob>,
pub customer_master_key_spec: Option<CustomerMasterKeySpec>,
pub key_spec: Option<KeySpec>,
pub key_usage: Option<KeyUsageType>,
pub encryption_algorithms: Option<Vec<EncryptionAlgorithmSpec>>,
pub signing_algorithms: Option<Vec<SigningAlgorithmSpec>>,
/* 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.key_id: Option<String>
The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.
public_key: Option<Blob>
The exported public key.
The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo
(SPKI), as defined in RFC 5280. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
customer_master_key_spec: Option<CustomerMasterKeySpec>
Instead, use the KeySpec
field in the GetPublicKey
response.
The KeySpec
and CustomerMasterKeySpec
fields have the same value. We recommend that you use the KeySpec
field in your code. However, to avoid breaking changes, KMS supports both fields.
key_spec: Option<KeySpec>
The type of the of the public key that was downloaded.
key_usage: Option<KeyUsageType>
The permitted use of the public key. Valid values are ENCRYPT_DECRYPT
or SIGN_VERIFY
.
This information is critical. If a public key with SIGN_VERIFY
key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.
encryption_algorithms: Option<Vec<EncryptionAlgorithmSpec>>
The encryption algorithms that KMS supports for this key.
This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the KeyUsage
of the public key is ENCRYPT_DECRYPT
.
signing_algorithms: Option<Vec<SigningAlgorithmSpec>>
The signing algorithms that KMS supports for this key.
This field appears in the response only when the KeyUsage
of the public key is SIGN_VERIFY
.
Implementations§
source§impl GetPublicKeyOutput
impl GetPublicKeyOutput
sourcepub fn key_id(&self) -> Option<&str>
pub fn key_id(&self) -> Option<&str>
The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.
sourcepub fn public_key(&self) -> Option<&Blob>
pub fn public_key(&self) -> Option<&Blob>
The exported public key.
The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo
(SPKI), as defined in RFC 5280. 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 customer_master_key_spec(&self) -> Option<&CustomerMasterKeySpec>
👎Deprecated: This field has been deprecated. Instead, use the KeySpec field.
pub fn customer_master_key_spec(&self) -> Option<&CustomerMasterKeySpec>
Instead, use the KeySpec
field in the GetPublicKey
response.
The KeySpec
and CustomerMasterKeySpec
fields have the same value. We recommend that you use the KeySpec
field in your code. However, to avoid breaking changes, KMS supports both fields.
sourcepub fn key_spec(&self) -> Option<&KeySpec>
pub fn key_spec(&self) -> Option<&KeySpec>
The type of the of the public key that was downloaded.
sourcepub fn key_usage(&self) -> Option<&KeyUsageType>
pub fn key_usage(&self) -> Option<&KeyUsageType>
The permitted use of the public key. Valid values are ENCRYPT_DECRYPT
or SIGN_VERIFY
.
This information is critical. If a public key with SIGN_VERIFY
key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.
sourcepub fn encryption_algorithms(&self) -> &[EncryptionAlgorithmSpec]
pub fn encryption_algorithms(&self) -> &[EncryptionAlgorithmSpec]
The encryption algorithms that KMS supports for this key.
This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the KeyUsage
of the public key is ENCRYPT_DECRYPT
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .encryption_algorithms.is_none()
.
sourcepub fn signing_algorithms(&self) -> &[SigningAlgorithmSpec]
pub fn signing_algorithms(&self) -> &[SigningAlgorithmSpec]
The signing algorithms that KMS supports for this key.
This field appears in the response only when the KeyUsage
of the public key is SIGN_VERIFY
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .signing_algorithms.is_none()
.
source§impl GetPublicKeyOutput
impl GetPublicKeyOutput
sourcepub fn builder() -> GetPublicKeyOutputBuilder
pub fn builder() -> GetPublicKeyOutputBuilder
Creates a new builder-style object to manufacture GetPublicKeyOutput
.
Trait Implementations§
source§impl Clone for GetPublicKeyOutput
impl Clone for GetPublicKeyOutput
source§fn clone(&self) -> GetPublicKeyOutput
fn clone(&self) -> GetPublicKeyOutput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GetPublicKeyOutput
impl Debug for GetPublicKeyOutput
source§impl PartialEq for GetPublicKeyOutput
impl PartialEq for GetPublicKeyOutput
source§fn eq(&self, other: &GetPublicKeyOutput) -> bool
fn eq(&self, other: &GetPublicKeyOutput) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RequestId for GetPublicKeyOutput
impl RequestId for GetPublicKeyOutput
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.