// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartAutomationExecutionInput {
/// <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>
pub document_name: ::std::option::Option<::std::string::String>,
/// <p>The version of the Automation runbook to use for this execution.</p>
pub document_version: ::std::option::Option<::std::string::String>,
/// <p>A key-value map of execution parameters, which match the declared parameters in the Automation runbook.</p>
pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
/// <p>User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
pub client_token: ::std::option::Option<::std::string::String>,
/// <p>The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.</p>
pub mode: ::std::option::Option<crate::types::ExecutionMode>,
/// <p>The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.</p>
pub target_parameter_name: ::std::option::Option<::std::string::String>,
/// <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>
pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
/// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
pub target_maps:
::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
/// <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>
pub max_concurrency: ::std::option::Option<::std::string::String>,
/// <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>
pub max_errors: ::std::option::Option<::std::string::String>,
/// <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>
pub target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
/// <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>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The CloudWatch alarm you want to apply to your automation.</p>
pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
/// <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>
pub target_locations_url: ::std::option::Option<::std::string::String>,
}
impl StartAutomationExecutionInput {
/// <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>
pub fn document_name(&self) -> ::std::option::Option<&str> {
self.document_name.as_deref()
}
/// <p>The version of the Automation runbook to use for this execution.</p>
pub fn document_version(&self) -> ::std::option::Option<&str> {
self.document_version.as_deref()
}
/// <p>A key-value map of execution parameters, which match the declared parameters in the Automation runbook.</p>
pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
self.parameters.as_ref()
}
/// <p>User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
/// <p>The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.</p>
pub fn mode(&self) -> ::std::option::Option<&crate::types::ExecutionMode> {
self.mode.as_ref()
}
/// <p>The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.</p>
pub fn target_parameter_name(&self) -> ::std::option::Option<&str> {
self.target_parameter_name.as_deref()
}
/// <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>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
pub fn targets(&self) -> &[crate::types::Target] {
self.targets.as_deref().unwrap_or_default()
}
/// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_maps.is_none()`.
pub fn target_maps(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>] {
self.target_maps.as_deref().unwrap_or_default()
}
/// <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>
pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
self.max_concurrency.as_deref()
}
/// <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>
pub fn max_errors(&self) -> ::std::option::Option<&str> {
self.max_errors.as_deref()
}
/// <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>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_locations.is_none()`.
pub fn target_locations(&self) -> &[crate::types::TargetLocation] {
self.target_locations.as_deref().unwrap_or_default()
}
/// <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>
///
/// 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()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The CloudWatch alarm you want to apply to your automation.</p>
pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
self.alarm_configuration.as_ref()
}
/// <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>
pub fn target_locations_url(&self) -> ::std::option::Option<&str> {
self.target_locations_url.as_deref()
}
}
impl StartAutomationExecutionInput {
/// Creates a new builder-style object to manufacture [`StartAutomationExecutionInput`](crate::operation::start_automation_execution::StartAutomationExecutionInput).
pub fn builder() -> crate::operation::start_automation_execution::builders::StartAutomationExecutionInputBuilder {
crate::operation::start_automation_execution::builders::StartAutomationExecutionInputBuilder::default()
}
}
/// A builder for [`StartAutomationExecutionInput`](crate::operation::start_automation_execution::StartAutomationExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartAutomationExecutionInputBuilder {
pub(crate) document_name: ::std::option::Option<::std::string::String>,
pub(crate) document_version: ::std::option::Option<::std::string::String>,
pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) mode: ::std::option::Option<crate::types::ExecutionMode>,
pub(crate) target_parameter_name: ::std::option::Option<::std::string::String>,
pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
pub(crate) target_maps:
::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
pub(crate) max_errors: ::std::option::Option<::std::string::String>,
pub(crate) target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
pub(crate) target_locations_url: ::std::option::Option<::std::string::String>,
}
impl StartAutomationExecutionInputBuilder {
/// <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>
/// This field is required.
pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.document_name = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.document_name = input;
self
}
/// <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>
pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
&self.document_name
}
/// <p>The version of the Automation runbook to use for this execution.</p>
pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.document_version = ::std::option::Option::Some(input.into());
self
}
/// <p>The version of the Automation runbook to use for this execution.</p>
pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.document_version = input;
self
}
/// <p>The version of the Automation runbook to use for this execution.</p>
pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
&self.document_version
}
/// Adds a key-value pair to `parameters`.
///
/// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
///
/// <p>A key-value map of execution parameters, which match the declared parameters in the Automation runbook.</p>
pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.parameters = ::std::option::Option::Some(hash_map);
self
}
/// <p>A key-value map of execution parameters, which match the declared parameters in the Automation runbook.</p>
pub fn set_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
) -> Self {
self.parameters = input;
self
}
/// <p>A key-value map of execution parameters, which match the declared parameters in the Automation runbook.</p>
pub fn get_parameters(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
&self.parameters
}
/// <p>User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// <p>User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// <p>User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// <p>The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.</p>
pub fn mode(mut self, input: crate::types::ExecutionMode) -> Self {
self.mode = ::std::option::Option::Some(input);
self
}
/// <p>The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.</p>
pub fn set_mode(mut self, input: ::std::option::Option<crate::types::ExecutionMode>) -> Self {
self.mode = input;
self
}
/// <p>The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.</p>
pub fn get_mode(&self) -> &::std::option::Option<crate::types::ExecutionMode> {
&self.mode
}
/// <p>The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.</p>
pub fn target_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_parameter_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.</p>
pub fn set_target_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_parameter_name = input;
self
}
/// <p>The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.</p>
pub fn get_target_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
&self.target_parameter_name
}
/// Appends an item to `targets`.
///
/// To override the contents of this collection use [`set_targets`](Self::set_targets).
///
/// <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>
pub fn targets(mut self, input: crate::types::Target) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input);
self.targets = ::std::option::Option::Some(v);
self
}
/// <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>
pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
self.targets = input;
self
}
/// <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>
pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
&self.targets
}
/// Appends an item to `target_maps`.
///
/// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
///
/// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
let mut v = self.target_maps.unwrap_or_default();
v.push(input);
self.target_maps = ::std::option::Option::Some(v);
self
}
/// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
pub fn set_target_maps(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
) -> Self {
self.target_maps = input;
self
}
/// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
pub fn get_target_maps(
&self,
) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
&self.target_maps
}
/// <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>
pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.max_concurrency = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.max_concurrency = input;
self
}
/// <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>
pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
&self.max_concurrency
}
/// <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>
pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.max_errors = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.max_errors = input;
self
}
/// <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>
pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
&self.max_errors
}
/// Appends an item to `target_locations`.
///
/// To override the contents of this collection use [`set_target_locations`](Self::set_target_locations).
///
/// <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>
pub fn target_locations(mut self, input: crate::types::TargetLocation) -> Self {
let mut v = self.target_locations.unwrap_or_default();
v.push(input);
self.target_locations = ::std::option::Option::Some(v);
self
}
/// <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>
pub fn set_target_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>) -> Self {
self.target_locations = input;
self
}
/// <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>
pub fn get_target_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>> {
&self.target_locations
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <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>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <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>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <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>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The CloudWatch alarm you want to apply to your automation.</p>
pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
self.alarm_configuration = ::std::option::Option::Some(input);
self
}
/// <p>The CloudWatch alarm you want to apply to your automation.</p>
pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
self.alarm_configuration = input;
self
}
/// <p>The CloudWatch alarm you want to apply to your automation.</p>
pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
&self.alarm_configuration
}
/// <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>
pub fn target_locations_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_locations_url = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_target_locations_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_locations_url = input;
self
}
/// <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>
pub fn get_target_locations_url(&self) -> &::std::option::Option<::std::string::String> {
&self.target_locations_url
}
/// Consumes the builder and constructs a [`StartAutomationExecutionInput`](crate::operation::start_automation_execution::StartAutomationExecutionInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::start_automation_execution::StartAutomationExecutionInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::start_automation_execution::StartAutomationExecutionInput {
document_name: self.document_name,
document_version: self.document_version,
parameters: self.parameters,
client_token: self.client_token,
mode: self.mode,
target_parameter_name: self.target_parameter_name,
targets: self.targets,
target_maps: self.target_maps,
max_concurrency: self.max_concurrency,
max_errors: self.max_errors,
target_locations: self.target_locations,
tags: self.tags,
alarm_configuration: self.alarm_configuration,
target_locations_url: self.target_locations_url,
})
}
}