aws_sdk_eventbridge/operation/update_archive/_update_archive_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateArchiveInput {
6 /// <p>The name of the archive to update.</p>
7 pub archive_name: ::std::option::Option<::std::string::String>,
8 /// <p>The description for the archive.</p>
9 pub description: ::std::option::Option<::std::string::String>,
10 /// <p>The event pattern to use to filter events sent to the archive.</p>
11 pub event_pattern: ::std::option::Option<::std::string::String>,
12 /// <p>The number of days to retain events in the archive.</p>
13 pub retention_days: ::std::option::Option<i32>,
14 /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
15 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.</p>
16 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><important>
17 /// <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.</p>
18 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p>
19 /// </important>
20 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
21}
22impl UpdateArchiveInput {
23 /// <p>The name of the archive to update.</p>
24 pub fn archive_name(&self) -> ::std::option::Option<&str> {
25 self.archive_name.as_deref()
26 }
27 /// <p>The description for the archive.</p>
28 pub fn description(&self) -> ::std::option::Option<&str> {
29 self.description.as_deref()
30 }
31 /// <p>The event pattern to use to filter events sent to the archive.</p>
32 pub fn event_pattern(&self) -> ::std::option::Option<&str> {
33 self.event_pattern.as_deref()
34 }
35 /// <p>The number of days to retain events in the archive.</p>
36 pub fn retention_days(&self) -> ::std::option::Option<i32> {
37 self.retention_days
38 }
39 /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
40 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.</p>
41 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><important>
42 /// <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.</p>
43 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p>
44 /// </important>
45 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
46 self.kms_key_identifier.as_deref()
47 }
48}
49impl UpdateArchiveInput {
50 /// Creates a new builder-style object to manufacture [`UpdateArchiveInput`](crate::operation::update_archive::UpdateArchiveInput).
51 pub fn builder() -> crate::operation::update_archive::builders::UpdateArchiveInputBuilder {
52 crate::operation::update_archive::builders::UpdateArchiveInputBuilder::default()
53 }
54}
55
56/// A builder for [`UpdateArchiveInput`](crate::operation::update_archive::UpdateArchiveInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct UpdateArchiveInputBuilder {
60 pub(crate) archive_name: ::std::option::Option<::std::string::String>,
61 pub(crate) description: ::std::option::Option<::std::string::String>,
62 pub(crate) event_pattern: ::std::option::Option<::std::string::String>,
63 pub(crate) retention_days: ::std::option::Option<i32>,
64 pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
65}
66impl UpdateArchiveInputBuilder {
67 /// <p>The name of the archive to update.</p>
68 /// This field is required.
69 pub fn archive_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.archive_name = ::std::option::Option::Some(input.into());
71 self
72 }
73 /// <p>The name of the archive to update.</p>
74 pub fn set_archive_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.archive_name = input;
76 self
77 }
78 /// <p>The name of the archive to update.</p>
79 pub fn get_archive_name(&self) -> &::std::option::Option<::std::string::String> {
80 &self.archive_name
81 }
82 /// <p>The description for the archive.</p>
83 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.description = ::std::option::Option::Some(input.into());
85 self
86 }
87 /// <p>The description for the archive.</p>
88 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.description = input;
90 self
91 }
92 /// <p>The description for the archive.</p>
93 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
94 &self.description
95 }
96 /// <p>The event pattern to use to filter events sent to the archive.</p>
97 pub fn event_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.event_pattern = ::std::option::Option::Some(input.into());
99 self
100 }
101 /// <p>The event pattern to use to filter events sent to the archive.</p>
102 pub fn set_event_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.event_pattern = input;
104 self
105 }
106 /// <p>The event pattern to use to filter events sent to the archive.</p>
107 pub fn get_event_pattern(&self) -> &::std::option::Option<::std::string::String> {
108 &self.event_pattern
109 }
110 /// <p>The number of days to retain events in the archive.</p>
111 pub fn retention_days(mut self, input: i32) -> Self {
112 self.retention_days = ::std::option::Option::Some(input);
113 self
114 }
115 /// <p>The number of days to retain events in the archive.</p>
116 pub fn set_retention_days(mut self, input: ::std::option::Option<i32>) -> Self {
117 self.retention_days = input;
118 self
119 }
120 /// <p>The number of days to retain events in the archive.</p>
121 pub fn get_retention_days(&self) -> &::std::option::Option<i32> {
122 &self.retention_days
123 }
124 /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
125 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.</p>
126 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><important>
127 /// <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.</p>
128 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p>
129 /// </important>
130 pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.kms_key_identifier = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
135 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.</p>
136 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><important>
137 /// <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.</p>
138 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p>
139 /// </important>
140 pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.kms_key_identifier = input;
142 self
143 }
144 /// <p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
145 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.</p>
146 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><important>
147 /// <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.</p>
148 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p>
149 /// </important>
150 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
151 &self.kms_key_identifier
152 }
153 /// Consumes the builder and constructs a [`UpdateArchiveInput`](crate::operation::update_archive::UpdateArchiveInput).
154 pub fn build(
155 self,
156 ) -> ::std::result::Result<crate::operation::update_archive::UpdateArchiveInput, ::aws_smithy_types::error::operation::BuildError> {
157 ::std::result::Result::Ok(crate::operation::update_archive::UpdateArchiveInput {
158 archive_name: self.archive_name,
159 description: self.description,
160 event_pattern: self.event_pattern,
161 retention_days: self.retention_days,
162 kms_key_identifier: self.kms_key_identifier,
163 })
164 }
165}