start_automation_execution
async
¶
start_automation_execution(
document_name: DocumentARN,
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
document_version: Optional[DocumentVersion] = None,
parameters: Optional[AutomationParameterMap] = None,
client_token: Optional[IdempotencyToken] = None,
mode: Optional[ExecutionMode] = None,
target_parameter_name: Optional[AutomationParameterKey] = None,
targets: Optional[AutomationTargets] = None,
target_maps: Optional[TargetMaps] = None,
max_concurrency: Optional[MaxConcurrency] = None,
max_errors: Optional[MaxErrors] = None,
target_locations: Optional[TargetLocations] = None,
tags: Optional[TagList] = None,
alarm_configuration: Optional[AlarmConfiguration] = None,
target_locations_url: Optional[TargetLocationsURL] = None,
) -> StartAutomationExecutionResult
Initiates execution of an Automation runbook.
Parameters:
-
document_name(DocumentARN) –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 Sharing SSM documents in the Amazon Web Services Systems Manager User Guide.
-
document_version(Optional[DocumentVersion], default:None) –The version of the Automation runbook to use for this execution.
-
parameters(Optional[AutomationParameterMap], default:None) –A key-value map of execution parameters, which match the declared parameters in the Automation runbook.
-
client_token(Optional[IdempotencyToken], default:None) –User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.
-
mode(Optional[ExecutionMode], default:None) –The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.
-
target_parameter_name(Optional[AutomationParameterKey], default:None) –The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.
-
targets(Optional[AutomationTargets], default:None) –A key-value mapping to target resources. Required if you specify TargetParameterName.
If both this parameter and the
TargetLocation:Targetsparameter are supplied,TargetLocation:Targetstakes precedence. -
target_maps(Optional[TargetMaps], default:None) –A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
-
max_concurrency(Optional[MaxConcurrency], default:None) –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
10.If both this parameter and the
TargetLocation:TargetsMaxConcurrencyare supplied,TargetLocation:TargetsMaxConcurrencytakes precedence. -
max_errors(Optional[MaxErrors], default:None) –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.
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.
If this parameter and the
TargetLocation:TargetsMaxErrorsparameter are both supplied,TargetLocation:TargetsMaxErrorstakes precedence. -
target_locations(Optional[TargetLocations], default:None) –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 Running automations in multiple Amazon Web Services Regions and accounts in the Amazon Web Services Systems Manager User Guide.
-
tags(Optional[TagList], default:None) –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:
-
Key=environment,Value=test -
Key=OS,Value=Windows
The
Array Membersmaximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling theStartAutomationExecutionaction, you can specify a maximum of 5 tags. You can, however, use the AddTagsToResource action to add up to a total of 50 tags to an existing automation configuration. -
-
alarm_configuration(Optional[AlarmConfiguration], default:None) –The CloudWatch alarm you want to apply to your automation.
-
target_locations_url(Optional[TargetLocationsURL], default:None) –Specify a publicly accessible URL for a file that contains the
TargetLocationsbody. Currently, only files in presigned Amazon S3 buckets are supported.
Raises:
-
AutomationDefinitionNotFoundException–An Automation runbook with the specified name couldn't be found.
-
AutomationDefinitionVersionNotFoundException–An Automation runbook with the specified name and version couldn't be found.
-
AutomationExecutionLimitExceededException–The number of simultaneously running Automation executions exceeded the allowable limit.
-
IdempotentParameterMismatch–Error returned when an idempotent operation is retried and the parameters don't match the original call to the API with the same idempotency token.
-
InternalServerError–An error occurred on the server side.
-
InvalidAutomationExecutionParametersException–The supplied parameters for invoking the specified Automation runbook are incorrect. For example, they may not match the set of parameters permitted for the specified Automation document.
-
InvalidTarget–The target isn't valid or doesn't exist. It might not be configured for Systems Manager or you might not have permission to perform the operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 | |