aws_sdk_applicationinsights/operation/update_application/
_update_application_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 UpdateApplicationInput {
6    /// <p>The name of the resource group.</p>
7    pub resource_group_name: ::std::option::Option<::std::string::String>,
8    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
9    pub ops_center_enabled: ::std::option::Option<bool>,
10    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
11    pub cwe_monitor_enabled: ::std::option::Option<bool>,
12    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
13    pub ops_item_sns_topic_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
15    pub sns_notification_arn: ::std::option::Option<::std::string::String>,
16    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
17    pub remove_sns_topic: ::std::option::Option<bool>,
18    /// <p>Turns auto-configuration on or off.</p>
19    pub auto_config_enabled: ::std::option::Option<bool>,
20    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
21    pub attach_missing_permission: ::std::option::Option<bool>,
22}
23impl UpdateApplicationInput {
24    /// <p>The name of the resource group.</p>
25    pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
26        self.resource_group_name.as_deref()
27    }
28    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
29    pub fn ops_center_enabled(&self) -> ::std::option::Option<bool> {
30        self.ops_center_enabled
31    }
32    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
33    pub fn cwe_monitor_enabled(&self) -> ::std::option::Option<bool> {
34        self.cwe_monitor_enabled
35    }
36    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
37    pub fn ops_item_sns_topic_arn(&self) -> ::std::option::Option<&str> {
38        self.ops_item_sns_topic_arn.as_deref()
39    }
40    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
41    pub fn sns_notification_arn(&self) -> ::std::option::Option<&str> {
42        self.sns_notification_arn.as_deref()
43    }
44    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
45    pub fn remove_sns_topic(&self) -> ::std::option::Option<bool> {
46        self.remove_sns_topic
47    }
48    /// <p>Turns auto-configuration on or off.</p>
49    pub fn auto_config_enabled(&self) -> ::std::option::Option<bool> {
50        self.auto_config_enabled
51    }
52    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
53    pub fn attach_missing_permission(&self) -> ::std::option::Option<bool> {
54        self.attach_missing_permission
55    }
56}
57impl UpdateApplicationInput {
58    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
59    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
60        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
61    }
62}
63
64/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct UpdateApplicationInputBuilder {
68    pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
69    pub(crate) ops_center_enabled: ::std::option::Option<bool>,
70    pub(crate) cwe_monitor_enabled: ::std::option::Option<bool>,
71    pub(crate) ops_item_sns_topic_arn: ::std::option::Option<::std::string::String>,
72    pub(crate) sns_notification_arn: ::std::option::Option<::std::string::String>,
73    pub(crate) remove_sns_topic: ::std::option::Option<bool>,
74    pub(crate) auto_config_enabled: ::std::option::Option<bool>,
75    pub(crate) attach_missing_permission: ::std::option::Option<bool>,
76}
77impl UpdateApplicationInputBuilder {
78    /// <p>The name of the resource group.</p>
79    /// This field is required.
80    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.resource_group_name = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The name of the resource group.</p>
85    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.resource_group_name = input;
87        self
88    }
89    /// <p>The name of the resource group.</p>
90    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
91        &self.resource_group_name
92    }
93    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
94    pub fn ops_center_enabled(mut self, input: bool) -> Self {
95        self.ops_center_enabled = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
99    pub fn set_ops_center_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
100        self.ops_center_enabled = input;
101        self
102    }
103    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
104    pub fn get_ops_center_enabled(&self) -> &::std::option::Option<bool> {
105        &self.ops_center_enabled
106    }
107    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
108    pub fn cwe_monitor_enabled(mut self, input: bool) -> Self {
109        self.cwe_monitor_enabled = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
113    pub fn set_cwe_monitor_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
114        self.cwe_monitor_enabled = input;
115        self
116    }
117    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
118    pub fn get_cwe_monitor_enabled(&self) -> &::std::option::Option<bool> {
119        &self.cwe_monitor_enabled
120    }
121    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
122    pub fn ops_item_sns_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.ops_item_sns_topic_arn = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
127    pub fn set_ops_item_sns_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.ops_item_sns_topic_arn = input;
129        self
130    }
131    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
132    pub fn get_ops_item_sns_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
133        &self.ops_item_sns_topic_arn
134    }
135    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
136    pub fn sns_notification_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.sns_notification_arn = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
141    pub fn set_sns_notification_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.sns_notification_arn = input;
143        self
144    }
145    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
146    pub fn get_sns_notification_arn(&self) -> &::std::option::Option<::std::string::String> {
147        &self.sns_notification_arn
148    }
149    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
150    pub fn remove_sns_topic(mut self, input: bool) -> Self {
151        self.remove_sns_topic = ::std::option::Option::Some(input);
152        self
153    }
154    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
155    pub fn set_remove_sns_topic(mut self, input: ::std::option::Option<bool>) -> Self {
156        self.remove_sns_topic = input;
157        self
158    }
159    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
160    pub fn get_remove_sns_topic(&self) -> &::std::option::Option<bool> {
161        &self.remove_sns_topic
162    }
163    /// <p>Turns auto-configuration on or off.</p>
164    pub fn auto_config_enabled(mut self, input: bool) -> Self {
165        self.auto_config_enabled = ::std::option::Option::Some(input);
166        self
167    }
168    /// <p>Turns auto-configuration on or off.</p>
169    pub fn set_auto_config_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
170        self.auto_config_enabled = input;
171        self
172    }
173    /// <p>Turns auto-configuration on or off.</p>
174    pub fn get_auto_config_enabled(&self) -> &::std::option::Option<bool> {
175        &self.auto_config_enabled
176    }
177    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
178    pub fn attach_missing_permission(mut self, input: bool) -> Self {
179        self.attach_missing_permission = ::std::option::Option::Some(input);
180        self
181    }
182    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
183    pub fn set_attach_missing_permission(mut self, input: ::std::option::Option<bool>) -> Self {
184        self.attach_missing_permission = input;
185        self
186    }
187    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
188    pub fn get_attach_missing_permission(&self) -> &::std::option::Option<bool> {
189        &self.attach_missing_permission
190    }
191    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
192    pub fn build(
193        self,
194    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
195        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
196            resource_group_name: self.resource_group_name,
197            ops_center_enabled: self.ops_center_enabled,
198            cwe_monitor_enabled: self.cwe_monitor_enabled,
199            ops_item_sns_topic_arn: self.ops_item_sns_topic_arn,
200            sns_notification_arn: self.sns_notification_arn,
201            remove_sns_topic: self.remove_sns_topic,
202            auto_config_enabled: self.auto_config_enabled,
203            attach_missing_permission: self.attach_missing_permission,
204        })
205    }
206}