aws_sdk_ssm/operation/update_ops_item/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_ops_item::_update_ops_item_output::UpdateOpsItemOutputBuilder;
3
4pub use crate::operation::update_ops_item::_update_ops_item_input::UpdateOpsItemInputBuilder;
5
6impl crate::operation::update_ops_item::builders::UpdateOpsItemInputBuilder {
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_ops_item::UpdateOpsItemOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_ops_item::UpdateOpsItemError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_ops_item();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateOpsItem`.
24///
25/// <p>Edit or change an OpsItem. You must have permission in Identity and Access Management (IAM) to update an OpsItem. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html">Set up OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
26/// <p>Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html">Amazon Web Services Systems Manager OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateOpsItemFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::update_ops_item::builders::UpdateOpsItemInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::update_ops_item::UpdateOpsItemOutput,
36 crate::operation::update_ops_item::UpdateOpsItemError,
37 > for UpdateOpsItemFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::update_ops_item::UpdateOpsItemOutput,
45 crate::operation::update_ops_item::UpdateOpsItemError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl UpdateOpsItemFluentBuilder {
52 /// Creates a new `UpdateOpsItemFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the UpdateOpsItem as a reference.
61 pub fn as_input(&self) -> &crate::operation::update_ops_item::builders::UpdateOpsItemInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::update_ops_item::UpdateOpsItemOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::update_ops_item::UpdateOpsItemError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::update_ops_item::UpdateOpsItem::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::update_ops_item::UpdateOpsItem::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::update_ops_item::UpdateOpsItemOutput,
98 crate::operation::update_ops_item::UpdateOpsItemError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p>
113 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.description(input.into());
115 self
116 }
117 /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p>
118 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_description(input);
120 self
121 }
122 /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p>
123 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_description()
125 }
126 ///
127 /// Adds a key-value pair to `OperationalData`.
128 ///
129 /// To override the contents of this collection use [`set_operational_data`](Self::set_operational_data).
130 ///
131 /// <p>Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.</p>
132 /// <p>Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.</p><important>
133 /// <p>Operational data keys <i>can't</i> begin with the following: <code>amazon</code>, <code>aws</code>, <code>amzn</code>, <code>ssm</code>, <code>/amazon</code>, <code>/aws</code>, <code>/amzn</code>, <code>/ssm</code>.</p>
134 /// </important>
135 /// <p>You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the <code>DescribeOpsItems</code> API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the <code>GetOpsItem</code> API operation).</p>
136 /// <p>Use the <code>/aws/resources</code> key in OperationalData to specify a related resource in the request. Use the <code>/aws/automations</code> key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html">Creating OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
137 pub fn operational_data(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::OpsItemDataValue) -> Self {
138 self.inner = self.inner.operational_data(k.into(), v);
139 self
140 }
141 /// <p>Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.</p>
142 /// <p>Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.</p><important>
143 /// <p>Operational data keys <i>can't</i> begin with the following: <code>amazon</code>, <code>aws</code>, <code>amzn</code>, <code>ssm</code>, <code>/amazon</code>, <code>/aws</code>, <code>/amzn</code>, <code>/ssm</code>.</p>
144 /// </important>
145 /// <p>You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the <code>DescribeOpsItems</code> API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the <code>GetOpsItem</code> API operation).</p>
146 /// <p>Use the <code>/aws/resources</code> key in OperationalData to specify a related resource in the request. Use the <code>/aws/automations</code> key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html">Creating OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
147 pub fn set_operational_data(
148 mut self,
149 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>>,
150 ) -> Self {
151 self.inner = self.inner.set_operational_data(input);
152 self
153 }
154 /// <p>Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.</p>
155 /// <p>Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.</p><important>
156 /// <p>Operational data keys <i>can't</i> begin with the following: <code>amazon</code>, <code>aws</code>, <code>amzn</code>, <code>ssm</code>, <code>/amazon</code>, <code>/aws</code>, <code>/amzn</code>, <code>/ssm</code>.</p>
157 /// </important>
158 /// <p>You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the <code>DescribeOpsItems</code> API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the <code>GetOpsItem</code> API operation).</p>
159 /// <p>Use the <code>/aws/resources</code> key in OperationalData to specify a related resource in the request. Use the <code>/aws/automations</code> key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html">Creating OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
160 pub fn get_operational_data(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>> {
161 self.inner.get_operational_data()
162 }
163 ///
164 /// Appends an item to `OperationalDataToDelete`.
165 ///
166 /// To override the contents of this collection use [`set_operational_data_to_delete`](Self::set_operational_data_to_delete).
167 ///
168 /// <p>Keys that you want to remove from the OperationalData map.</p>
169 pub fn operational_data_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.inner = self.inner.operational_data_to_delete(input.into());
171 self
172 }
173 /// <p>Keys that you want to remove from the OperationalData map.</p>
174 pub fn set_operational_data_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
175 self.inner = self.inner.set_operational_data_to_delete(input);
176 self
177 }
178 /// <p>Keys that you want to remove from the OperationalData map.</p>
179 pub fn get_operational_data_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
180 self.inner.get_operational_data_to_delete()
181 }
182 ///
183 /// Appends an item to `Notifications`.
184 ///
185 /// To override the contents of this collection use [`set_notifications`](Self::set_notifications).
186 ///
187 /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
188 pub fn notifications(mut self, input: crate::types::OpsItemNotification) -> Self {
189 self.inner = self.inner.notifications(input);
190 self
191 }
192 /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
193 pub fn set_notifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>>) -> Self {
194 self.inner = self.inner.set_notifications(input);
195 self
196 }
197 /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
198 pub fn get_notifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>> {
199 self.inner.get_notifications()
200 }
201 /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
202 pub fn priority(mut self, input: i32) -> Self {
203 self.inner = self.inner.priority(input);
204 self
205 }
206 /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
207 pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
208 self.inner = self.inner.set_priority(input);
209 self
210 }
211 /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
212 pub fn get_priority(&self) -> &::std::option::Option<i32> {
213 self.inner.get_priority()
214 }
215 ///
216 /// Appends an item to `RelatedOpsItems`.
217 ///
218 /// To override the contents of this collection use [`set_related_ops_items`](Self::set_related_ops_items).
219 ///
220 /// <p>One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
221 pub fn related_ops_items(mut self, input: crate::types::RelatedOpsItem) -> Self {
222 self.inner = self.inner.related_ops_items(input);
223 self
224 }
225 /// <p>One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
226 pub fn set_related_ops_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>>) -> Self {
227 self.inner = self.inner.set_related_ops_items(input);
228 self
229 }
230 /// <p>One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.</p>
231 pub fn get_related_ops_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>> {
232 self.inner.get_related_ops_items()
233 }
234 /// <p>The OpsItem status. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing OpsItem details</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
235 pub fn status(mut self, input: crate::types::OpsItemStatus) -> Self {
236 self.inner = self.inner.status(input);
237 self
238 }
239 /// <p>The OpsItem status. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing OpsItem details</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
240 pub fn set_status(mut self, input: ::std::option::Option<crate::types::OpsItemStatus>) -> Self {
241 self.inner = self.inner.set_status(input);
242 self
243 }
244 /// <p>The OpsItem status. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html">Editing OpsItem details</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
245 pub fn get_status(&self) -> &::std::option::Option<crate::types::OpsItemStatus> {
246 self.inner.get_status()
247 }
248 /// <p>The ID of the OpsItem.</p>
249 pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250 self.inner = self.inner.ops_item_id(input.into());
251 self
252 }
253 /// <p>The ID of the OpsItem.</p>
254 pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255 self.inner = self.inner.set_ops_item_id(input);
256 self
257 }
258 /// <p>The ID of the OpsItem.</p>
259 pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
260 self.inner.get_ops_item_id()
261 }
262 /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
263 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264 self.inner = self.inner.title(input.into());
265 self
266 }
267 /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
268 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.inner = self.inner.set_title(input);
270 self
271 }
272 /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
273 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
274 self.inner.get_title()
275 }
276 /// <p>Specify a new category for an OpsItem.</p>
277 pub fn category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278 self.inner = self.inner.category(input.into());
279 self
280 }
281 /// <p>Specify a new category for an OpsItem.</p>
282 pub fn set_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283 self.inner = self.inner.set_category(input);
284 self
285 }
286 /// <p>Specify a new category for an OpsItem.</p>
287 pub fn get_category(&self) -> &::std::option::Option<::std::string::String> {
288 self.inner.get_category()
289 }
290 /// <p>Specify a new severity for an OpsItem.</p>
291 pub fn severity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292 self.inner = self.inner.severity(input.into());
293 self
294 }
295 /// <p>Specify a new severity for an OpsItem.</p>
296 pub fn set_severity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
297 self.inner = self.inner.set_severity(input);
298 self
299 }
300 /// <p>Specify a new severity for an OpsItem.</p>
301 pub fn get_severity(&self) -> &::std::option::Option<::std::string::String> {
302 self.inner.get_severity()
303 }
304 /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
305 pub fn actual_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
306 self.inner = self.inner.actual_start_time(input);
307 self
308 }
309 /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
310 pub fn set_actual_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
311 self.inner = self.inner.set_actual_start_time(input);
312 self
313 }
314 /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
315 pub fn get_actual_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
316 self.inner.get_actual_start_time()
317 }
318 /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
319 pub fn actual_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
320 self.inner = self.inner.actual_end_time(input);
321 self
322 }
323 /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
324 pub fn set_actual_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
325 self.inner = self.inner.set_actual_end_time(input);
326 self
327 }
328 /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
329 pub fn get_actual_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
330 self.inner.get_actual_end_time()
331 }
332 /// <p>The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
333 pub fn planned_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
334 self.inner = self.inner.planned_start_time(input);
335 self
336 }
337 /// <p>The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
338 pub fn set_planned_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
339 self.inner = self.inner.set_planned_start_time(input);
340 self
341 }
342 /// <p>The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
343 pub fn get_planned_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
344 self.inner.get_planned_start_time()
345 }
346 /// <p>The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
347 pub fn planned_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
348 self.inner = self.inner.planned_end_time(input);
349 self
350 }
351 /// <p>The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
352 pub fn set_planned_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
353 self.inner = self.inner.set_planned_end_time(input);
354 self
355 }
356 /// <p>The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type <code>/aws/changerequest</code>.</p>
357 pub fn get_planned_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
358 self.inner.get_planned_end_time()
359 }
360 /// <p>The OpsItem Amazon Resource Name (ARN).</p>
361 pub fn ops_item_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
362 self.inner = self.inner.ops_item_arn(input.into());
363 self
364 }
365 /// <p>The OpsItem Amazon Resource Name (ARN).</p>
366 pub fn set_ops_item_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367 self.inner = self.inner.set_ops_item_arn(input);
368 self
369 }
370 /// <p>The OpsItem Amazon Resource Name (ARN).</p>
371 pub fn get_ops_item_arn(&self) -> &::std::option::Option<::std::string::String> {
372 self.inner.get_ops_item_arn()
373 }
374}