pub struct Builder { /* private fields */ }
Expand description
A builder for Command
.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn command_id(self, input: impl Into<String>) -> Self
pub fn command_id(self, input: impl Into<String>) -> Self
A unique identifier for this command.
sourcepub fn set_command_id(self, input: Option<String>) -> Self
pub fn set_command_id(self, input: Option<String>) -> Self
A unique identifier for this command.
sourcepub fn document_name(self, input: impl Into<String>) -> Self
pub fn document_name(self, input: impl Into<String>) -> Self
The name of the document requested for execution.
sourcepub fn set_document_name(self, input: Option<String>) -> Self
pub fn set_document_name(self, input: Option<String>) -> Self
The name of the document requested for execution.
sourcepub fn document_version(self, input: impl Into<String>) -> Self
pub fn document_version(self, input: impl Into<String>) -> Self
The Systems Manager document (SSM document) version.
sourcepub fn set_document_version(self, input: Option<String>) -> Self
pub fn set_document_version(self, input: Option<String>) -> Self
The Systems Manager document (SSM document) version.
sourcepub fn comment(self, input: impl Into<String>) -> Self
pub fn comment(self, input: impl Into<String>) -> Self
User-specified information about the command, such as a brief description of what the command should do.
sourcepub fn set_comment(self, input: Option<String>) -> Self
pub fn set_comment(self, input: Option<String>) -> Self
User-specified information about the command, such as a brief description of what the command should do.
sourcepub fn expires_after(self, input: DateTime) -> Self
pub fn expires_after(self, input: DateTime) -> Self
If this time is reached and the command hasn't already started running, it won't run. Calculated based on the ExpiresAfter
user input provided as part of the SendCommand
API operation.
sourcepub fn set_expires_after(self, input: Option<DateTime>) -> Self
pub fn set_expires_after(self, input: Option<DateTime>) -> Self
If this time is reached and the command hasn't already started running, it won't run. Calculated based on the ExpiresAfter
user input provided as part of the SendCommand
API operation.
sourcepub fn parameters(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn parameters(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to parameters
.
To override the contents of this collection use set_parameters
.
The parameter values to be inserted in the document when running the command.
sourcepub fn set_parameters(self, input: Option<HashMap<String, Vec<String>>>) -> Self
pub fn set_parameters(self, input: Option<HashMap<String, Vec<String>>>) -> Self
The parameter values to be inserted in the document when running the command.
sourcepub fn instance_ids(self, input: impl Into<String>) -> Self
pub fn instance_ids(self, input: impl Into<String>) -> Self
Appends an item to instance_ids
.
To override the contents of this collection use set_instance_ids
.
The managed node IDs against which this command was requested.
sourcepub fn set_instance_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_instance_ids(self, input: Option<Vec<String>>) -> Self
The managed node IDs against which this command was requested.
sourcepub fn targets(self, input: Target) -> Self
pub fn targets(self, input: Target) -> Self
Appends an item to targets
.
To override the contents of this collection use set_targets
.
An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.
sourcepub fn set_targets(self, input: Option<Vec<Target>>) -> Self
pub fn set_targets(self, input: Option<Vec<Target>>) -> Self
An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.
sourcepub fn requested_date_time(self, input: DateTime) -> Self
pub fn requested_date_time(self, input: DateTime) -> Self
The date and time the command was requested.
sourcepub fn set_requested_date_time(self, input: Option<DateTime>) -> Self
pub fn set_requested_date_time(self, input: Option<DateTime>) -> Self
The date and time the command was requested.
sourcepub fn status(self, input: CommandStatus) -> Self
pub fn status(self, input: CommandStatus) -> Self
The status of the command.
sourcepub fn set_status(self, input: Option<CommandStatus>) -> Self
pub fn set_status(self, input: Option<CommandStatus>) -> Self
The status of the command.
sourcepub fn status_details(self, input: impl Into<String>) -> Self
pub fn status_details(self, input: impl Into<String>) -> Self
A detailed status of the command execution. 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 Understanding command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the following values:
-
Pending: The command hasn't been sent to any managed nodes.
-
In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.
-
Success: The command successfully ran on all invocations. This is a terminal state.
-
Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
-
Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
-
Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
-
Incomplete: The command was attempted on all managed nodes and one or more invocations doesn't have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
-
Cancelled: The command was terminated before it was completed. This is a terminal state.
-
Rate Exceeded: The number of managed nodes targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before running it on any managed node. This is a terminal state.
sourcepub fn set_status_details(self, input: Option<String>) -> Self
pub fn set_status_details(self, input: Option<String>) -> Self
A detailed status of the command execution. 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 Understanding command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the following values:
-
Pending: The command hasn't been sent to any managed nodes.
-
In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.
-
Success: The command successfully ran on all invocations. This is a terminal state.
-
Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
-
Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
-
Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
-
Incomplete: The command was attempted on all managed nodes and one or more invocations doesn't have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
-
Cancelled: The command was terminated before it was completed. This is a terminal state.
-
Rate Exceeded: The number of managed nodes targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before running it on any managed node. This is a terminal state.
sourcepub fn output_s3_region(self, input: impl Into<String>) -> Self
pub fn output_s3_region(self, input: impl Into<String>) -> Self
(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon Web Services Region of the S3 bucket.
sourcepub fn set_output_s3_region(self, input: Option<String>) -> Self
pub fn set_output_s3_region(self, input: Option<String>) -> Self
(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon Web Services Region of the S3 bucket.
sourcepub fn output_s3_bucket_name(self, input: impl Into<String>) -> Self
pub fn output_s3_bucket_name(self, input: impl Into<String>) -> Self
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
sourcepub fn set_output_s3_bucket_name(self, input: Option<String>) -> Self
pub fn set_output_s3_bucket_name(self, input: Option<String>) -> Self
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
sourcepub fn output_s3_key_prefix(self, input: impl Into<String>) -> Self
pub fn output_s3_key_prefix(self, input: impl Into<String>) -> Self
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
sourcepub fn set_output_s3_key_prefix(self, input: Option<String>) -> Self
pub fn set_output_s3_key_prefix(self, input: Option<String>) -> Self
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
sourcepub fn max_concurrency(self, input: impl Into<String>) -> Self
pub fn max_concurrency(self, input: impl Into<String>) -> Self
The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The default value is 50. For more information about how to use MaxConcurrency
, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
sourcepub fn set_max_concurrency(self, input: Option<String>) -> Self
pub fn set_max_concurrency(self, input: Option<String>) -> Self
The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The default value is 50. For more information about how to use MaxConcurrency
, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
sourcepub fn max_errors(self, input: impl Into<String>) -> Self
pub fn max_errors(self, input: impl Into<String>) -> Self
The maximum number of errors allowed before the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 0
. For more information about how to use MaxErrors
, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
sourcepub fn set_max_errors(self, input: Option<String>) -> Self
pub fn set_max_errors(self, input: Option<String>) -> Self
The maximum number of errors allowed before the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 0
. For more information about how to use MaxErrors
, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
sourcepub fn target_count(self, input: i32) -> Self
pub fn target_count(self, input: i32) -> Self
The number of targets for the command.
sourcepub fn set_target_count(self, input: Option<i32>) -> Self
pub fn set_target_count(self, input: Option<i32>) -> Self
The number of targets for the command.
sourcepub fn completed_count(self, input: i32) -> Self
pub fn completed_count(self, input: i32) -> Self
The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Cancelled, Terminated, or Undeliverable.
sourcepub fn set_completed_count(self, input: Option<i32>) -> Self
pub fn set_completed_count(self, input: Option<i32>) -> Self
The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Cancelled, Terminated, or Undeliverable.
sourcepub fn error_count(self, input: i32) -> Self
pub fn error_count(self, input: i32) -> Self
The number of targets for which the status is Failed or Execution Timed Out.
sourcepub fn set_error_count(self, input: Option<i32>) -> Self
pub fn set_error_count(self, input: Option<i32>) -> Self
The number of targets for which the status is Failed or Execution Timed Out.
sourcepub fn delivery_timed_out_count(self, input: i32) -> Self
pub fn delivery_timed_out_count(self, input: i32) -> Self
The number of targets for which the status is Delivery Timed Out.
sourcepub fn set_delivery_timed_out_count(self, input: Option<i32>) -> Self
pub fn set_delivery_timed_out_count(self, input: Option<i32>) -> Self
The number of targets for which the status is Delivery Timed Out.
sourcepub fn service_role(self, input: impl Into<String>) -> Self
pub fn service_role(self, input: impl Into<String>) -> Self
The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.
sourcepub fn set_service_role(self, input: Option<String>) -> Self
pub fn set_service_role(self, input: Option<String>) -> Self
The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.
sourcepub fn notification_config(self, input: NotificationConfig) -> Self
pub fn notification_config(self, input: NotificationConfig) -> Self
Configurations for sending notifications about command status changes.
sourcepub fn set_notification_config(self, input: Option<NotificationConfig>) -> Self
pub fn set_notification_config(self, input: Option<NotificationConfig>) -> Self
Configurations for sending notifications about command status changes.
sourcepub fn cloud_watch_output_config(self, input: CloudWatchOutputConfig) -> Self
pub fn cloud_watch_output_config(self, input: CloudWatchOutputConfig) -> Self
Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.
sourcepub fn set_cloud_watch_output_config(
self,
input: Option<CloudWatchOutputConfig>
) -> Self
pub fn set_cloud_watch_output_config(
self,
input: Option<CloudWatchOutputConfig>
) -> Self
Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.
sourcepub fn timeout_seconds(self, input: i32) -> Self
pub fn timeout_seconds(self, input: i32) -> Self
The TimeoutSeconds
value specified for a command.
sourcepub fn set_timeout_seconds(self, input: Option<i32>) -> Self
pub fn set_timeout_seconds(self, input: Option<i32>) -> Self
The TimeoutSeconds
value specified for a command.
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more