aws_sdk_rum/operation/update_app_monitor/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_app_monitor::_update_app_monitor_output::UpdateAppMonitorOutputBuilder;
3
4pub use crate::operation::update_app_monitor::_update_app_monitor_input::UpdateAppMonitorInputBuilder;
5
6impl crate::operation::update_app_monitor::builders::UpdateAppMonitorInputBuilder {
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_app_monitor::UpdateAppMonitorOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_app_monitor::UpdateAppMonitorError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_app_monitor();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateAppMonitor`.
24///
25/// <p>Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept.</p>
26/// <p>You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use <a href="https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html">TagResource</a>.</p>
27/// <p>To create a new app monitor, use <a href="https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html">CreateAppMonitor</a>.</p>
28/// <p>After you update an app monitor, sign in to the CloudWatch RUM console to get the updated JavaScript code snippet to add to your web application. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html">How do I find a code snippet that I've already generated?</a></p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct UpdateAppMonitorFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::update_app_monitor::builders::UpdateAppMonitorInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::update_app_monitor::UpdateAppMonitorOutput,
38 crate::operation::update_app_monitor::UpdateAppMonitorError,
39 > for UpdateAppMonitorFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::update_app_monitor::UpdateAppMonitorOutput,
47 crate::operation::update_app_monitor::UpdateAppMonitorError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl UpdateAppMonitorFluentBuilder {
54 /// Creates a new `UpdateAppMonitorFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the UpdateAppMonitor as a reference.
63 pub fn as_input(&self) -> &crate::operation::update_app_monitor::builders::UpdateAppMonitorInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::update_app_monitor::UpdateAppMonitorOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::update_app_monitor::UpdateAppMonitorError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::update_app_monitor::UpdateAppMonitor::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::update_app_monitor::UpdateAppMonitor::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::update_app_monitor::UpdateAppMonitorOutput,
100 crate::operation::update_app_monitor::UpdateAppMonitorError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// <p>The name of the app monitor to update.</p>
115 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.name(input.into());
117 self
118 }
119 /// <p>The name of the app monitor to update.</p>
120 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_name(input);
122 self
123 }
124 /// <p>The name of the app monitor to update.</p>
125 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_name()
127 }
128 /// <p>The top-level internet domain name for which your application has administrative authority.</p>
129 pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.inner = self.inner.domain(input.into());
131 self
132 }
133 /// <p>The top-level internet domain name for which your application has administrative authority.</p>
134 pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.inner = self.inner.set_domain(input);
136 self
137 }
138 /// <p>The top-level internet domain name for which your application has administrative authority.</p>
139 pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
140 self.inner.get_domain()
141 }
142 ///
143 /// Appends an item to `DomainList`.
144 ///
145 /// To override the contents of this collection use [`set_domain_list`](Self::set_domain_list).
146 ///
147 /// <p>List the domain names for which your application has administrative authority. The <code>UpdateAppMonitor</code> allows either the domain or the domain list.</p>
148 pub fn domain_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149 self.inner = self.inner.domain_list(input.into());
150 self
151 }
152 /// <p>List the domain names for which your application has administrative authority. The <code>UpdateAppMonitor</code> allows either the domain or the domain list.</p>
153 pub fn set_domain_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
154 self.inner = self.inner.set_domain_list(input);
155 self
156 }
157 /// <p>List the domain names for which your application has administrative authority. The <code>UpdateAppMonitor</code> allows either the domain or the domain list.</p>
158 pub fn get_domain_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
159 self.inner.get_domain_list()
160 }
161 /// <p>A structure that contains much of the configuration data for the app monitor. If you are using Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the Amazon Cognito identity pool to use for authorization. If you don't include <code>AppMonitorConfiguration</code>, you must set up your own authorization method. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-get-started-authorization.html">Authorize your application to send data to Amazon Web Services</a>.</p>
162 pub fn app_monitor_configuration(mut self, input: crate::types::AppMonitorConfiguration) -> Self {
163 self.inner = self.inner.app_monitor_configuration(input);
164 self
165 }
166 /// <p>A structure that contains much of the configuration data for the app monitor. If you are using Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the Amazon Cognito identity pool to use for authorization. If you don't include <code>AppMonitorConfiguration</code>, you must set up your own authorization method. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-get-started-authorization.html">Authorize your application to send data to Amazon Web Services</a>.</p>
167 pub fn set_app_monitor_configuration(mut self, input: ::std::option::Option<crate::types::AppMonitorConfiguration>) -> Self {
168 self.inner = self.inner.set_app_monitor_configuration(input);
169 self
170 }
171 /// <p>A structure that contains much of the configuration data for the app monitor. If you are using Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the Amazon Cognito identity pool to use for authorization. If you don't include <code>AppMonitorConfiguration</code>, you must set up your own authorization method. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-get-started-authorization.html">Authorize your application to send data to Amazon Web Services</a>.</p>
172 pub fn get_app_monitor_configuration(&self) -> &::std::option::Option<crate::types::AppMonitorConfiguration> {
173 self.inner.get_app_monitor_configuration()
174 }
175 /// <p>Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges.</p>
176 pub fn cw_log_enabled(mut self, input: bool) -> Self {
177 self.inner = self.inner.cw_log_enabled(input);
178 self
179 }
180 /// <p>Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges.</p>
181 pub fn set_cw_log_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
182 self.inner = self.inner.set_cw_log_enabled(input);
183 self
184 }
185 /// <p>Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges.</p>
186 pub fn get_cw_log_enabled(&self) -> &::std::option::Option<bool> {
187 self.inner.get_cw_log_enabled()
188 }
189 /// <p>Specifies whether this app monitor allows the web client to define and send custom events. The default is for custom events to be <code>DISABLED</code>.</p>
190 /// <p>For more information about custom events, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html">Send custom events</a>.</p>
191 pub fn custom_events(mut self, input: crate::types::CustomEvents) -> Self {
192 self.inner = self.inner.custom_events(input);
193 self
194 }
195 /// <p>Specifies whether this app monitor allows the web client to define and send custom events. The default is for custom events to be <code>DISABLED</code>.</p>
196 /// <p>For more information about custom events, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html">Send custom events</a>.</p>
197 pub fn set_custom_events(mut self, input: ::std::option::Option<crate::types::CustomEvents>) -> Self {
198 self.inner = self.inner.set_custom_events(input);
199 self
200 }
201 /// <p>Specifies whether this app monitor allows the web client to define and send custom events. The default is for custom events to be <code>DISABLED</code>.</p>
202 /// <p>For more information about custom events, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html">Send custom events</a>.</p>
203 pub fn get_custom_events(&self) -> &::std::option::Option<crate::types::CustomEvents> {
204 self.inner.get_custom_events()
205 }
206 /// <p>A structure that contains the configuration for how an app monitor can deobfuscate stack traces.</p>
207 pub fn deobfuscation_configuration(mut self, input: crate::types::DeobfuscationConfiguration) -> Self {
208 self.inner = self.inner.deobfuscation_configuration(input);
209 self
210 }
211 /// <p>A structure that contains the configuration for how an app monitor can deobfuscate stack traces.</p>
212 pub fn set_deobfuscation_configuration(mut self, input: ::std::option::Option<crate::types::DeobfuscationConfiguration>) -> Self {
213 self.inner = self.inner.set_deobfuscation_configuration(input);
214 self
215 }
216 /// <p>A structure that contains the configuration for how an app monitor can deobfuscate stack traces.</p>
217 pub fn get_deobfuscation_configuration(&self) -> &::std::option::Option<crate::types::DeobfuscationConfiguration> {
218 self.inner.get_deobfuscation_configuration()
219 }
220}