aws_sdk_eventbridge/operation/update_connection/_update_connection_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 UpdateConnectionInput {
6 /// <p>The name of the connection to update.</p>
7 pub name: ::std::option::Option<::std::string::String>,
8 /// <p>A description for the connection.</p>
9 pub description: ::std::option::Option<::std::string::String>,
10 /// <p>The type of authorization to use for the connection.</p>
11 pub authorization_type: ::std::option::Option<crate::types::ConnectionAuthorizationType>,
12 /// <p>The authorization parameters to use for the connection.</p>
13 pub auth_parameters: ::std::option::Option<crate::types::UpdateConnectionAuthRequestParameters>,
14 /// <p>For connections to private APIs, the parameters to use for invoking the API.</p>
15 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
16 pub invocation_connectivity_parameters: ::std::option::Option<crate::types::ConnectivityResourceParameters>,
17 /// <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 connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
18 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.</p>
19 /// <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>
20 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
21}
22impl UpdateConnectionInput {
23 /// <p>The name of the connection to update.</p>
24 pub fn name(&self) -> ::std::option::Option<&str> {
25 self.name.as_deref()
26 }
27 /// <p>A description for the connection.</p>
28 pub fn description(&self) -> ::std::option::Option<&str> {
29 self.description.as_deref()
30 }
31 /// <p>The type of authorization to use for the connection.</p>
32 pub fn authorization_type(&self) -> ::std::option::Option<&crate::types::ConnectionAuthorizationType> {
33 self.authorization_type.as_ref()
34 }
35 /// <p>The authorization parameters to use for the connection.</p>
36 pub fn auth_parameters(&self) -> ::std::option::Option<&crate::types::UpdateConnectionAuthRequestParameters> {
37 self.auth_parameters.as_ref()
38 }
39 /// <p>For connections to private APIs, the parameters to use for invoking the API.</p>
40 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
41 pub fn invocation_connectivity_parameters(&self) -> ::std::option::Option<&crate::types::ConnectivityResourceParameters> {
42 self.invocation_connectivity_parameters.as_ref()
43 }
44 /// <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 connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
45 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.</p>
46 /// <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>
47 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
48 self.kms_key_identifier.as_deref()
49 }
50}
51impl UpdateConnectionInput {
52 /// Creates a new builder-style object to manufacture [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
53 pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionInputBuilder {
54 crate::operation::update_connection::builders::UpdateConnectionInputBuilder::default()
55 }
56}
57
58/// A builder for [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdateConnectionInputBuilder {
62 pub(crate) name: ::std::option::Option<::std::string::String>,
63 pub(crate) description: ::std::option::Option<::std::string::String>,
64 pub(crate) authorization_type: ::std::option::Option<crate::types::ConnectionAuthorizationType>,
65 pub(crate) auth_parameters: ::std::option::Option<crate::types::UpdateConnectionAuthRequestParameters>,
66 pub(crate) invocation_connectivity_parameters: ::std::option::Option<crate::types::ConnectivityResourceParameters>,
67 pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
68}
69impl UpdateConnectionInputBuilder {
70 /// <p>The name of the connection to update.</p>
71 /// This field is required.
72 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.name = ::std::option::Option::Some(input.into());
74 self
75 }
76 /// <p>The name of the connection to update.</p>
77 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.name = input;
79 self
80 }
81 /// <p>The name of the connection to update.</p>
82 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
83 &self.name
84 }
85 /// <p>A description for the connection.</p>
86 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.description = ::std::option::Option::Some(input.into());
88 self
89 }
90 /// <p>A description for the connection.</p>
91 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.description = input;
93 self
94 }
95 /// <p>A description for the connection.</p>
96 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
97 &self.description
98 }
99 /// <p>The type of authorization to use for the connection.</p>
100 pub fn authorization_type(mut self, input: crate::types::ConnectionAuthorizationType) -> Self {
101 self.authorization_type = ::std::option::Option::Some(input);
102 self
103 }
104 /// <p>The type of authorization to use for the connection.</p>
105 pub fn set_authorization_type(mut self, input: ::std::option::Option<crate::types::ConnectionAuthorizationType>) -> Self {
106 self.authorization_type = input;
107 self
108 }
109 /// <p>The type of authorization to use for the connection.</p>
110 pub fn get_authorization_type(&self) -> &::std::option::Option<crate::types::ConnectionAuthorizationType> {
111 &self.authorization_type
112 }
113 /// <p>The authorization parameters to use for the connection.</p>
114 pub fn auth_parameters(mut self, input: crate::types::UpdateConnectionAuthRequestParameters) -> Self {
115 self.auth_parameters = ::std::option::Option::Some(input);
116 self
117 }
118 /// <p>The authorization parameters to use for the connection.</p>
119 pub fn set_auth_parameters(mut self, input: ::std::option::Option<crate::types::UpdateConnectionAuthRequestParameters>) -> Self {
120 self.auth_parameters = input;
121 self
122 }
123 /// <p>The authorization parameters to use for the connection.</p>
124 pub fn get_auth_parameters(&self) -> &::std::option::Option<crate::types::UpdateConnectionAuthRequestParameters> {
125 &self.auth_parameters
126 }
127 /// <p>For connections to private APIs, the parameters to use for invoking the API.</p>
128 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
129 pub fn invocation_connectivity_parameters(mut self, input: crate::types::ConnectivityResourceParameters) -> Self {
130 self.invocation_connectivity_parameters = ::std::option::Option::Some(input);
131 self
132 }
133 /// <p>For connections to private APIs, the parameters to use for invoking the API.</p>
134 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
135 pub fn set_invocation_connectivity_parameters(mut self, input: ::std::option::Option<crate::types::ConnectivityResourceParameters>) -> Self {
136 self.invocation_connectivity_parameters = input;
137 self
138 }
139 /// <p>For connections to private APIs, the parameters to use for invoking the API.</p>
140 /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
141 pub fn get_invocation_connectivity_parameters(&self) -> &::std::option::Option<crate::types::ConnectivityResourceParameters> {
142 &self.invocation_connectivity_parameters
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 connection. 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 connection.</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>
147 pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.kms_key_identifier = ::std::option::Option::Some(input.into());
149 self
150 }
151 /// <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 connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
152 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.</p>
153 /// <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>
154 pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.kms_key_identifier = input;
156 self
157 }
158 /// <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 connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p>
159 /// <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.</p>
160 /// <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>
161 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
162 &self.kms_key_identifier
163 }
164 /// Consumes the builder and constructs a [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
165 pub fn build(
166 self,
167 ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
168 ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionInput {
169 name: self.name,
170 description: self.description,
171 authorization_type: self.authorization_type,
172 auth_parameters: self.auth_parameters,
173 invocation_connectivity_parameters: self.invocation_connectivity_parameters,
174 kms_key_identifier: self.kms_key_identifier,
175 })
176 }
177}