aws_sdk_aiops/operation/update_investigation_group/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_investigation_group::_update_investigation_group_output::UpdateInvestigationGroupOutputBuilder;
3
4pub use crate::operation::update_investigation_group::_update_investigation_group_input::UpdateInvestigationGroupInputBuilder;
5
6impl crate::operation::update_investigation_group::builders::UpdateInvestigationGroupInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_investigation_group::UpdateInvestigationGroupOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_investigation_group::UpdateInvestigationGroupError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_investigation_group();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateInvestigationGroup`.
24///
25/// <p>Updates the configuration of the specified investigation group.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateInvestigationGroupFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::update_investigation_group::builders::UpdateInvestigationGroupInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::update_investigation_group::UpdateInvestigationGroupOutput,
35 crate::operation::update_investigation_group::UpdateInvestigationGroupError,
36 > for UpdateInvestigationGroupFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::update_investigation_group::UpdateInvestigationGroupOutput,
44 crate::operation::update_investigation_group::UpdateInvestigationGroupError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl UpdateInvestigationGroupFluentBuilder {
51 /// Creates a new `UpdateInvestigationGroupFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the UpdateInvestigationGroup as a reference.
60 pub fn as_input(&self) -> &crate::operation::update_investigation_group::builders::UpdateInvestigationGroupInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::update_investigation_group::UpdateInvestigationGroupOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::update_investigation_group::UpdateInvestigationGroupError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::update_investigation_group::UpdateInvestigationGroup::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::update_investigation_group::UpdateInvestigationGroup::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::update_investigation_group::UpdateInvestigationGroupOutput,
97 crate::operation::update_investigation_group::UpdateInvestigationGroupError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>Specify either the name or the ARN of the investigation group that you want to modify.</p>
112 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.identifier(input.into());
114 self
115 }
116 /// <p>Specify either the name or the ARN of the investigation group that you want to modify.</p>
117 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_identifier(input);
119 self
120 }
121 /// <p>Specify either the name or the ARN of the investigation group that you want to modify.</p>
122 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_identifier()
124 }
125 /// <p>Specify this field if you want to change the IAM role that CloudWatch investigations will use when it gathers investigation data. To do so, specify the ARN of the new role.</p>
126 /// <p>The permissions in this role determine which of your resources that CloudWatch investigations will have access to during investigations.</p>
127 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Investigations-Security.html#Investigations-Security-Data">How to control what data CloudWatch investigations has access to during investigations</a>.</p>
128 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.role_arn(input.into());
130 self
131 }
132 /// <p>Specify this field if you want to change the IAM role that CloudWatch investigations will use when it gathers investigation data. To do so, specify the ARN of the new role.</p>
133 /// <p>The permissions in this role determine which of your resources that CloudWatch investigations will have access to during investigations.</p>
134 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Investigations-Security.html#Investigations-Security-Data">How to control what data CloudWatch investigations has access to during investigations</a>.</p>
135 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.inner = self.inner.set_role_arn(input);
137 self
138 }
139 /// <p>Specify this field if you want to change the IAM role that CloudWatch investigations will use when it gathers investigation data. To do so, specify the ARN of the new role.</p>
140 /// <p>The permissions in this role determine which of your resources that CloudWatch investigations will have access to during investigations.</p>
141 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Investigations-Security.html#Investigations-Security-Data">How to control what data CloudWatch investigations has access to during investigations</a>.</p>
142 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
143 self.inner.get_role_arn()
144 }
145 /// <p>Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, CloudWatch investigations will use an Amazon Web Services key to encrypt the data. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Investigations-Security.html#Investigations-KMS">Encryption of investigation data</a>.</p>
146 pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
147 self.inner = self.inner.encryption_configuration(input);
148 self
149 }
150 /// <p>Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, CloudWatch investigations will use an Amazon Web Services key to encrypt the data. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Investigations-Security.html#Investigations-KMS">Encryption of investigation data</a>.</p>
151 pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
152 self.inner = self.inner.set_encryption_configuration(input);
153 self
154 }
155 /// <p>Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, CloudWatch investigations will use an Amazon Web Services key to encrypt the data. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Investigations-Security.html#Investigations-KMS">Encryption of investigation data</a>.</p>
156 pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
157 self.inner.get_encryption_configuration()
158 }
159 ///
160 /// Appends an item to `tagKeyBoundaries`.
161 ///
162 /// To override the contents of this collection use [`set_tag_key_boundaries`](Self::set_tag_key_boundaries).
163 ///
164 /// <p>Enter the existing custom tag keys for custom applications in your system. Resource tags help CloudWatch investigations narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, CloudWatch investigations can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, CloudWatch investigations will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by CloudWatch investigations in these cases.</p>
165 /// <p>You don't need to enter tags created by myApplications or CloudFormation, because CloudWatch investigations can automatically detect those tags.</p>
166 pub fn tag_key_boundaries(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.inner = self.inner.tag_key_boundaries(input.into());
168 self
169 }
170 /// <p>Enter the existing custom tag keys for custom applications in your system. Resource tags help CloudWatch investigations narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, CloudWatch investigations can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, CloudWatch investigations will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by CloudWatch investigations in these cases.</p>
171 /// <p>You don't need to enter tags created by myApplications or CloudFormation, because CloudWatch investigations can automatically detect those tags.</p>
172 pub fn set_tag_key_boundaries(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
173 self.inner = self.inner.set_tag_key_boundaries(input);
174 self
175 }
176 /// <p>Enter the existing custom tag keys for custom applications in your system. Resource tags help CloudWatch investigations narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, CloudWatch investigations can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, CloudWatch investigations will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by CloudWatch investigations in these cases.</p>
177 /// <p>You don't need to enter tags created by myApplications or CloudFormation, because CloudWatch investigations can automatically detect those tags.</p>
178 pub fn get_tag_key_boundaries(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
179 self.inner.get_tag_key_boundaries()
180 }
181 ///
182 /// Adds a key-value pair to `chatbotNotificationChannel`.
183 ///
184 /// To override the contents of this collection use [`set_chatbot_notification_channel`](Self::set_chatbot_notification_channel).
185 ///
186 /// <p>Use this structure to integrate CloudWatch investigations with chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/getting-started.html">Getting started with Amazon Q in chat applications</a> and <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awschatbot.html#awschatbot-resources-for-iam-policies">Resource type defined by Amazon Web Services Chatbot</a>.</p>
187 pub fn chatbot_notification_channel(
188 mut self,
189 k: impl ::std::convert::Into<::std::string::String>,
190 v: ::std::vec::Vec<::std::string::String>,
191 ) -> Self {
192 self.inner = self.inner.chatbot_notification_channel(k.into(), v);
193 self
194 }
195 /// <p>Use this structure to integrate CloudWatch investigations with chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/getting-started.html">Getting started with Amazon Q in chat applications</a> and <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awschatbot.html#awschatbot-resources-for-iam-policies">Resource type defined by Amazon Web Services Chatbot</a>.</p>
196 pub fn set_chatbot_notification_channel(
197 mut self,
198 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
199 ) -> Self {
200 self.inner = self.inner.set_chatbot_notification_channel(input);
201 self
202 }
203 /// <p>Use this structure to integrate CloudWatch investigations with chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/getting-started.html">Getting started with Amazon Q in chat applications</a> and <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awschatbot.html#awschatbot-resources-for-iam-policies">Resource type defined by Amazon Web Services Chatbot</a>.</p>
204 pub fn get_chatbot_notification_channel(
205 &self,
206 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
207 self.inner.get_chatbot_notification_channel()
208 }
209 /// <p>Specify <code>true</code> to enable CloudWatch investigations to have access to change events that are recorded by CloudTrail. The default is <code>true</code>.</p>
210 pub fn is_cloud_trail_event_history_enabled(mut self, input: bool) -> Self {
211 self.inner = self.inner.is_cloud_trail_event_history_enabled(input);
212 self
213 }
214 /// <p>Specify <code>true</code> to enable CloudWatch investigations to have access to change events that are recorded by CloudTrail. The default is <code>true</code>.</p>
215 pub fn set_is_cloud_trail_event_history_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
216 self.inner = self.inner.set_is_cloud_trail_event_history_enabled(input);
217 self
218 }
219 /// <p>Specify <code>true</code> to enable CloudWatch investigations to have access to change events that are recorded by CloudTrail. The default is <code>true</code>.</p>
220 pub fn get_is_cloud_trail_event_history_enabled(&self) -> &::std::option::Option<bool> {
221 self.inner.get_is_cloud_trail_event_history_enabled()
222 }
223 ///
224 /// Appends an item to `crossAccountConfigurations`.
225 ///
226 /// To override the contents of this collection use [`set_cross_account_configurations`](Self::set_cross_account_configurations).
227 ///
228 /// <p>Used to configure cross-account access for an investigation group. It allows the investigation group to access resources in other accounts.</p>
229 pub fn cross_account_configurations(mut self, input: crate::types::CrossAccountConfiguration) -> Self {
230 self.inner = self.inner.cross_account_configurations(input);
231 self
232 }
233 /// <p>Used to configure cross-account access for an investigation group. It allows the investigation group to access resources in other accounts.</p>
234 pub fn set_cross_account_configurations(
235 mut self,
236 input: ::std::option::Option<::std::vec::Vec<crate::types::CrossAccountConfiguration>>,
237 ) -> Self {
238 self.inner = self.inner.set_cross_account_configurations(input);
239 self
240 }
241 /// <p>Used to configure cross-account access for an investigation group. It allows the investigation group to access resources in other accounts.</p>
242 pub fn get_cross_account_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CrossAccountConfiguration>> {
243 self.inner.get_cross_account_configurations()
244 }
245}