aws_sdk_iot/client/
get_command_execution.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetCommandExecution`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`execution_id(impl Into<String>)`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::execution_id) / [`set_execution_id(Option<String>)`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::set_execution_id):<br>required: **true**<br><p>The unique identifier for the command execution. This information is returned as a response of the <code>StartCommandExecution</code> API request.</p><br>
7    ///   - [`target_arn(impl Into<String>)`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::target_arn) / [`set_target_arn(Option<String>)`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::set_target_arn):<br>required: **true**<br><p>The Amazon Resource Number (ARN) of the device on which the command execution is being performed.</p><br>
8    ///   - [`include_result(bool)`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::include_result) / [`set_include_result(Option<bool>)`](crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::set_include_result):<br>required: **false**<br><p>Can be used to specify whether to include the result of the command execution in the <code>GetCommandExecution</code> API response. Your device can use this field to provide additional information about the command execution. You only need to specify this field when using the <code>AWS-IoT</code> namespace.</p><br>
9    /// - On success, responds with [`GetCommandExecutionOutput`](crate::operation::get_command_execution::GetCommandExecutionOutput) with field(s):
10    ///   - [`execution_id(Option<String>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::execution_id): <p>The unique identifier of the command execution.</p>
11    ///   - [`command_arn(Option<String>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::command_arn): <p>The Amazon Resource Number (ARN) of the command. For example, <code></code>arn:aws:iot:<region>   :   <accountid>    :command/    <commandid></commandid>   </accountid>  </region></p>
12    ///   - [`target_arn(Option<String>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::target_arn): <p>The Amazon Resource Number (ARN) of the device on which the command execution is being performed.</p>
13    ///   - [`status(Option<CommandExecutionStatus>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::status): <p>The status of the command execution. After your devices receive the command and start performing the operations specified in the command, it can use the <code>UpdateCommandExecution</code> MQTT API to update the status information.</p>
14    ///   - [`status_reason(Option<StatusReason>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::status_reason): <p>Your devices can use this parameter to provide additional context about the status of a command execution using a reason code and description.</p>
15    ///   - [`result(Option<HashMap::<String, CommandExecutionResult>>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::result): <p>The result value for the current state of the command execution. The status provides information about the progress of the command execution. The device can use the result field to share additional details about the execution such as a return value of a remote function call.</p><note>  <p>If you use the <code>AWS-IoT-FleetWise</code> namespace, then this field is not applicable in the API response.</p> </note>
16    ///   - [`parameters(Option<HashMap::<String, CommandParameterValue>>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::parameters): <p>The list of parameters that the <code>StartCommandExecution</code> API used when performing the command on the device.</p>
17    ///   - [`execution_timeout_seconds(Option<i64>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::execution_timeout_seconds): <p>Specifies the amount of time in seconds that the device can take to finish a command execution. A timer starts when the command execution is created. If the command execution status is not set to another terminal state before the timer expires, it will automatically update to <code>TIMED_OUT</code>.</p>
18    ///   - [`created_at(Option<DateTime>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::created_at): <p>The timestamp, when the command execution was created.</p>
19    ///   - [`last_updated_at(Option<DateTime>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::last_updated_at): <p>The timestamp, when the command execution was last updated.</p>
20    ///   - [`started_at(Option<DateTime>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::started_at): <p>The timestamp, when the command execution was started.</p>
21    ///   - [`completed_at(Option<DateTime>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::completed_at): <p>The timestamp, when the command execution was completed.</p>
22    ///   - [`time_to_live(Option<DateTime>)`](crate::operation::get_command_execution::GetCommandExecutionOutput::time_to_live): <p>The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.</p>
23    /// - On failure, responds with [`SdkError<GetCommandExecutionError>`](crate::operation::get_command_execution::GetCommandExecutionError)
24    pub fn get_command_execution(&self) -> crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder {
25        crate::operation::get_command_execution::builders::GetCommandExecutionFluentBuilder::new(self.handle.clone())
26    }
27}