start_automation_execution
¶
start_automation_execution(
document_name: DocumentARN,
*,
config_overrides: Optional[SSMClientConfig] = 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/ssm.py
10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 | |