1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateKmsKeyInput {
/// <p>The name of the log group.</p>
#[doc(hidden)]
pub log_group_name: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms">Amazon Resource Names</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a>.</p>
#[doc(hidden)]
pub kms_key_id: std::option::Option<std::string::String>,
}
impl AssociateKmsKeyInput {
/// <p>The name of the log group.</p>
pub fn log_group_name(&self) -> std::option::Option<&str> {
self.log_group_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms">Amazon Resource Names</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a>.</p>
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
}
impl AssociateKmsKeyInput {
/// Creates a new builder-style object to manufacture [`AssociateKmsKeyInput`](crate::operation::associate_kms_key::AssociateKmsKeyInput).
pub fn builder() -> crate::operation::associate_kms_key::builders::AssociateKmsKeyInputBuilder {
crate::operation::associate_kms_key::builders::AssociateKmsKeyInputBuilder::default()
}
}
/// A builder for [`AssociateKmsKeyInput`](crate::operation::associate_kms_key::AssociateKmsKeyInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct AssociateKmsKeyInputBuilder {
pub(crate) log_group_name: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
}
impl AssociateKmsKeyInputBuilder {
/// <p>The name of the log group.</p>
pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.log_group_name = Some(input.into());
self
}
/// <p>The name of the log group.</p>
pub fn set_log_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.log_group_name = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms">Amazon Resource Names</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a>.</p>
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms">Amazon Resource Names</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric Keys</a>.</p>
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
/// Consumes the builder and constructs a [`AssociateKmsKeyInput`](crate::operation::associate_kms_key::AssociateKmsKeyInput).
pub fn build(
self,
) -> Result<
crate::operation::associate_kms_key::AssociateKmsKeyInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::associate_kms_key::AssociateKmsKeyInput {
log_group_name: self.log_group_name,
kms_key_id: self.kms_key_id,
})
}
}