aws_sdk_ssm/client/
start_automation_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 [`StartAutomationExecution`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`document_name(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::document_name) / [`set_document_name(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_document_name):<br>required: **true**<br><p>The name of the SSM document to run. This can be a public document or a custom document. To run a shared document belonging to another account, specify the document ARN. For more information about how to use shared documents, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-ssm-sharing.html">Sharing SSM documents</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><br>
7    ///   - [`document_version(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::document_version) / [`set_document_version(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_document_version):<br>required: **false**<br><p>The version of the Automation runbook to use for this execution.</p><br>
8    ///   - [`parameters(impl Into<String>, Vec::<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::parameters) / [`set_parameters(Option<HashMap::<String, Vec::<String>>>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_parameters):<br>required: **false**<br><p>A key-value map of execution parameters, which match the declared parameters in the Automation runbook.</p><br>
9    ///   - [`client_token(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_client_token):<br>required: **false**<br><p>User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p><br>
10    ///   - [`mode(ExecutionMode)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::mode) / [`set_mode(Option<ExecutionMode>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_mode):<br>required: **false**<br><p>The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.</p><br>
11    ///   - [`target_parameter_name(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::target_parameter_name) / [`set_target_parameter_name(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_target_parameter_name):<br>required: **false**<br><p>The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.</p><br>
12    ///   - [`targets(Target)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::targets) / [`set_targets(Option<Vec::<Target>>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_targets):<br>required: **false**<br><p>A key-value mapping to target resources. Required if you specify TargetParameterName.</p> <p>If both this parameter and the <code>TargetLocation:Targets</code> parameter are supplied, <code>TargetLocation:Targets</code> takes precedence.</p><br>
13    ///   - [`target_maps(HashMap::<String, Vec::<String>>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::target_maps) / [`set_target_maps(Option<Vec::<HashMap::<String, Vec::<String>>>>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_target_maps):<br>required: **false**<br><p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p><br>
14    ///   - [`max_concurrency(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::max_concurrency) / [`set_max_concurrency(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_max_concurrency):<br>required: **false**<br><p>The maximum number of targets allowed to run this task in parallel. You can specify a number, such as 10, or a percentage, such as 10%. The default value is <code>10</code>.</p> <p>If both this parameter and the <code>TargetLocation:TargetsMaxConcurrency</code> are supplied, <code>TargetLocation:TargetsMaxConcurrency</code> takes precedence.</p><br>
15    ///   - [`max_errors(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::max_errors) / [`set_max_errors(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_max_errors):<br>required: **false**<br><p>The number of errors that are allowed before the system stops running the automation on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops running the automation when the fourth error is received. If you specify 0, then the system stops running the automation on additional targets after the first error result is returned. If you run an automation on 50 resources and set max-errors to 10%, then the system stops running the automation on additional targets when the sixth error is received.</p> <p>Executions that are already running an automation when max-errors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set max-concurrency to 1 so the executions proceed one at a time.</p> <p>If this parameter and the <code>TargetLocation:TargetsMaxErrors</code> parameter are both supplied, <code>TargetLocation:TargetsMaxErrors</code> takes precedence.</p><br>
16    ///   - [`target_locations(TargetLocation)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::target_locations) / [`set_target_locations(Option<Vec::<TargetLocation>>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_target_locations):<br>required: **false**<br><p>A location is a combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the automation. Use this operation to start an automation in multiple Amazon Web Services Regions and multiple Amazon Web Services accounts. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html">Running automations in multiple Amazon Web Services Regions and accounts</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><br>
17    ///   - [`tags(Tag)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_tags):<br>required: **false**<br><p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an automation. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an automation to identify an environment or operating system. In this case, you could specify the following key-value pairs:</p> <ul>  <li>   <p><code>Key=environment,Value=test</code></p></li>  <li>   <p><code>Key=OS,Value=Windows</code></p></li> </ul><note>  <p>The <code>Array Members</code> maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the <code>StartAutomationExecution</code> action, you can specify a maximum of 5 tags. You can, however, use the <code>AddTagsToResource</code> action to add up to a total of 50 tags to an existing automation configuration.</p> </note><br>
18    ///   - [`alarm_configuration(AlarmConfiguration)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::alarm_configuration) / [`set_alarm_configuration(Option<AlarmConfiguration>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_alarm_configuration):<br>required: **false**<br><p>The CloudWatch alarm you want to apply to your automation.</p><br>
19    ///   - [`target_locations_url(impl Into<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::target_locations_url) / [`set_target_locations_url(Option<String>)`](crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::set_target_locations_url):<br>required: **false**<br><p>Specify a publicly accessible URL for a file that contains the <code>TargetLocations</code> body. Currently, only files in presigned Amazon S3 buckets are supported.</p><br>
20    /// - On success, responds with [`StartAutomationExecutionOutput`](crate::operation::start_automation_execution::StartAutomationExecutionOutput) with field(s):
21    ///   - [`automation_execution_id(Option<String>)`](crate::operation::start_automation_execution::StartAutomationExecutionOutput::automation_execution_id): <p>The unique ID of a newly scheduled automation execution.</p>
22    /// - On failure, responds with [`SdkError<StartAutomationExecutionError>`](crate::operation::start_automation_execution::StartAutomationExecutionError)
23    pub fn start_automation_execution(&self) -> crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder {
24        crate::operation::start_automation_execution::builders::StartAutomationExecutionFluentBuilder::new(self.handle.clone())
25    }
26}