aws_sdk_kms/types/_xks_key_configuration_type.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key">external key </a>that is associated with a KMS key in an external key store.</p>
4/// <p>This element appears in a <code>CreateKey</code> or <code>DescribeKey</code> response only for a KMS key in an external key store.</p>
5/// <p>The <i>external key</i> is a symmetric encryption key that is hosted by an external key manager outside of Amazon Web Services. When you use the KMS key in an external key store in a cryptographic operation, the cryptographic operation is performed in the external key manager using the specified external key. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key">External key</a> in the <i>Key Management Service Developer Guide</i>.</p>
6#[non_exhaustive]
7#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
8pub struct XksKeyConfigurationType {
9    /// <p>The ID of the external key in its external key manager. This is the ID that the external key store proxy uses to identify the external key.</p>
10    pub id: ::std::option::Option<::std::string::String>,
11}
12impl XksKeyConfigurationType {
13    /// <p>The ID of the external key in its external key manager. This is the ID that the external key store proxy uses to identify the external key.</p>
14    pub fn id(&self) -> ::std::option::Option<&str> {
15        self.id.as_deref()
16    }
17}
18impl XksKeyConfigurationType {
19    /// Creates a new builder-style object to manufacture [`XksKeyConfigurationType`](crate::types::XksKeyConfigurationType).
20    pub fn builder() -> crate::types::builders::XksKeyConfigurationTypeBuilder {
21        crate::types::builders::XksKeyConfigurationTypeBuilder::default()
22    }
23}
24
25/// A builder for [`XksKeyConfigurationType`](crate::types::XksKeyConfigurationType).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct XksKeyConfigurationTypeBuilder {
29    pub(crate) id: ::std::option::Option<::std::string::String>,
30}
31impl XksKeyConfigurationTypeBuilder {
32    /// <p>The ID of the external key in its external key manager. This is the ID that the external key store proxy uses to identify the external key.</p>
33    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
34        self.id = ::std::option::Option::Some(input.into());
35        self
36    }
37    /// <p>The ID of the external key in its external key manager. This is the ID that the external key store proxy uses to identify the external key.</p>
38    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
39        self.id = input;
40        self
41    }
42    /// <p>The ID of the external key in its external key manager. This is the ID that the external key store proxy uses to identify the external key.</p>
43    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
44        &self.id
45    }
46    /// Consumes the builder and constructs a [`XksKeyConfigurationType`](crate::types::XksKeyConfigurationType).
47    pub fn build(self) -> crate::types::XksKeyConfigurationType {
48        crate::types::XksKeyConfigurationType { id: self.id }
49    }
50}