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
10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 | |