1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>An invocation is a copy of a command sent to a specific managed node. A command can apply to one or more managed nodes. A command invocation applies to one managed node. For example, if a user runs <code>SendCommand</code> against three managed nodes, then a command invocation is created for each requested managed node ID. A command invocation returns status and detail information about a command you ran.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct CommandInvocation {
|
7 + | /// <p>The command against which this invocation was requested.</p>
|
8 + | pub command_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The managed node ID in which this invocation was requested.</p>
|
10 + | pub instance_id: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>The fully qualified host name of the managed node.</p>
|
12 + | pub instance_name: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
|
14 + | pub comment: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>The document name that was requested for execution.</p>
|
16 + | pub document_name: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>The Systems Manager document (SSM document) version.</p>
|
18 + | pub document_version: ::std::option::Option<::std::string::String>,
|
19 + | /// <p>The time and date the request was sent to this managed node.</p>
|
20 + | pub requested_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
21 + | /// <p>Whether or not the invocation succeeded, failed, or is pending.</p>
|
22 + | pub status: ::std::option::Option<crate::types::CommandInvocationStatus>,
|
23 + | /// <p>A detailed status of the command execution for each invocation (each managed node targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
|
24 + | /// <ul>
|
25 + | /// <li>
|
26 + | /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
|
27 + | /// <li>
|
28 + | /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
|
29 + | /// <li>
|
30 + | /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
|
31 + | /// <li>
|
32 + | /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
33 + | /// <li>
|
34 + | /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
35 + | /// <li>
|
36 + | /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
37 + | /// <li>
|
38 + | /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
|
39 + | /// <li>
|
40 + | /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist or might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
41 + | /// <li>
|
42 + | /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
|
43 + | /// <li>
|
44 + | /// <p>Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.</p></li>
|
45 + | /// </ul>
|
46 + | pub status_details: ::std::option::Option<::std::string::String>,
|
47 + | /// <p>Gets the trace output sent by the agent.</p>
|
48 + | pub trace_output: ::std::option::Option<::std::string::String>,
|
49 + | /// <p>The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardOutputUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
50 + | pub standard_output_url: ::std::option::Option<::std::string::String>,
|
51 + | /// <p>The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardErrorUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
52 + | pub standard_error_url: ::std::option::Option<::std::string::String>,
|
53 + | /// <p>Plugins processed by the command.</p>
|
54 + | pub command_plugins: ::std::option::Option<::std::vec::Vec<crate::types::CommandPlugin>>,
|
55 + | /// <p>The Identity and Access Management (IAM) service role that Run Command, a tool in Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes on a per managed node basis.</p>
|
56 + | pub service_role: ::std::option::Option<::std::string::String>,
|
57 + | /// <p>Configurations for sending notifications about command status changes on a per managed node basis.</p>
|
58 + | pub notification_config: ::std::option::Option<crate::types::NotificationConfig>,
|
59 + | /// <p>Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.</p>
|
60 + | pub cloud_watch_output_config: ::std::option::Option<crate::types::CloudWatchOutputConfig>,
|
61 + | }
|
62 + | impl CommandInvocation {
|
63 + | /// <p>The command against which this invocation was requested.</p>
|
64 + | pub fn command_id(&self) -> ::std::option::Option<&str> {
|
65 + | self.command_id.as_deref()
|
66 + | }
|
67 + | /// <p>The managed node ID in which this invocation was requested.</p>
|
68 + | pub fn instance_id(&self) -> ::std::option::Option<&str> {
|
69 + | self.instance_id.as_deref()
|
70 + | }
|
71 + | /// <p>The fully qualified host name of the managed node.</p>
|
72 + | pub fn instance_name(&self) -> ::std::option::Option<&str> {
|
73 + | self.instance_name.as_deref()
|
74 + | }
|
75 + | /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
|
76 + | pub fn comment(&self) -> ::std::option::Option<&str> {
|
77 + | self.comment.as_deref()
|
78 + | }
|
79 + | /// <p>The document name that was requested for execution.</p>
|
80 + | pub fn document_name(&self) -> ::std::option::Option<&str> {
|
81 + | self.document_name.as_deref()
|
82 + | }
|
83 + | /// <p>The Systems Manager document (SSM document) version.</p>
|
84 + | pub fn document_version(&self) -> ::std::option::Option<&str> {
|
85 + | self.document_version.as_deref()
|
86 + | }
|
87 + | /// <p>The time and date the request was sent to this managed node.</p>
|
88 + | pub fn requested_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
89 + | self.requested_date_time.as_ref()
|
90 + | }
|
91 + | /// <p>Whether or not the invocation succeeded, failed, or is pending.</p>
|
92 + | pub fn status(&self) -> ::std::option::Option<&crate::types::CommandInvocationStatus> {
|
93 + | self.status.as_ref()
|
94 + | }
|
95 + | /// <p>A detailed status of the command execution for each invocation (each managed node targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
|
96 + | /// <ul>
|
97 + | /// <li>
|
98 + | /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
|
99 + | /// <li>
|
100 + | /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
|
101 + | /// <li>
|
102 + | /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
|
103 + | /// <li>
|
104 + | /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
105 + | /// <li>
|
106 + | /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
107 + | /// <li>
|
108 + | /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
109 + | /// <li>
|
110 + | /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
|
111 + | /// <li>
|
112 + | /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist or might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
113 + | /// <li>
|
114 + | /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
|
115 + | /// <li>
|
116 + | /// <p>Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.</p></li>
|
117 + | /// </ul>
|
118 + | pub fn status_details(&self) -> ::std::option::Option<&str> {
|
119 + | self.status_details.as_deref()
|
120 + | }
|
121 + | /// <p>Gets the trace output sent by the agent.</p>
|
122 + | pub fn trace_output(&self) -> ::std::option::Option<&str> {
|
123 + | self.trace_output.as_deref()
|
124 + | }
|
125 + | /// <p>The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardOutputUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
126 + | pub fn standard_output_url(&self) -> ::std::option::Option<&str> {
|
127 + | self.standard_output_url.as_deref()
|
128 + | }
|
129 + | /// <p>The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardErrorUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
130 + | pub fn standard_error_url(&self) -> ::std::option::Option<&str> {
|
131 + | self.standard_error_url.as_deref()
|
132 + | }
|
133 + | /// <p>Plugins processed by the command.</p>
|
134 + | ///
|
135 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.command_plugins.is_none()`.
|
136 + | pub fn command_plugins(&self) -> &[crate::types::CommandPlugin] {
|
137 + | self.command_plugins.as_deref().unwrap_or_default()
|
138 + | }
|
139 + | /// <p>The Identity and Access Management (IAM) service role that Run Command, a tool in Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes on a per managed node basis.</p>
|
140 + | pub fn service_role(&self) -> ::std::option::Option<&str> {
|
141 + | self.service_role.as_deref()
|
142 + | }
|
143 + | /// <p>Configurations for sending notifications about command status changes on a per managed node basis.</p>
|
144 + | pub fn notification_config(&self) -> ::std::option::Option<&crate::types::NotificationConfig> {
|
145 + | self.notification_config.as_ref()
|
146 + | }
|
147 + | /// <p>Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.</p>
|
148 + | pub fn cloud_watch_output_config(&self) -> ::std::option::Option<&crate::types::CloudWatchOutputConfig> {
|
149 + | self.cloud_watch_output_config.as_ref()
|
150 + | }
|
151 + | }
|
152 + | static COMMANDINVOCATION_MEMBER_COMMAND_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
153 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandInvocation$CommandId", "com.amazonaws.ssm", "CommandInvocation"),
|
154 + | ::aws_smithy_schema::ShapeType::String,
|
155 + | "CommandId",
|
156 + | 0,
|
157 + | );
|
158 + | static COMMANDINVOCATION_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
159 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandInvocation$InstanceId", "com.amazonaws.ssm", "CommandInvocation"),
|
160 + | ::aws_smithy_schema::ShapeType::String,
|
161 + | "InstanceId",
|
162 + | 1,
|
163 + | );
|
164 + | static COMMANDINVOCATION_MEMBER_INSTANCE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
165 + | ::aws_smithy_schema::ShapeId::from_parts(
|
166 + | "com.amazonaws.ssm#CommandInvocation$InstanceName",
|
167 + | "com.amazonaws.ssm",
|
168 + | "CommandInvocation",
|
169 + | ),
|
170 + | ::aws_smithy_schema::ShapeType::String,
|
171 + | "InstanceName",
|
172 + | 2,
|
173 + | );
|
174 + | static COMMANDINVOCATION_MEMBER_COMMENT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
175 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandInvocation$Comment", "com.amazonaws.ssm", "CommandInvocation"),
|
176 + | ::aws_smithy_schema::ShapeType::String,
|
177 + | "Comment",
|
178 + | 3,
|
179 + | );
|
180 + | static COMMANDINVOCATION_MEMBER_DOCUMENT_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
181 + | ::aws_smithy_schema::ShapeId::from_parts(
|
182 + | "com.amazonaws.ssm#CommandInvocation$DocumentName",
|
183 + | "com.amazonaws.ssm",
|
184 + | "CommandInvocation",
|
185 + | ),
|
186 + | ::aws_smithy_schema::ShapeType::String,
|
187 + | "DocumentName",
|
188 + | 4,
|
189 + | );
|
190 + | static COMMANDINVOCATION_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
191 + | ::aws_smithy_schema::ShapeId::from_parts(
|
192 + | "com.amazonaws.ssm#CommandInvocation$DocumentVersion",
|
193 + | "com.amazonaws.ssm",
|
194 + | "CommandInvocation",
|
195 + | ),
|
196 + | ::aws_smithy_schema::ShapeType::String,
|
197 + | "DocumentVersion",
|
198 + | 5,
|
199 + | );
|
200 + | static COMMANDINVOCATION_MEMBER_REQUESTED_DATE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
201 + | ::aws_smithy_schema::ShapeId::from_parts(
|
202 + | "com.amazonaws.ssm#CommandInvocation$RequestedDateTime",
|
203 + | "com.amazonaws.ssm",
|
204 + | "CommandInvocation",
|
205 + | ),
|
206 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
207 + | "RequestedDateTime",
|
208 + | 6,
|
209 + | );
|
210 + | static COMMANDINVOCATION_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
211 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandInvocation$Status", "com.amazonaws.ssm", "CommandInvocation"),
|
212 + | ::aws_smithy_schema::ShapeType::String,
|
213 + | "Status",
|
214 + | 7,
|
215 + | );
|
216 + | static COMMANDINVOCATION_MEMBER_STATUS_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
217 + | ::aws_smithy_schema::ShapeId::from_parts(
|
218 + | "com.amazonaws.ssm#CommandInvocation$StatusDetails",
|
219 + | "com.amazonaws.ssm",
|
220 + | "CommandInvocation",
|
221 + | ),
|
222 + | ::aws_smithy_schema::ShapeType::String,
|
223 + | "StatusDetails",
|
224 + | 8,
|
225 + | );
|
226 + | static COMMANDINVOCATION_MEMBER_TRACE_OUTPUT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
227 + | ::aws_smithy_schema::ShapeId::from_parts(
|
228 + | "com.amazonaws.ssm#CommandInvocation$TraceOutput",
|
229 + | "com.amazonaws.ssm",
|
230 + | "CommandInvocation",
|
231 + | ),
|
232 + | ::aws_smithy_schema::ShapeType::String,
|
233 + | "TraceOutput",
|
234 + | 9,
|
235 + | );
|
236 + | static COMMANDINVOCATION_MEMBER_STANDARD_OUTPUT_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
237 + | ::aws_smithy_schema::ShapeId::from_parts(
|
238 + | "com.amazonaws.ssm#CommandInvocation$StandardOutputUrl",
|
239 + | "com.amazonaws.ssm",
|
240 + | "CommandInvocation",
|
241 + | ),
|
242 + | ::aws_smithy_schema::ShapeType::String,
|
243 + | "StandardOutputUrl",
|
244 + | 10,
|
245 + | );
|
246 + | static COMMANDINVOCATION_MEMBER_STANDARD_ERROR_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
247 + | ::aws_smithy_schema::ShapeId::from_parts(
|
248 + | "com.amazonaws.ssm#CommandInvocation$StandardErrorUrl",
|
249 + | "com.amazonaws.ssm",
|
250 + | "CommandInvocation",
|
251 + | ),
|
252 + | ::aws_smithy_schema::ShapeType::String,
|
253 + | "StandardErrorUrl",
|
254 + | 11,
|
255 + | );
|
256 + | static COMMANDINVOCATION_MEMBER_COMMAND_PLUGINS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
257 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPluginList$member", "com.amazonaws.ssm", "CommandPluginList"),
|
258 + | ::aws_smithy_schema::ShapeType::Structure,
|
259 + | "member",
|
260 + | 0,
|
261 + | );
|
262 + | static COMMANDINVOCATION_MEMBER_COMMAND_PLUGINS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
263 + | ::aws_smithy_schema::ShapeId::from_parts(
|
264 + | "com.amazonaws.ssm#CommandInvocation$CommandPlugins",
|
265 + | "com.amazonaws.ssm",
|
266 + | "CommandInvocation",
|
267 + | ),
|
268 + | ::aws_smithy_schema::ShapeType::List,
|
269 + | "CommandPlugins",
|
270 + | 12,
|
271 + | )
|
272 + | .with_list_member(&COMMANDINVOCATION_MEMBER_COMMAND_PLUGINS_MEMBER);
|
273 + | static COMMANDINVOCATION_MEMBER_SERVICE_ROLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
274 + | ::aws_smithy_schema::ShapeId::from_parts(
|
275 + | "com.amazonaws.ssm#CommandInvocation$ServiceRole",
|
276 + | "com.amazonaws.ssm",
|
277 + | "CommandInvocation",
|
278 + | ),
|
279 + | ::aws_smithy_schema::ShapeType::String,
|
280 + | "ServiceRole",
|
281 + | 13,
|
282 + | );
|
283 + | static COMMANDINVOCATION_MEMBER_NOTIFICATION_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
284 + | ::aws_smithy_schema::ShapeId::from_parts(
|
285 + | "com.amazonaws.ssm#CommandInvocation$NotificationConfig",
|
286 + | "com.amazonaws.ssm",
|
287 + | "CommandInvocation",
|
288 + | ),
|
289 + | ::aws_smithy_schema::ShapeType::Structure,
|
290 + | "NotificationConfig",
|
291 + | 14,
|
292 + | );
|
293 + | static COMMANDINVOCATION_MEMBER_CLOUD_WATCH_OUTPUT_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
294 + | ::aws_smithy_schema::ShapeId::from_parts(
|
295 + | "com.amazonaws.ssm#CommandInvocation$CloudWatchOutputConfig",
|
296 + | "com.amazonaws.ssm",
|
297 + | "CommandInvocation",
|
298 + | ),
|
299 + | ::aws_smithy_schema::ShapeType::Structure,
|
300 + | "CloudWatchOutputConfig",
|
301 + | 15,
|
302 + | );
|
303 + | static COMMANDINVOCATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
304 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandInvocation", "com.amazonaws.ssm", "CommandInvocation"),
|
305 + | ::aws_smithy_schema::ShapeType::Structure,
|
306 + | &[
|
307 + | &COMMANDINVOCATION_MEMBER_COMMAND_ID,
|
308 + | &COMMANDINVOCATION_MEMBER_INSTANCE_ID,
|
309 + | &COMMANDINVOCATION_MEMBER_INSTANCE_NAME,
|
310 + | &COMMANDINVOCATION_MEMBER_COMMENT,
|
311 + | &COMMANDINVOCATION_MEMBER_DOCUMENT_NAME,
|
312 + | &COMMANDINVOCATION_MEMBER_DOCUMENT_VERSION,
|
313 + | &COMMANDINVOCATION_MEMBER_REQUESTED_DATE_TIME,
|
314 + | &COMMANDINVOCATION_MEMBER_STATUS,
|
315 + | &COMMANDINVOCATION_MEMBER_STATUS_DETAILS,
|
316 + | &COMMANDINVOCATION_MEMBER_TRACE_OUTPUT,
|
317 + | &COMMANDINVOCATION_MEMBER_STANDARD_OUTPUT_URL,
|
318 + | &COMMANDINVOCATION_MEMBER_STANDARD_ERROR_URL,
|
319 + | &COMMANDINVOCATION_MEMBER_COMMAND_PLUGINS,
|
320 + | &COMMANDINVOCATION_MEMBER_SERVICE_ROLE,
|
321 + | &COMMANDINVOCATION_MEMBER_NOTIFICATION_CONFIG,
|
322 + | &COMMANDINVOCATION_MEMBER_CLOUD_WATCH_OUTPUT_CONFIG,
|
323 + | ],
|
324 + | );
|
325 + | impl CommandInvocation {
|
326 + | /// The schema for this shape.
|
327 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &COMMANDINVOCATION_SCHEMA;
|
328 + | }
|
329 + | impl ::aws_smithy_schema::serde::SerializableStruct for CommandInvocation {
|
330 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
331 + | fn serialize_members(
|
332 + | &self,
|
333 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
334 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
335 + | if let Some(ref val) = self.command_id {
|
336 + | ser.write_string(&COMMANDINVOCATION_MEMBER_COMMAND_ID, val)?;
|
337 + | }
|
338 + | if let Some(ref val) = self.instance_id {
|
339 + | ser.write_string(&COMMANDINVOCATION_MEMBER_INSTANCE_ID, val)?;
|
340 + | }
|
341 + | if let Some(ref val) = self.instance_name {
|
342 + | ser.write_string(&COMMANDINVOCATION_MEMBER_INSTANCE_NAME, val)?;
|
343 + | }
|
344 + | if let Some(ref val) = self.comment {
|
345 + | ser.write_string(&COMMANDINVOCATION_MEMBER_COMMENT, val)?;
|
346 + | }
|
347 + | if let Some(ref val) = self.document_name {
|
348 + | ser.write_string(&COMMANDINVOCATION_MEMBER_DOCUMENT_NAME, val)?;
|
349 + | }
|
350 + | if let Some(ref val) = self.document_version {
|
351 + | ser.write_string(&COMMANDINVOCATION_MEMBER_DOCUMENT_VERSION, val)?;
|
352 + | }
|
353 + | if let Some(ref val) = self.requested_date_time {
|
354 + | ser.write_timestamp(&COMMANDINVOCATION_MEMBER_REQUESTED_DATE_TIME, val)?;
|
355 + | }
|
356 + | if let Some(ref val) = self.status {
|
357 + | ser.write_string(&COMMANDINVOCATION_MEMBER_STATUS, val.as_str())?;
|
358 + | }
|
359 + | if let Some(ref val) = self.status_details {
|
360 + | ser.write_string(&COMMANDINVOCATION_MEMBER_STATUS_DETAILS, val)?;
|
361 + | }
|
362 + | if let Some(ref val) = self.trace_output {
|
363 + | ser.write_string(&COMMANDINVOCATION_MEMBER_TRACE_OUTPUT, val)?;
|
364 + | }
|
365 + | if let Some(ref val) = self.standard_output_url {
|
366 + | ser.write_string(&COMMANDINVOCATION_MEMBER_STANDARD_OUTPUT_URL, val)?;
|
367 + | }
|
368 + | if let Some(ref val) = self.standard_error_url {
|
369 + | ser.write_string(&COMMANDINVOCATION_MEMBER_STANDARD_ERROR_URL, val)?;
|
370 + | }
|
371 + | if let Some(ref val) = self.command_plugins {
|
372 + | ser.write_list(
|
373 + | &COMMANDINVOCATION_MEMBER_COMMAND_PLUGINS,
|
374 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
375 + | for item in val {
|
376 + | ser.write_struct(crate::types::CommandPlugin::SCHEMA, item)?;
|
377 + | }
|
378 + | Ok(())
|
379 + | },
|
380 + | )?;
|
381 + | }
|
382 + | if let Some(ref val) = self.service_role {
|
383 + | ser.write_string(&COMMANDINVOCATION_MEMBER_SERVICE_ROLE, val)?;
|
384 + | }
|
385 + | if let Some(ref val) = self.notification_config {
|
386 + | ser.write_struct(&COMMANDINVOCATION_MEMBER_NOTIFICATION_CONFIG, val)?;
|
387 + | }
|
388 + | if let Some(ref val) = self.cloud_watch_output_config {
|
389 + | ser.write_struct(&COMMANDINVOCATION_MEMBER_CLOUD_WATCH_OUTPUT_CONFIG, val)?;
|
390 + | }
|
391 + | Ok(())
|
392 + | }
|
393 + | }
|
394 + | impl CommandInvocation {
|
395 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
396 + | pub fn deserialize(
|
397 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
398 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
399 + | #[allow(unused_variables, unused_mut)]
|
400 + | let mut builder = Self::builder();
|
401 + | #[allow(
|
402 + | unused_variables,
|
403 + | unreachable_code,
|
404 + | clippy::single_match,
|
405 + | clippy::match_single_binding,
|
406 + | clippy::diverging_sub_expression
|
407 + | )]
|
408 + | deserializer.read_struct(&COMMANDINVOCATION_SCHEMA, &mut |member, deser| {
|
409 + | match member.member_index() {
|
410 + | Some(0) => {
|
411 + | if deser.is_null() {
|
412 + | deser.read_null()?;
|
413 + | } else {
|
414 + | builder.command_id = Some(deser.read_string(member)?);
|
415 + | }
|
416 + | }
|
417 + | Some(1) => {
|
418 + | if deser.is_null() {
|
419 + | deser.read_null()?;
|
420 + | } else {
|
421 + | builder.instance_id = Some(deser.read_string(member)?);
|
422 + | }
|
423 + | }
|
424 + | Some(2) => {
|
425 + | if deser.is_null() {
|
426 + | deser.read_null()?;
|
427 + | } else {
|
428 + | builder.instance_name = Some(deser.read_string(member)?);
|
429 + | }
|
430 + | }
|
431 + | Some(3) => {
|
432 + | if deser.is_null() {
|
433 + | deser.read_null()?;
|
434 + | } else {
|
435 + | builder.comment = Some(deser.read_string(member)?);
|
436 + | }
|
437 + | }
|
438 + | Some(4) => {
|
439 + | if deser.is_null() {
|
440 + | deser.read_null()?;
|
441 + | } else {
|
442 + | builder.document_name = Some(deser.read_string(member)?);
|
443 + | }
|
444 + | }
|
445 + | Some(5) => {
|
446 + | if deser.is_null() {
|
447 + | deser.read_null()?;
|
448 + | } else {
|
449 + | builder.document_version = Some(deser.read_string(member)?);
|
450 + | }
|
451 + | }
|
452 + | Some(6) => {
|
453 + | if deser.is_null() {
|
454 + | deser.read_null()?;
|
455 + | } else {
|
456 + | builder.requested_date_time = Some(deser.read_timestamp(member)?);
|
457 + | }
|
458 + | }
|
459 + | Some(7) => {
|
460 + | if deser.is_null() {
|
461 + | deser.read_null()?;
|
462 + | } else {
|
463 + | builder.status = Some(crate::types::CommandInvocationStatus::from(deser.read_string(member)?.as_str()));
|
464 + | }
|
465 + | }
|
466 + | Some(8) => {
|
467 + | if deser.is_null() {
|
468 + | deser.read_null()?;
|
469 + | } else {
|
470 + | builder.status_details = Some(deser.read_string(member)?);
|
471 + | }
|
472 + | }
|
473 + | Some(9) => {
|
474 + | if deser.is_null() {
|
475 + | deser.read_null()?;
|
476 + | } else {
|
477 + | builder.trace_output = Some(deser.read_string(member)?);
|
478 + | }
|
479 + | }
|
480 + | Some(10) => {
|
481 + | if deser.is_null() {
|
482 + | deser.read_null()?;
|
483 + | } else {
|
484 + | builder.standard_output_url = Some(deser.read_string(member)?);
|
485 + | }
|
486 + | }
|
487 + | Some(11) => {
|
488 + | if deser.is_null() {
|
489 + | deser.read_null()?;
|
490 + | } else {
|
491 + | builder.standard_error_url = Some(deser.read_string(member)?);
|
492 + | }
|
493 + | }
|
494 + | Some(12) => {
|
495 + | if deser.is_null() {
|
496 + | deser.read_null()?;
|
497 + | } else {
|
498 + | builder.command_plugins = Some({
|
499 + | let mut container = Vec::new();
|
500 + | deser.read_list(member, &mut |deser| {
|
501 + | container.push(crate::types::CommandPlugin::deserialize(deser)?);
|
502 + | Ok(())
|
503 + | })?;
|
504 + | container
|
505 + | });
|
506 + | }
|
507 + | }
|
508 + | Some(13) => {
|
509 + | if deser.is_null() {
|
510 + | deser.read_null()?;
|
511 + | } else {
|
512 + | builder.service_role = Some(deser.read_string(member)?);
|
513 + | }
|
514 + | }
|
515 + | Some(14) => {
|
516 + | if deser.is_null() {
|
517 + | deser.read_null()?;
|
518 + | } else {
|
519 + | builder.notification_config = Some(crate::types::NotificationConfig::deserialize(deser)?);
|
520 + | }
|
521 + | }
|
522 + | Some(15) => {
|
523 + | if deser.is_null() {
|
524 + | deser.read_null()?;
|
525 + | } else {
|
526 + | builder.cloud_watch_output_config = Some(crate::types::CloudWatchOutputConfig::deserialize(deser)?);
|
527 + | }
|
528 + | }
|
529 + | _ => {}
|
530 + | }
|
531 + | Ok(())
|
532 + | })?;
|
533 + | Ok(builder.build())
|
534 + | }
|
535 + | }
|
536 + | impl CommandInvocation {
|
537 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
538 + | pub fn deserialize_with_response(
|
539 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
540 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
541 + | _status: u16,
|
542 + | _body: &[u8],
|
543 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
544 + | Self::deserialize(deserializer)
|
545 + | }
|
546 + | }
|
547 + | impl CommandInvocation {
|
548 + | /// Creates a new builder-style object to manufacture [`CommandInvocation`](crate::types::CommandInvocation).
|
549 + | pub fn builder() -> crate::types::builders::CommandInvocationBuilder {
|
550 + | crate::types::builders::CommandInvocationBuilder::default()
|
551 + | }
|
552 + | }
|
553 + |
|
554 + | /// A builder for [`CommandInvocation`](crate::types::CommandInvocation).
|
555 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
556 + | #[non_exhaustive]
|
557 + | pub struct CommandInvocationBuilder {
|
558 + | pub(crate) command_id: ::std::option::Option<::std::string::String>,
|
559 + | pub(crate) instance_id: ::std::option::Option<::std::string::String>,
|
560 + | pub(crate) instance_name: ::std::option::Option<::std::string::String>,
|
561 + | pub(crate) comment: ::std::option::Option<::std::string::String>,
|
562 + | pub(crate) document_name: ::std::option::Option<::std::string::String>,
|
563 + | pub(crate) document_version: ::std::option::Option<::std::string::String>,
|
564 + | pub(crate) requested_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
565 + | pub(crate) status: ::std::option::Option<crate::types::CommandInvocationStatus>,
|
566 + | pub(crate) status_details: ::std::option::Option<::std::string::String>,
|
567 + | pub(crate) trace_output: ::std::option::Option<::std::string::String>,
|
568 + | pub(crate) standard_output_url: ::std::option::Option<::std::string::String>,
|
569 + | pub(crate) standard_error_url: ::std::option::Option<::std::string::String>,
|
570 + | pub(crate) command_plugins: ::std::option::Option<::std::vec::Vec<crate::types::CommandPlugin>>,
|
571 + | pub(crate) service_role: ::std::option::Option<::std::string::String>,
|
572 + | pub(crate) notification_config: ::std::option::Option<crate::types::NotificationConfig>,
|
573 + | pub(crate) cloud_watch_output_config: ::std::option::Option<crate::types::CloudWatchOutputConfig>,
|
574 + | }
|
575 + | impl CommandInvocationBuilder {
|
576 + | /// <p>The command against which this invocation was requested.</p>
|
577 + | pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
578 + | self.command_id = ::std::option::Option::Some(input.into());
|
579 + | self
|
580 + | }
|
581 + | /// <p>The command against which this invocation was requested.</p>
|
582 + | pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
583 + | self.command_id = input;
|
584 + | self
|
585 + | }
|
586 + | /// <p>The command against which this invocation was requested.</p>
|
587 + | pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
|
588 + | &self.command_id
|
589 + | }
|
590 + | /// <p>The managed node ID in which this invocation was requested.</p>
|
591 + | pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
592 + | self.instance_id = ::std::option::Option::Some(input.into());
|
593 + | self
|
594 + | }
|
595 + | /// <p>The managed node ID in which this invocation was requested.</p>
|
596 + | pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
597 + | self.instance_id = input;
|
598 + | self
|
599 + | }
|
600 + | /// <p>The managed node ID in which this invocation was requested.</p>
|
601 + | pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
|
602 + | &self.instance_id
|
603 + | }
|
604 + | /// <p>The fully qualified host name of the managed node.</p>
|
605 + | pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
606 + | self.instance_name = ::std::option::Option::Some(input.into());
|
607 + | self
|
608 + | }
|
609 + | /// <p>The fully qualified host name of the managed node.</p>
|
610 + | pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
611 + | self.instance_name = input;
|
612 + | self
|
613 + | }
|
614 + | /// <p>The fully qualified host name of the managed node.</p>
|
615 + | pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
|
616 + | &self.instance_name
|
617 + | }
|
618 + | /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
|
619 + | pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
620 + | self.comment = ::std::option::Option::Some(input.into());
|
621 + | self
|
622 + | }
|
623 + | /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
|
624 + | pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
625 + | self.comment = input;
|
626 + | self
|
627 + | }
|
628 + | /// <p>User-specified information about the command, such as a brief description of what the command should do.</p>
|
629 + | pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
|
630 + | &self.comment
|
631 + | }
|
632 + | /// <p>The document name that was requested for execution.</p>
|
633 + | pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
634 + | self.document_name = ::std::option::Option::Some(input.into());
|
635 + | self
|
636 + | }
|
637 + | /// <p>The document name that was requested for execution.</p>
|
638 + | pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
639 + | self.document_name = input;
|
640 + | self
|
641 + | }
|
642 + | /// <p>The document name that was requested for execution.</p>
|
643 + | pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
|
644 + | &self.document_name
|
645 + | }
|
646 + | /// <p>The Systems Manager document (SSM document) version.</p>
|
647 + | pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
648 + | self.document_version = ::std::option::Option::Some(input.into());
|
649 + | self
|
650 + | }
|
651 + | /// <p>The Systems Manager document (SSM document) version.</p>
|
652 + | pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
653 + | self.document_version = input;
|
654 + | self
|
655 + | }
|
656 + | /// <p>The Systems Manager document (SSM document) version.</p>
|
657 + | pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
|
658 + | &self.document_version
|
659 + | }
|
660 + | /// <p>The time and date the request was sent to this managed node.</p>
|
661 + | pub fn requested_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
662 + | self.requested_date_time = ::std::option::Option::Some(input);
|
663 + | self
|
664 + | }
|
665 + | /// <p>The time and date the request was sent to this managed node.</p>
|
666 + | pub fn set_requested_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
667 + | self.requested_date_time = input;
|
668 + | self
|
669 + | }
|
670 + | /// <p>The time and date the request was sent to this managed node.</p>
|
671 + | pub fn get_requested_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
672 + | &self.requested_date_time
|
673 + | }
|
674 + | /// <p>Whether or not the invocation succeeded, failed, or is pending.</p>
|
675 + | pub fn status(mut self, input: crate::types::CommandInvocationStatus) -> Self {
|
676 + | self.status = ::std::option::Option::Some(input);
|
677 + | self
|
678 + | }
|
679 + | /// <p>Whether or not the invocation succeeded, failed, or is pending.</p>
|
680 + | pub fn set_status(mut self, input: ::std::option::Option<crate::types::CommandInvocationStatus>) -> Self {
|
681 + | self.status = input;
|
682 + | self
|
683 + | }
|
684 + | /// <p>Whether or not the invocation succeeded, failed, or is pending.</p>
|
685 + | pub fn get_status(&self) -> &::std::option::Option<crate::types::CommandInvocationStatus> {
|
686 + | &self.status
|
687 + | }
|
688 + | /// <p>A detailed status of the command execution for each invocation (each managed node targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
|
689 + | /// <ul>
|
690 + | /// <li>
|
691 + | /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
|
692 + | /// <li>
|
693 + | /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
|
694 + | /// <li>
|
695 + | /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
|
696 + | /// <li>
|
697 + | /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
698 + | /// <li>
|
699 + | /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
700 + | /// <li>
|
701 + | /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
702 + | /// <li>
|
703 + | /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
|
704 + | /// <li>
|
705 + | /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist or might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
706 + | /// <li>
|
707 + | /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
|
708 + | /// <li>
|
709 + | /// <p>Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.</p></li>
|
710 + | /// </ul>
|
711 + | pub fn status_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
712 + | self.status_details = ::std::option::Option::Some(input.into());
|
713 + | self
|
714 + | }
|
715 + | /// <p>A detailed status of the command execution for each invocation (each managed node targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
|
716 + | /// <ul>
|
717 + | /// <li>
|
718 + | /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
|
719 + | /// <li>
|
720 + | /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
|
721 + | /// <li>
|
722 + | /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
|
723 + | /// <li>
|
724 + | /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
725 + | /// <li>
|
726 + | /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
727 + | /// <li>
|
728 + | /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
729 + | /// <li>
|
730 + | /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
|
731 + | /// <li>
|
732 + | /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist or might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
733 + | /// <li>
|
734 + | /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
|
735 + | /// <li>
|
736 + | /// <p>Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.</p></li>
|
737 + | /// </ul>
|
738 + | pub fn set_status_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
739 + | self.status_details = input;
|
740 + | self
|
741 + | }
|
742 + | /// <p>A detailed status of the command execution for each invocation (each managed node targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
|
743 + | /// <ul>
|
744 + | /// <li>
|
745 + | /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
|
746 + | /// <li>
|
747 + | /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
|
748 + | /// <li>
|
749 + | /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
|
750 + | /// <li>
|
751 + | /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
752 + | /// <li>
|
753 + | /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
754 + | /// <li>
|
755 + | /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
|
756 + | /// <li>
|
757 + | /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
|
758 + | /// <li>
|
759 + | /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist or might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
|
760 + | /// <li>
|
761 + | /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
|
762 + | /// <li>
|
763 + | /// <p>Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.</p></li>
|
764 + | /// </ul>
|
765 + | pub fn get_status_details(&self) -> &::std::option::Option<::std::string::String> {
|
766 + | &self.status_details
|
767 + | }
|
768 + | /// <p>Gets the trace output sent by the agent.</p>
|
769 + | pub fn trace_output(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
770 + | self.trace_output = ::std::option::Option::Some(input.into());
|
771 + | self
|
772 + | }
|
773 + | /// <p>Gets the trace output sent by the agent.</p>
|
774 + | pub fn set_trace_output(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
775 + | self.trace_output = input;
|
776 + | self
|
777 + | }
|
778 + | /// <p>Gets the trace output sent by the agent.</p>
|
779 + | pub fn get_trace_output(&self) -> &::std::option::Option<::std::string::String> {
|
780 + | &self.trace_output
|
781 + | }
|
782 + | /// <p>The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardOutputUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
783 + | pub fn standard_output_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
784 + | self.standard_output_url = ::std::option::Option::Some(input.into());
|
785 + | self
|
786 + | }
|
787 + | /// <p>The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardOutputUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
788 + | pub fn set_standard_output_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
789 + | self.standard_output_url = input;
|
790 + | self
|
791 + | }
|
792 + | /// <p>The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardOutputUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
793 + | pub fn get_standard_output_url(&self) -> &::std::option::Option<::std::string::String> {
|
794 + | &self.standard_output_url
|
795 + | }
|
796 + | /// <p>The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardErrorUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
797 + | pub fn standard_error_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
798 + | self.standard_error_url = ::std::option::Option::Some(input.into());
|
799 + | self
|
800 + | }
|
801 + | /// <p>The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardErrorUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
802 + | pub fn set_standard_error_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
803 + | self.standard_error_url = input;
|
804 + | self
|
805 + | }
|
806 + | /// <p>The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon S3), if the S3 bucket was defined for the parent command. For an invocation, <code>StandardErrorUrl</code> is populated if there is just one plugin defined for the command, and the S3 bucket was defined for the command.</p>
|
807 + | pub fn get_standard_error_url(&self) -> &::std::option::Option<::std::string::String> {
|
808 + | &self.standard_error_url
|
809 + | }
|
810 + | /// Appends an item to `command_plugins`.
|
811 + | ///
|
812 + | /// To override the contents of this collection use [`set_command_plugins`](Self::set_command_plugins).
|
813 + | ///
|
814 + | /// <p>Plugins processed by the command.</p>
|
815 + | pub fn command_plugins(mut self, input: crate::types::CommandPlugin) -> Self {
|
816 + | let mut v = self.command_plugins.unwrap_or_default();
|
817 + | v.push(input);
|
818 + | self.command_plugins = ::std::option::Option::Some(v);
|
819 + | self
|
820 + | }
|
821 + | /// <p>Plugins processed by the command.</p>
|
822 + | pub fn set_command_plugins(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CommandPlugin>>) -> Self {
|
823 + | self.command_plugins = input;
|
824 + | self
|
825 + | }
|
826 + | /// <p>Plugins processed by the command.</p>
|
827 + | pub fn get_command_plugins(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CommandPlugin>> {
|
828 + | &self.command_plugins
|
829 + | }
|
830 + | /// <p>The Identity and Access Management (IAM) service role that Run Command, a tool in Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes on a per managed node basis.</p>
|
831 + | pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
832 + | self.service_role = ::std::option::Option::Some(input.into());
|
833 + | self
|
834 + | }
|
835 + | /// <p>The Identity and Access Management (IAM) service role that Run Command, a tool in Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes on a per managed node basis.</p>
|
836 + | pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
837 + | self.service_role = input;
|
838 + | self
|
839 + | }
|
840 + | /// <p>The Identity and Access Management (IAM) service role that Run Command, a tool in Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes on a per managed node basis.</p>
|
841 + | pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
|
842 + | &self.service_role
|
843 + | }
|
844 + | /// <p>Configurations for sending notifications about command status changes on a per managed node basis.</p>
|
845 + | pub fn notification_config(mut self, input: crate::types::NotificationConfig) -> Self {
|
846 + | self.notification_config = ::std::option::Option::Some(input);
|
847 + | self
|
848 + | }
|
849 + | /// <p>Configurations for sending notifications about command status changes on a per managed node basis.</p>
|
850 + | pub fn set_notification_config(mut self, input: ::std::option::Option<crate::types::NotificationConfig>) -> Self {
|
851 + | self.notification_config = input;
|
852 + | self
|
853 + | }
|
854 + | /// <p>Configurations for sending notifications about command status changes on a per managed node basis.</p>
|
855 + | pub fn get_notification_config(&self) -> &::std::option::Option<crate::types::NotificationConfig> {
|
856 + | &self.notification_config
|
857 + | }
|
858 + | /// <p>Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.</p>
|
859 + | pub fn cloud_watch_output_config(mut self, input: crate::types::CloudWatchOutputConfig) -> Self {
|
860 + | self.cloud_watch_output_config = ::std::option::Option::Some(input);
|
861 + | self
|
862 + | }
|
863 + | /// <p>Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.</p>
|
864 + | pub fn set_cloud_watch_output_config(mut self, input: ::std::option::Option<crate::types::CloudWatchOutputConfig>) -> Self {
|
865 + | self.cloud_watch_output_config = input;
|
866 + | self
|
867 + | }
|
868 + | /// <p>Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.</p>
|
869 + | pub fn get_cloud_watch_output_config(&self) -> &::std::option::Option<crate::types::CloudWatchOutputConfig> {
|
870 + | &self.cloud_watch_output_config
|
871 + | }
|
872 + | /// Consumes the builder and constructs a [`CommandInvocation`](crate::types::CommandInvocation).
|
873 + | pub fn build(self) -> crate::types::CommandInvocation {
|
874 + | crate::types::CommandInvocation {
|
875 + | command_id: self.command_id,
|
876 + | instance_id: self.instance_id,
|
877 + | instance_name: self.instance_name,
|
878 + | comment: self.comment,
|
879 + | document_name: self.document_name,
|
880 + | document_version: self.document_version,
|
881 + | requested_date_time: self.requested_date_time,
|
882 + | status: self.status,
|
883 + | status_details: self.status_details,
|
884 + | trace_output: self.trace_output,
|
885 + | standard_output_url: self.standard_output_url,
|
886 + | standard_error_url: self.standard_error_url,
|
887 + | command_plugins: self.command_plugins,
|
888 + | service_role: self.service_role,
|
889 + | notification_config: self.notification_config,
|
890 + | cloud_watch_output_config: self.cloud_watch_output_config,
|
891 + | }
|
892 + | }
|
893 + | }
|