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)]
|
5 + | pub struct CreateOpsItemInput {
|
6 + | /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p><note>
|
7 + | /// <p>Provide enough information so that users viewing this OpsItem for the first time understand the issue.</p>
|
8 + | /// </note>
|
9 + | pub description: ::std::option::Option<::std::string::String>,
|
10 + | /// <p>The type of OpsItem to create. Systems Manager supports the following types of OpsItems:</p>
|
11 + | /// <ul>
|
12 + | /// <li>
|
13 + | /// <p><code>/aws/issue</code></p>
|
14 + | /// <p>This type of OpsItem is used for default OpsItems created by OpsCenter.</p></li>
|
15 + | /// <li>
|
16 + | /// <p><code>/aws/insight</code></p>
|
17 + | /// <p>This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.</p></li>
|
18 + | /// <li>
|
19 + | /// <p><code>/aws/changerequest</code></p>
|
20 + | /// <p>This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.</p><important>
|
21 + | /// <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
|
22 + | /// </important></li>
|
23 + | /// </ul>
|
24 + | pub ops_item_type: ::std::option::Option<::std::string::String>,
|
25 + | /// <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>
|
26 + | /// <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>
|
27 + | /// </important>
|
28 + | /// <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>
|
29 + | /// <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">Create OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
30 + | pub operational_data: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>>,
|
31 + | /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
|
32 + | pub notifications: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>>,
|
33 + | /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
|
34 + | pub priority: ::std::option::Option<i32>,
|
35 + | /// <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>
|
36 + | pub related_ops_items: ::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>>,
|
37 + | /// <p>The origin of the OpsItem, such as Amazon EC2 or Systems Manager.</p><note>
|
38 + | /// <p>The source name can't contain the following strings: <code>aws</code>, <code>amazon</code>, and <code>amzn</code>.</p>
|
39 + | /// </note>
|
40 + | pub source: ::std::option::Option<::std::string::String>,
|
41 + | /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
|
42 + | pub title: ::std::option::Option<::std::string::String>,
|
43 + | /// <p>Optional metadata that you assign to a resource.</p>
|
44 + | /// <p>Tags use a key-value pair. For example:</p>
|
45 + | /// <p><code>Key=Department,Value=Finance</code></p><important>
|
46 + | /// <p>To add tags to a new OpsItem, a user must have IAM permissions for both the <code>ssm:CreateOpsItems</code> operation and the <code>ssm:AddTagsToResource</code> operation. To add tags to an existing OpsItem, use the <code>AddTagsToResource</code> operation.</p>
|
47 + | /// </important>
|
48 + | pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
49 + | /// <p>Specify a category to assign to an OpsItem.</p>
|
50 + | pub category: ::std::option::Option<::std::string::String>,
|
51 + | /// <p>Specify a severity to assign to an OpsItem.</p>
|
52 + | pub severity: ::std::option::Option<::std::string::String>,
|
53 + | /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
54 + | pub actual_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
55 + | /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
56 + | pub actual_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
57 + | /// <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>
|
58 + | pub planned_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
59 + | /// <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>
|
60 + | pub planned_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
61 + | /// <p>The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. 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>
|
62 + | pub account_id: ::std::option::Option<::std::string::String>,
|
63 + | }
|
64 + | impl CreateOpsItemInput {
|
65 + | /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p><note>
|
66 + | /// <p>Provide enough information so that users viewing this OpsItem for the first time understand the issue.</p>
|
67 + | /// </note>
|
68 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
69 + | self.description.as_deref()
|
70 + | }
|
71 + | /// <p>The type of OpsItem to create. Systems Manager supports the following types of OpsItems:</p>
|
72 + | /// <ul>
|
73 + | /// <li>
|
74 + | /// <p><code>/aws/issue</code></p>
|
75 + | /// <p>This type of OpsItem is used for default OpsItems created by OpsCenter.</p></li>
|
76 + | /// <li>
|
77 + | /// <p><code>/aws/insight</code></p>
|
78 + | /// <p>This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.</p></li>
|
79 + | /// <li>
|
80 + | /// <p><code>/aws/changerequest</code></p>
|
81 + | /// <p>This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.</p><important>
|
82 + | /// <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
|
83 + | /// </important></li>
|
84 + | /// </ul>
|
85 + | pub fn ops_item_type(&self) -> ::std::option::Option<&str> {
|
86 + | self.ops_item_type.as_deref()
|
87 + | }
|
88 + | /// <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>
|
89 + | /// <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>
|
90 + | /// </important>
|
91 + | /// <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>
|
92 + | /// <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">Create OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
93 + | pub fn operational_data(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>> {
|
94 + | self.operational_data.as_ref()
|
95 + | }
|
96 + | /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
|
97 + | ///
|
98 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.notifications.is_none()`.
|
99 + | pub fn notifications(&self) -> &[crate::types::OpsItemNotification] {
|
100 + | self.notifications.as_deref().unwrap_or_default()
|
101 + | }
|
102 + | /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
|
103 + | pub fn priority(&self) -> ::std::option::Option<i32> {
|
104 + | self.priority
|
105 + | }
|
106 + | /// <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>
|
107 + | ///
|
108 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.related_ops_items.is_none()`.
|
109 + | pub fn related_ops_items(&self) -> &[crate::types::RelatedOpsItem] {
|
110 + | self.related_ops_items.as_deref().unwrap_or_default()
|
111 + | }
|
112 + | /// <p>The origin of the OpsItem, such as Amazon EC2 or Systems Manager.</p><note>
|
113 + | /// <p>The source name can't contain the following strings: <code>aws</code>, <code>amazon</code>, and <code>amzn</code>.</p>
|
114 + | /// </note>
|
115 + | pub fn source(&self) -> ::std::option::Option<&str> {
|
116 + | self.source.as_deref()
|
117 + | }
|
118 + | /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
|
119 + | pub fn title(&self) -> ::std::option::Option<&str> {
|
120 + | self.title.as_deref()
|
121 + | }
|
122 + | /// <p>Optional metadata that you assign to a resource.</p>
|
123 + | /// <p>Tags use a key-value pair. For example:</p>
|
124 + | /// <p><code>Key=Department,Value=Finance</code></p><important>
|
125 + | /// <p>To add tags to a new OpsItem, a user must have IAM permissions for both the <code>ssm:CreateOpsItems</code> operation and the <code>ssm:AddTagsToResource</code> operation. To add tags to an existing OpsItem, use the <code>AddTagsToResource</code> operation.</p>
|
126 + | /// </important>
|
127 + | ///
|
128 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
|
129 + | pub fn tags(&self) -> &[crate::types::Tag] {
|
130 + | self.tags.as_deref().unwrap_or_default()
|
131 + | }
|
132 + | /// <p>Specify a category to assign to an OpsItem.</p>
|
133 + | pub fn category(&self) -> ::std::option::Option<&str> {
|
134 + | self.category.as_deref()
|
135 + | }
|
136 + | /// <p>Specify a severity to assign to an OpsItem.</p>
|
137 + | pub fn severity(&self) -> ::std::option::Option<&str> {
|
138 + | self.severity.as_deref()
|
139 + | }
|
140 + | /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
141 + | pub fn actual_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
142 + | self.actual_start_time.as_ref()
|
143 + | }
|
144 + | /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
145 + | pub fn actual_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
146 + | self.actual_end_time.as_ref()
|
147 + | }
|
148 + | /// <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>
|
149 + | pub fn planned_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
150 + | self.planned_start_time.as_ref()
|
151 + | }
|
152 + | /// <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>
|
153 + | pub fn planned_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
154 + | self.planned_end_time.as_ref()
|
155 + | }
|
156 + | /// <p>The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. 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>
|
157 + | pub fn account_id(&self) -> ::std::option::Option<&str> {
|
158 + | self.account_id.as_deref()
|
159 + | }
|
160 + | }
|
161 + | static CREATEOPSITEMINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
162 + | ::aws_smithy_schema::ShapeId::from_parts(
|
163 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Description",
|
164 + | "com.amazonaws.ssm.synthetic",
|
165 + | "CreateOpsItemInput",
|
166 + | ),
|
167 + | ::aws_smithy_schema::ShapeType::String,
|
168 + | "Description",
|
169 + | 0,
|
170 + | );
|
171 + | static CREATEOPSITEMINPUT_MEMBER_OPS_ITEM_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
172 + | ::aws_smithy_schema::ShapeId::from_parts(
|
173 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$OpsItemType",
|
174 + | "com.amazonaws.ssm.synthetic",
|
175 + | "CreateOpsItemInput",
|
176 + | ),
|
177 + | ::aws_smithy_schema::ShapeType::String,
|
178 + | "OpsItemType",
|
179 + | 1,
|
180 + | );
|
181 + | static CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
182 + | ::aws_smithy_schema::ShapeId::from_parts(
|
183 + | "com.amazonaws.ssm#OpsItemOperationalData$key",
|
184 + | "com.amazonaws.ssm",
|
185 + | "OpsItemOperationalData",
|
186 + | ),
|
187 + | ::aws_smithy_schema::ShapeType::String,
|
188 + | "key",
|
189 + | 0,
|
190 + | );
|
191 + | static CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
192 + | ::aws_smithy_schema::ShapeId::from_parts(
|
193 + | "com.amazonaws.ssm#OpsItemOperationalData$value",
|
194 + | "com.amazonaws.ssm",
|
195 + | "OpsItemOperationalData",
|
196 + | ),
|
197 + | ::aws_smithy_schema::ShapeType::Structure,
|
198 + | "value",
|
199 + | 1,
|
200 + | );
|
201 + | static CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
202 + | ::aws_smithy_schema::ShapeId::from_parts(
|
203 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$OperationalData",
|
204 + | "com.amazonaws.ssm.synthetic",
|
205 + | "CreateOpsItemInput",
|
206 + | ),
|
207 + | ::aws_smithy_schema::ShapeType::Map,
|
208 + | "OperationalData",
|
209 + | 2,
|
210 + | )
|
211 + | .with_map_members(
|
212 + | &CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA_KEY,
|
213 + | &CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA_VALUE,
|
214 + | );
|
215 + | static CREATEOPSITEMINPUT_MEMBER_NOTIFICATIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
216 + | ::aws_smithy_schema::ShapeId::from_parts(
|
217 + | "com.amazonaws.ssm#OpsItemNotifications$member",
|
218 + | "com.amazonaws.ssm",
|
219 + | "OpsItemNotifications",
|
220 + | ),
|
221 + | ::aws_smithy_schema::ShapeType::Structure,
|
222 + | "member",
|
223 + | 0,
|
224 + | );
|
225 + | static CREATEOPSITEMINPUT_MEMBER_NOTIFICATIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
226 + | ::aws_smithy_schema::ShapeId::from_parts(
|
227 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Notifications",
|
228 + | "com.amazonaws.ssm.synthetic",
|
229 + | "CreateOpsItemInput",
|
230 + | ),
|
231 + | ::aws_smithy_schema::ShapeType::List,
|
232 + | "Notifications",
|
233 + | 3,
|
234 + | )
|
235 + | .with_list_member(&CREATEOPSITEMINPUT_MEMBER_NOTIFICATIONS_MEMBER);
|
236 + | static CREATEOPSITEMINPUT_MEMBER_PRIORITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
237 + | ::aws_smithy_schema::ShapeId::from_parts(
|
238 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Priority",
|
239 + | "com.amazonaws.ssm.synthetic",
|
240 + | "CreateOpsItemInput",
|
241 + | ),
|
242 + | ::aws_smithy_schema::ShapeType::Integer,
|
243 + | "Priority",
|
244 + | 4,
|
245 + | );
|
246 + | static CREATEOPSITEMINPUT_MEMBER_RELATED_OPS_ITEMS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
247 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#RelatedOpsItems$member", "com.amazonaws.ssm", "RelatedOpsItems"),
|
248 + | ::aws_smithy_schema::ShapeType::Structure,
|
249 + | "member",
|
250 + | 0,
|
251 + | );
|
252 + | static CREATEOPSITEMINPUT_MEMBER_RELATED_OPS_ITEMS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
253 + | ::aws_smithy_schema::ShapeId::from_parts(
|
254 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$RelatedOpsItems",
|
255 + | "com.amazonaws.ssm.synthetic",
|
256 + | "CreateOpsItemInput",
|
257 + | ),
|
258 + | ::aws_smithy_schema::ShapeType::List,
|
259 + | "RelatedOpsItems",
|
260 + | 5,
|
261 + | )
|
262 + | .with_list_member(&CREATEOPSITEMINPUT_MEMBER_RELATED_OPS_ITEMS_MEMBER);
|
263 + | static CREATEOPSITEMINPUT_MEMBER_SOURCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
264 + | ::aws_smithy_schema::ShapeId::from_parts(
|
265 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Source",
|
266 + | "com.amazonaws.ssm.synthetic",
|
267 + | "CreateOpsItemInput",
|
268 + | ),
|
269 + | ::aws_smithy_schema::ShapeType::String,
|
270 + | "Source",
|
271 + | 6,
|
272 + | );
|
273 + | static CREATEOPSITEMINPUT_MEMBER_TITLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
274 + | ::aws_smithy_schema::ShapeId::from_parts(
|
275 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Title",
|
276 + | "com.amazonaws.ssm.synthetic",
|
277 + | "CreateOpsItemInput",
|
278 + | ),
|
279 + | ::aws_smithy_schema::ShapeType::String,
|
280 + | "Title",
|
281 + | 7,
|
282 + | );
|
283 + | static CREATEOPSITEMINPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
284 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
|
285 + | ::aws_smithy_schema::ShapeType::Structure,
|
286 + | "member",
|
287 + | 0,
|
288 + | );
|
289 + | static CREATEOPSITEMINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
290 + | ::aws_smithy_schema::ShapeId::from_parts(
|
291 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Tags",
|
292 + | "com.amazonaws.ssm.synthetic",
|
293 + | "CreateOpsItemInput",
|
294 + | ),
|
295 + | ::aws_smithy_schema::ShapeType::List,
|
296 + | "Tags",
|
297 + | 8,
|
298 + | )
|
299 + | .with_list_member(&CREATEOPSITEMINPUT_MEMBER_TAGS_MEMBER);
|
300 + | static CREATEOPSITEMINPUT_MEMBER_CATEGORY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
301 + | ::aws_smithy_schema::ShapeId::from_parts(
|
302 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Category",
|
303 + | "com.amazonaws.ssm.synthetic",
|
304 + | "CreateOpsItemInput",
|
305 + | ),
|
306 + | ::aws_smithy_schema::ShapeType::String,
|
307 + | "Category",
|
308 + | 9,
|
309 + | );
|
310 + | static CREATEOPSITEMINPUT_MEMBER_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
311 + | ::aws_smithy_schema::ShapeId::from_parts(
|
312 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$Severity",
|
313 + | "com.amazonaws.ssm.synthetic",
|
314 + | "CreateOpsItemInput",
|
315 + | ),
|
316 + | ::aws_smithy_schema::ShapeType::String,
|
317 + | "Severity",
|
318 + | 10,
|
319 + | );
|
320 + | static CREATEOPSITEMINPUT_MEMBER_ACTUAL_START_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
321 + | ::aws_smithy_schema::ShapeId::from_parts(
|
322 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$ActualStartTime",
|
323 + | "com.amazonaws.ssm.synthetic",
|
324 + | "CreateOpsItemInput",
|
325 + | ),
|
326 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
327 + | "ActualStartTime",
|
328 + | 11,
|
329 + | );
|
330 + | static CREATEOPSITEMINPUT_MEMBER_ACTUAL_END_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
331 + | ::aws_smithy_schema::ShapeId::from_parts(
|
332 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$ActualEndTime",
|
333 + | "com.amazonaws.ssm.synthetic",
|
334 + | "CreateOpsItemInput",
|
335 + | ),
|
336 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
337 + | "ActualEndTime",
|
338 + | 12,
|
339 + | );
|
340 + | static CREATEOPSITEMINPUT_MEMBER_PLANNED_START_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
341 + | ::aws_smithy_schema::ShapeId::from_parts(
|
342 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$PlannedStartTime",
|
343 + | "com.amazonaws.ssm.synthetic",
|
344 + | "CreateOpsItemInput",
|
345 + | ),
|
346 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
347 + | "PlannedStartTime",
|
348 + | 13,
|
349 + | );
|
350 + | static CREATEOPSITEMINPUT_MEMBER_PLANNED_END_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
351 + | ::aws_smithy_schema::ShapeId::from_parts(
|
352 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$PlannedEndTime",
|
353 + | "com.amazonaws.ssm.synthetic",
|
354 + | "CreateOpsItemInput",
|
355 + | ),
|
356 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
357 + | "PlannedEndTime",
|
358 + | 14,
|
359 + | );
|
360 + | static CREATEOPSITEMINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
361 + | ::aws_smithy_schema::ShapeId::from_parts(
|
362 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput$AccountId",
|
363 + | "com.amazonaws.ssm.synthetic",
|
364 + | "CreateOpsItemInput",
|
365 + | ),
|
366 + | ::aws_smithy_schema::ShapeType::String,
|
367 + | "AccountId",
|
368 + | 15,
|
369 + | );
|
370 + | static CREATEOPSITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
371 + | ::aws_smithy_schema::ShapeId::from_parts(
|
372 + | "com.amazonaws.ssm.synthetic#CreateOpsItemInput",
|
373 + | "com.amazonaws.ssm.synthetic",
|
374 + | "CreateOpsItemInput",
|
375 + | ),
|
376 + | ::aws_smithy_schema::ShapeType::Structure,
|
377 + | &[
|
378 + | &CREATEOPSITEMINPUT_MEMBER_DESCRIPTION,
|
379 + | &CREATEOPSITEMINPUT_MEMBER_OPS_ITEM_TYPE,
|
380 + | &CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA,
|
381 + | &CREATEOPSITEMINPUT_MEMBER_NOTIFICATIONS,
|
382 + | &CREATEOPSITEMINPUT_MEMBER_PRIORITY,
|
383 + | &CREATEOPSITEMINPUT_MEMBER_RELATED_OPS_ITEMS,
|
384 + | &CREATEOPSITEMINPUT_MEMBER_SOURCE,
|
385 + | &CREATEOPSITEMINPUT_MEMBER_TITLE,
|
386 + | &CREATEOPSITEMINPUT_MEMBER_TAGS,
|
387 + | &CREATEOPSITEMINPUT_MEMBER_CATEGORY,
|
388 + | &CREATEOPSITEMINPUT_MEMBER_SEVERITY,
|
389 + | &CREATEOPSITEMINPUT_MEMBER_ACTUAL_START_TIME,
|
390 + | &CREATEOPSITEMINPUT_MEMBER_ACTUAL_END_TIME,
|
391 + | &CREATEOPSITEMINPUT_MEMBER_PLANNED_START_TIME,
|
392 + | &CREATEOPSITEMINPUT_MEMBER_PLANNED_END_TIME,
|
393 + | &CREATEOPSITEMINPUT_MEMBER_ACCOUNT_ID,
|
394 + | ],
|
395 + | )
|
396 + | .with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
|
397 + | .with_original_name("CreateOpsItemRequest");
|
398 + | impl CreateOpsItemInput {
|
399 + | /// The schema for this shape.
|
400 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEOPSITEMINPUT_SCHEMA;
|
401 + | }
|
402 + | impl ::aws_smithy_schema::serde::SerializableStruct for CreateOpsItemInput {
|
403 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
404 + | fn serialize_members(
|
405 + | &self,
|
406 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
407 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
408 + | if let Some(ref val) = self.description {
|
409 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_DESCRIPTION, val)?;
|
410 + | }
|
411 + | if let Some(ref val) = self.ops_item_type {
|
412 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_OPS_ITEM_TYPE, val)?;
|
413 + | }
|
414 + | if let Some(ref val) = self.operational_data {
|
415 + | ser.write_map(
|
416 + | &CREATEOPSITEMINPUT_MEMBER_OPERATIONAL_DATA,
|
417 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
418 + | for (key, value) in val {
|
419 + | ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
|
420 + | ser.write_struct(crate::types::OpsItemDataValue::SCHEMA, value)?;
|
421 + | }
|
422 + | Ok(())
|
423 + | },
|
424 + | )?;
|
425 + | }
|
426 + | if let Some(ref val) = self.notifications {
|
427 + | ser.write_list(
|
428 + | &CREATEOPSITEMINPUT_MEMBER_NOTIFICATIONS,
|
429 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
430 + | for item in val {
|
431 + | ser.write_struct(crate::types::OpsItemNotification::SCHEMA, item)?;
|
432 + | }
|
433 + | Ok(())
|
434 + | },
|
435 + | )?;
|
436 + | }
|
437 + | if let Some(ref val) = self.priority {
|
438 + | ser.write_integer(&CREATEOPSITEMINPUT_MEMBER_PRIORITY, *val)?;
|
439 + | }
|
440 + | if let Some(ref val) = self.related_ops_items {
|
441 + | ser.write_list(
|
442 + | &CREATEOPSITEMINPUT_MEMBER_RELATED_OPS_ITEMS,
|
443 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
444 + | for item in val {
|
445 + | ser.write_struct(crate::types::RelatedOpsItem::SCHEMA, item)?;
|
446 + | }
|
447 + | Ok(())
|
448 + | },
|
449 + | )?;
|
450 + | }
|
451 + | if let Some(ref val) = self.source {
|
452 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_SOURCE, val)?;
|
453 + | }
|
454 + | if let Some(ref val) = self.title {
|
455 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_TITLE, val)?;
|
456 + | }
|
457 + | if let Some(ref val) = self.tags {
|
458 + | ser.write_list(
|
459 + | &CREATEOPSITEMINPUT_MEMBER_TAGS,
|
460 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
461 + | for item in val {
|
462 + | ser.write_struct(crate::types::Tag::SCHEMA, item)?;
|
463 + | }
|
464 + | Ok(())
|
465 + | },
|
466 + | )?;
|
467 + | }
|
468 + | if let Some(ref val) = self.category {
|
469 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_CATEGORY, val)?;
|
470 + | }
|
471 + | if let Some(ref val) = self.severity {
|
472 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_SEVERITY, val)?;
|
473 + | }
|
474 + | if let Some(ref val) = self.actual_start_time {
|
475 + | ser.write_timestamp(&CREATEOPSITEMINPUT_MEMBER_ACTUAL_START_TIME, val)?;
|
476 + | }
|
477 + | if let Some(ref val) = self.actual_end_time {
|
478 + | ser.write_timestamp(&CREATEOPSITEMINPUT_MEMBER_ACTUAL_END_TIME, val)?;
|
479 + | }
|
480 + | if let Some(ref val) = self.planned_start_time {
|
481 + | ser.write_timestamp(&CREATEOPSITEMINPUT_MEMBER_PLANNED_START_TIME, val)?;
|
482 + | }
|
483 + | if let Some(ref val) = self.planned_end_time {
|
484 + | ser.write_timestamp(&CREATEOPSITEMINPUT_MEMBER_PLANNED_END_TIME, val)?;
|
485 + | }
|
486 + | if let Some(ref val) = self.account_id {
|
487 + | ser.write_string(&CREATEOPSITEMINPUT_MEMBER_ACCOUNT_ID, val)?;
|
488 + | }
|
489 + | Ok(())
|
490 + | }
|
491 + | }
|
492 + | impl CreateOpsItemInput {
|
493 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
494 + | pub fn deserialize(
|
495 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
496 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
497 + | #[allow(unused_variables, unused_mut)]
|
498 + | let mut builder = Self::builder();
|
499 + | #[allow(
|
500 + | unused_variables,
|
501 + | unreachable_code,
|
502 + | clippy::single_match,
|
503 + | clippy::match_single_binding,
|
504 + | clippy::diverging_sub_expression
|
505 + | )]
|
506 + | deserializer.read_struct(&CREATEOPSITEMINPUT_SCHEMA, &mut |member, deser| {
|
507 + | match member.member_index() {
|
508 + | Some(0) => {
|
509 + | if deser.is_null() {
|
510 + | deser.read_null()?;
|
511 + | } else {
|
512 + | builder.description = Some(deser.read_string(member)?);
|
513 + | }
|
514 + | }
|
515 + | Some(1) => {
|
516 + | if deser.is_null() {
|
517 + | deser.read_null()?;
|
518 + | } else {
|
519 + | builder.ops_item_type = Some(deser.read_string(member)?);
|
520 + | }
|
521 + | }
|
522 + | Some(2) => {
|
523 + | if deser.is_null() {
|
524 + | deser.read_null()?;
|
525 + | } else {
|
526 + | builder.operational_data = Some({
|
527 + | let mut container = std::collections::HashMap::new();
|
528 + | deser.read_map(member, &mut |key, deser| {
|
529 + | container.insert(key, crate::types::OpsItemDataValue::deserialize(deser)?);
|
530 + | Ok(())
|
531 + | })?;
|
532 + | container
|
533 + | });
|
534 + | }
|
535 + | }
|
536 + | Some(3) => {
|
537 + | if deser.is_null() {
|
538 + | deser.read_null()?;
|
539 + | } else {
|
540 + | builder.notifications = Some({
|
541 + | let mut container = Vec::new();
|
542 + | deser.read_list(member, &mut |deser| {
|
543 + | container.push(crate::types::OpsItemNotification::deserialize(deser)?);
|
544 + | Ok(())
|
545 + | })?;
|
546 + | container
|
547 + | });
|
548 + | }
|
549 + | }
|
550 + | Some(4) => {
|
551 + | if deser.is_null() {
|
552 + | deser.read_null()?;
|
553 + | } else {
|
554 + | builder.priority = Some(deser.read_integer(member)?);
|
555 + | }
|
556 + | }
|
557 + | Some(5) => {
|
558 + | if deser.is_null() {
|
559 + | deser.read_null()?;
|
560 + | } else {
|
561 + | builder.related_ops_items = Some({
|
562 + | let mut container = Vec::new();
|
563 + | deser.read_list(member, &mut |deser| {
|
564 + | container.push(crate::types::RelatedOpsItem::deserialize(deser)?);
|
565 + | Ok(())
|
566 + | })?;
|
567 + | container
|
568 + | });
|
569 + | }
|
570 + | }
|
571 + | Some(6) => {
|
572 + | if deser.is_null() {
|
573 + | deser.read_null()?;
|
574 + | } else {
|
575 + | builder.source = Some(deser.read_string(member)?);
|
576 + | }
|
577 + | }
|
578 + | Some(7) => {
|
579 + | if deser.is_null() {
|
580 + | deser.read_null()?;
|
581 + | } else {
|
582 + | builder.title = Some(deser.read_string(member)?);
|
583 + | }
|
584 + | }
|
585 + | Some(8) => {
|
586 + | if deser.is_null() {
|
587 + | deser.read_null()?;
|
588 + | } else {
|
589 + | builder.tags = Some({
|
590 + | let mut container = Vec::new();
|
591 + | deser.read_list(member, &mut |deser| {
|
592 + | container.push(crate::types::Tag::deserialize(deser)?);
|
593 + | Ok(())
|
594 + | })?;
|
595 + | container
|
596 + | });
|
597 + | }
|
598 + | }
|
599 + | Some(9) => {
|
600 + | if deser.is_null() {
|
601 + | deser.read_null()?;
|
602 + | } else {
|
603 + | builder.category = Some(deser.read_string(member)?);
|
604 + | }
|
605 + | }
|
606 + | Some(10) => {
|
607 + | if deser.is_null() {
|
608 + | deser.read_null()?;
|
609 + | } else {
|
610 + | builder.severity = Some(deser.read_string(member)?);
|
611 + | }
|
612 + | }
|
613 + | Some(11) => {
|
614 + | if deser.is_null() {
|
615 + | deser.read_null()?;
|
616 + | } else {
|
617 + | builder.actual_start_time = Some(deser.read_timestamp(member)?);
|
618 + | }
|
619 + | }
|
620 + | Some(12) => {
|
621 + | if deser.is_null() {
|
622 + | deser.read_null()?;
|
623 + | } else {
|
624 + | builder.actual_end_time = Some(deser.read_timestamp(member)?);
|
625 + | }
|
626 + | }
|
627 + | Some(13) => {
|
628 + | if deser.is_null() {
|
629 + | deser.read_null()?;
|
630 + | } else {
|
631 + | builder.planned_start_time = Some(deser.read_timestamp(member)?);
|
632 + | }
|
633 + | }
|
634 + | Some(14) => {
|
635 + | if deser.is_null() {
|
636 + | deser.read_null()?;
|
637 + | } else {
|
638 + | builder.planned_end_time = Some(deser.read_timestamp(member)?);
|
639 + | }
|
640 + | }
|
641 + | Some(15) => {
|
642 + | if deser.is_null() {
|
643 + | deser.read_null()?;
|
644 + | } else {
|
645 + | builder.account_id = Some(deser.read_string(member)?);
|
646 + | }
|
647 + | }
|
648 + | _ => {}
|
649 + | }
|
650 + | Ok(())
|
651 + | })?;
|
652 + | builder.description = builder.description.or(Some(String::new()));
|
653 + | builder.source = builder.source.or(Some(String::new()));
|
654 + | builder.title = builder.title.or(Some(String::new()));
|
655 + | builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
|
656 + | }
|
657 + | }
|
658 + | impl CreateOpsItemInput {
|
659 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
660 + | pub fn deserialize_with_response(
|
661 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
662 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
663 + | _status: u16,
|
664 + | _body: &[u8],
|
665 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
666 + | Self::deserialize(deserializer)
|
667 + | }
|
668 + | }
|
669 + | impl CreateOpsItemInput {
|
670 + | /// Creates a new builder-style object to manufacture [`CreateOpsItemInput`](crate::operation::create_ops_item::CreateOpsItemInput).
|
671 + | pub fn builder() -> crate::operation::create_ops_item::builders::CreateOpsItemInputBuilder {
|
672 + | crate::operation::create_ops_item::builders::CreateOpsItemInputBuilder::default()
|
673 + | }
|
674 + | }
|
675 + |
|
676 + | /// A builder for [`CreateOpsItemInput`](crate::operation::create_ops_item::CreateOpsItemInput).
|
677 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
678 + | #[non_exhaustive]
|
679 + | pub struct CreateOpsItemInputBuilder {
|
680 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
681 + | pub(crate) ops_item_type: ::std::option::Option<::std::string::String>,
|
682 + | pub(crate) operational_data: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>>,
|
683 + | pub(crate) notifications: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>>,
|
684 + | pub(crate) priority: ::std::option::Option<i32>,
|
685 + | pub(crate) related_ops_items: ::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>>,
|
686 + | pub(crate) source: ::std::option::Option<::std::string::String>,
|
687 + | pub(crate) title: ::std::option::Option<::std::string::String>,
|
688 + | pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
689 + | pub(crate) category: ::std::option::Option<::std::string::String>,
|
690 + | pub(crate) severity: ::std::option::Option<::std::string::String>,
|
691 + | pub(crate) actual_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
692 + | pub(crate) actual_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
693 + | pub(crate) planned_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
694 + | pub(crate) planned_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
695 + | pub(crate) account_id: ::std::option::Option<::std::string::String>,
|
696 + | }
|
697 + | impl CreateOpsItemInputBuilder {
|
698 + | /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p><note>
|
699 + | /// <p>Provide enough information so that users viewing this OpsItem for the first time understand the issue.</p>
|
700 + | /// </note>
|
701 + | /// This field is required.
|
702 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
703 + | self.description = ::std::option::Option::Some(input.into());
|
704 + | self
|
705 + | }
|
706 + | /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p><note>
|
707 + | /// <p>Provide enough information so that users viewing this OpsItem for the first time understand the issue.</p>
|
708 + | /// </note>
|
709 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
710 + | self.description = input;
|
711 + | self
|
712 + | }
|
713 + | /// <p>User-defined text that contains information about the OpsItem, in Markdown format.</p><note>
|
714 + | /// <p>Provide enough information so that users viewing this OpsItem for the first time understand the issue.</p>
|
715 + | /// </note>
|
716 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
717 + | &self.description
|
718 + | }
|
719 + | /// <p>The type of OpsItem to create. Systems Manager supports the following types of OpsItems:</p>
|
720 + | /// <ul>
|
721 + | /// <li>
|
722 + | /// <p><code>/aws/issue</code></p>
|
723 + | /// <p>This type of OpsItem is used for default OpsItems created by OpsCenter.</p></li>
|
724 + | /// <li>
|
725 + | /// <p><code>/aws/insight</code></p>
|
726 + | /// <p>This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.</p></li>
|
727 + | /// <li>
|
728 + | /// <p><code>/aws/changerequest</code></p>
|
729 + | /// <p>This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.</p><important>
|
730 + | /// <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
|
731 + | /// </important></li>
|
732 + | /// </ul>
|
733 + | pub fn ops_item_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
734 + | self.ops_item_type = ::std::option::Option::Some(input.into());
|
735 + | self
|
736 + | }
|
737 + | /// <p>The type of OpsItem to create. Systems Manager supports the following types of OpsItems:</p>
|
738 + | /// <ul>
|
739 + | /// <li>
|
740 + | /// <p><code>/aws/issue</code></p>
|
741 + | /// <p>This type of OpsItem is used for default OpsItems created by OpsCenter.</p></li>
|
742 + | /// <li>
|
743 + | /// <p><code>/aws/insight</code></p>
|
744 + | /// <p>This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.</p></li>
|
745 + | /// <li>
|
746 + | /// <p><code>/aws/changerequest</code></p>
|
747 + | /// <p>This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.</p><important>
|
748 + | /// <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
|
749 + | /// </important></li>
|
750 + | /// </ul>
|
751 + | pub fn set_ops_item_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
752 + | self.ops_item_type = input;
|
753 + | self
|
754 + | }
|
755 + | /// <p>The type of OpsItem to create. Systems Manager supports the following types of OpsItems:</p>
|
756 + | /// <ul>
|
757 + | /// <li>
|
758 + | /// <p><code>/aws/issue</code></p>
|
759 + | /// <p>This type of OpsItem is used for default OpsItems created by OpsCenter.</p></li>
|
760 + | /// <li>
|
761 + | /// <p><code>/aws/insight</code></p>
|
762 + | /// <p>This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.</p></li>
|
763 + | /// <li>
|
764 + | /// <p><code>/aws/changerequest</code></p>
|
765 + | /// <p>This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests.</p><important>
|
766 + | /// <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
|
767 + | /// </important></li>
|
768 + | /// </ul>
|
769 + | pub fn get_ops_item_type(&self) -> &::std::option::Option<::std::string::String> {
|
770 + | &self.ops_item_type
|
771 + | }
|
772 + | /// Adds a key-value pair to `operational_data`.
|
773 + | ///
|
774 + | /// To override the contents of this collection use [`set_operational_data`](Self::set_operational_data).
|
775 + | ///
|
776 + | /// <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>
|
777 + | /// <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>
|
778 + | /// </important>
|
779 + | /// <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>
|
780 + | /// <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">Create OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
781 + | pub fn operational_data(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::OpsItemDataValue) -> Self {
|
782 + | let mut hash_map = self.operational_data.unwrap_or_default();
|
783 + | hash_map.insert(k.into(), v);
|
784 + | self.operational_data = ::std::option::Option::Some(hash_map);
|
785 + | self
|
786 + | }
|
787 + | /// <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>
|
788 + | /// <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>
|
789 + | /// </important>
|
790 + | /// <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>
|
791 + | /// <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">Create OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
792 + | pub fn set_operational_data(
|
793 + | mut self,
|
794 + | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>>,
|
795 + | ) -> Self {
|
796 + | self.operational_data = input;
|
797 + | self
|
798 + | }
|
799 + | /// <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>
|
800 + | /// <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>
|
801 + | /// </important>
|
802 + | /// <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>
|
803 + | /// <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">Create OpsItems manually</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
804 + | pub fn get_operational_data(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::OpsItemDataValue>> {
|
805 + | &self.operational_data
|
806 + | }
|
807 + | /// Appends an item to `notifications`.
|
808 + | ///
|
809 + | /// To override the contents of this collection use [`set_notifications`](Self::set_notifications).
|
810 + | ///
|
811 + | /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
|
812 + | pub fn notifications(mut self, input: crate::types::OpsItemNotification) -> Self {
|
813 + | let mut v = self.notifications.unwrap_or_default();
|
814 + | v.push(input);
|
815 + | self.notifications = ::std::option::Option::Some(v);
|
816 + | self
|
817 + | }
|
818 + | /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
|
819 + | pub fn set_notifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>>) -> Self {
|
820 + | self.notifications = input;
|
821 + | self
|
822 + | }
|
823 + | /// <p>The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.</p>
|
824 + | pub fn get_notifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemNotification>> {
|
825 + | &self.notifications
|
826 + | }
|
827 + | /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
|
828 + | pub fn priority(mut self, input: i32) -> Self {
|
829 + | self.priority = ::std::option::Option::Some(input);
|
830 + | self
|
831 + | }
|
832 + | /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
|
833 + | pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
|
834 + | self.priority = input;
|
835 + | self
|
836 + | }
|
837 + | /// <p>The importance of this OpsItem in relation to other OpsItems in the system.</p>
|
838 + | pub fn get_priority(&self) -> &::std::option::Option<i32> {
|
839 + | &self.priority
|
840 + | }
|
841 + | /// Appends an item to `related_ops_items`.
|
842 + | ///
|
843 + | /// To override the contents of this collection use [`set_related_ops_items`](Self::set_related_ops_items).
|
844 + | ///
|
845 + | /// <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>
|
846 + | pub fn related_ops_items(mut self, input: crate::types::RelatedOpsItem) -> Self {
|
847 + | let mut v = self.related_ops_items.unwrap_or_default();
|
848 + | v.push(input);
|
849 + | self.related_ops_items = ::std::option::Option::Some(v);
|
850 + | self
|
851 + | }
|
852 + | /// <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>
|
853 + | pub fn set_related_ops_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>>) -> Self {
|
854 + | self.related_ops_items = input;
|
855 + | self
|
856 + | }
|
857 + | /// <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>
|
858 + | pub fn get_related_ops_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RelatedOpsItem>> {
|
859 + | &self.related_ops_items
|
860 + | }
|
861 + | /// <p>The origin of the OpsItem, such as Amazon EC2 or Systems Manager.</p><note>
|
862 + | /// <p>The source name can't contain the following strings: <code>aws</code>, <code>amazon</code>, and <code>amzn</code>.</p>
|
863 + | /// </note>
|
864 + | /// This field is required.
|
865 + | pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
866 + | self.source = ::std::option::Option::Some(input.into());
|
867 + | self
|
868 + | }
|
869 + | /// <p>The origin of the OpsItem, such as Amazon EC2 or Systems Manager.</p><note>
|
870 + | /// <p>The source name can't contain the following strings: <code>aws</code>, <code>amazon</code>, and <code>amzn</code>.</p>
|
871 + | /// </note>
|
872 + | pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
873 + | self.source = input;
|
874 + | self
|
875 + | }
|
876 + | /// <p>The origin of the OpsItem, such as Amazon EC2 or Systems Manager.</p><note>
|
877 + | /// <p>The source name can't contain the following strings: <code>aws</code>, <code>amazon</code>, and <code>amzn</code>.</p>
|
878 + | /// </note>
|
879 + | pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
|
880 + | &self.source
|
881 + | }
|
882 + | /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
|
883 + | /// This field is required.
|
884 + | pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
885 + | self.title = ::std::option::Option::Some(input.into());
|
886 + | self
|
887 + | }
|
888 + | /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
|
889 + | pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
890 + | self.title = input;
|
891 + | self
|
892 + | }
|
893 + | /// <p>A short heading that describes the nature of the OpsItem and the impacted resource.</p>
|
894 + | pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
|
895 + | &self.title
|
896 + | }
|
897 + | /// Appends an item to `tags`.
|
898 + | ///
|
899 + | /// To override the contents of this collection use [`set_tags`](Self::set_tags).
|
900 + | ///
|
901 + | /// <p>Optional metadata that you assign to a resource.</p>
|
902 + | /// <p>Tags use a key-value pair. For example:</p>
|
903 + | /// <p><code>Key=Department,Value=Finance</code></p><important>
|
904 + | /// <p>To add tags to a new OpsItem, a user must have IAM permissions for both the <code>ssm:CreateOpsItems</code> operation and the <code>ssm:AddTagsToResource</code> operation. To add tags to an existing OpsItem, use the <code>AddTagsToResource</code> operation.</p>
|
905 + | /// </important>
|
906 + | pub fn tags(mut self, input: crate::types::Tag) -> Self {
|
907 + | let mut v = self.tags.unwrap_or_default();
|
908 + | v.push(input);
|
909 + | self.tags = ::std::option::Option::Some(v);
|
910 + | self
|
911 + | }
|
912 + | /// <p>Optional metadata that you assign to a resource.</p>
|
913 + | /// <p>Tags use a key-value pair. For example:</p>
|
914 + | /// <p><code>Key=Department,Value=Finance</code></p><important>
|
915 + | /// <p>To add tags to a new OpsItem, a user must have IAM permissions for both the <code>ssm:CreateOpsItems</code> operation and the <code>ssm:AddTagsToResource</code> operation. To add tags to an existing OpsItem, use the <code>AddTagsToResource</code> operation.</p>
|
916 + | /// </important>
|
917 + | pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
|
918 + | self.tags = input;
|
919 + | self
|
920 + | }
|
921 + | /// <p>Optional metadata that you assign to a resource.</p>
|
922 + | /// <p>Tags use a key-value pair. For example:</p>
|
923 + | /// <p><code>Key=Department,Value=Finance</code></p><important>
|
924 + | /// <p>To add tags to a new OpsItem, a user must have IAM permissions for both the <code>ssm:CreateOpsItems</code> operation and the <code>ssm:AddTagsToResource</code> operation. To add tags to an existing OpsItem, use the <code>AddTagsToResource</code> operation.</p>
|
925 + | /// </important>
|
926 + | pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
|
927 + | &self.tags
|
928 + | }
|
929 + | /// <p>Specify a category to assign to an OpsItem.</p>
|
930 + | pub fn category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
931 + | self.category = ::std::option::Option::Some(input.into());
|
932 + | self
|
933 + | }
|
934 + | /// <p>Specify a category to assign to an OpsItem.</p>
|
935 + | pub fn set_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
936 + | self.category = input;
|
937 + | self
|
938 + | }
|
939 + | /// <p>Specify a category to assign to an OpsItem.</p>
|
940 + | pub fn get_category(&self) -> &::std::option::Option<::std::string::String> {
|
941 + | &self.category
|
942 + | }
|
943 + | /// <p>Specify a severity to assign to an OpsItem.</p>
|
944 + | pub fn severity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
945 + | self.severity = ::std::option::Option::Some(input.into());
|
946 + | self
|
947 + | }
|
948 + | /// <p>Specify a severity to assign to an OpsItem.</p>
|
949 + | pub fn set_severity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
950 + | self.severity = input;
|
951 + | self
|
952 + | }
|
953 + | /// <p>Specify a severity to assign to an OpsItem.</p>
|
954 + | pub fn get_severity(&self) -> &::std::option::Option<::std::string::String> {
|
955 + | &self.severity
|
956 + | }
|
957 + | /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
958 + | pub fn actual_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
959 + | self.actual_start_time = ::std::option::Option::Some(input);
|
960 + | self
|
961 + | }
|
962 + | /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
963 + | pub fn set_actual_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
964 + | self.actual_start_time = input;
|
965 + | self
|
966 + | }
|
967 + | /// <p>The time a runbook workflow started. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
968 + | pub fn get_actual_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
969 + | &self.actual_start_time
|
970 + | }
|
971 + | /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
972 + | pub fn actual_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
973 + | self.actual_end_time = ::std::option::Option::Some(input);
|
974 + | self
|
975 + | }
|
976 + | /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
977 + | pub fn set_actual_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
978 + | self.actual_end_time = input;
|
979 + | self
|
980 + | }
|
981 + | /// <p>The time a runbook workflow ended. Currently reported only for the OpsItem type <code>/aws/changerequest</code>.</p>
|
982 + | pub fn get_actual_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
983 + | &self.actual_end_time
|
984 + | }
|
985 + | /// <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>
|
986 + | pub fn planned_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
987 + | self.planned_start_time = ::std::option::Option::Some(input);
|
988 + | self
|
989 + | }
|
990 + | /// <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>
|
991 + | pub fn set_planned_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
992 + | self.planned_start_time = input;
|
993 + | self
|
994 + | }
|
995 + | /// <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>
|
996 + | pub fn get_planned_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
997 + | &self.planned_start_time
|
998 + | }
|
999 + | /// <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>
|
1000 + | pub fn planned_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
1001 + | self.planned_end_time = ::std::option::Option::Some(input);
|
1002 + | self
|
1003 + | }
|
1004 + | /// <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>
|
1005 + | pub fn set_planned_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
1006 + | self.planned_end_time = input;
|
1007 + | self
|
1008 + | }
|
1009 + | /// <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>
|
1010 + | pub fn get_planned_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
1011 + | &self.planned_end_time
|
1012 + | }
|
1013 + | /// <p>The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. 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>
|
1014 + | pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
1015 + | self.account_id = ::std::option::Option::Some(input.into());
|
1016 + | self
|
1017 + | }
|
1018 + | /// <p>The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. 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>
|
1019 + | pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1020 + | self.account_id = input;
|
1021 + | self
|
1022 + | }
|
1023 + | /// <p>The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. 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>
|
1024 + | pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
|
1025 + | &self.account_id
|
1026 + | }
|
1027 + | /// Consumes the builder and constructs a [`CreateOpsItemInput`](crate::operation::create_ops_item::CreateOpsItemInput).
|
1028 + | pub fn build(
|
1029 + | self,
|
1030 + | ) -> ::std::result::Result<crate::operation::create_ops_item::CreateOpsItemInput, ::aws_smithy_types::error::operation::BuildError> {
|
1031 + | ::std::result::Result::Ok(crate::operation::create_ops_item::CreateOpsItemInput {
|
1032 + | description: self.description,
|
1033 + | ops_item_type: self.ops_item_type,
|
1034 + | operational_data: self.operational_data,
|
1035 + | notifications: self.notifications,
|
1036 + | priority: self.priority,
|
1037 + | related_ops_items: self.related_ops_items,
|
1038 + | source: self.source,
|
1039 + | title: self.title,
|
1040 + | tags: self.tags,
|
1041 + | category: self.category,
|
1042 + | severity: self.severity,
|
1043 + | actual_start_time: self.actual_start_time,
|
1044 + | actual_end_time: self.actual_end_time,
|
1045 + | planned_start_time: self.planned_start_time,
|
1046 + | planned_end_time: self.planned_end_time,
|
1047 + | account_id: self.account_id,
|
1048 + | })
|
1049 + | }
|
1050 + | }
|