AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS Systems Manager StartAutomationExecution API operation.

Syntax

Start-SSMAutomationExecution
-DocumentName <String>
-AlarmConfiguration_Alarm <Alarm[]>
-DocumentVersion <String>
-AlarmConfiguration_IgnorePollAlarmFailure <Boolean>
-MaxConcurrency <String>
-MaxError <String>
-Mode <ExecutionMode>
-Parameter <Hashtable>
-Tag <Tag[]>
-TargetLocation <TargetLocation[]>
-TargetMap <Hashtable[]>
-TargetParameterName <String>
-Target <Target[]>
-ClientToken <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonSimpleSystemsManagementConfig>

Description

Initiates execution of an Automation runbook.

Parameters

-AlarmConfiguration_Alarm <Alarm[]>
The name of the CloudWatch alarm specified in the configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAlarmConfiguration_Alarms
-AlarmConfiguration_IgnorePollAlarmFailure <Boolean>
When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
Amazon.PowerShell.Cmdlets.SSM.AmazonSimpleSystemsManagementClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientToken <String>
User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DocumentName <String>
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.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-DocumentVersion <String>
The version of the Automation runbook to use for this execution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaxConcurrency <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaxError <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMaxErrors
The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Parameter <Hashtable>
A key-value map of execution parameters, which match the declared parameters in the Automation runbook.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesParameters
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the DocumentName parameter. The -PassThru parameter is deprecated, use -Select '^DocumentName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'AutomationExecutionId'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.SimpleSystemsManagement.Model.StartAutomationExecutionResponse). Specifying the name of a property of type Amazon.SimpleSystemsManagement.Model.StartAutomationExecutionResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Tag[]>
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
To add tags to an existing automation, use the AddTagsToResource operation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-Target <Target[]>
A key-value mapping to target resources. Required if you specify TargetParameterName.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargets
-TargetLocation <TargetLocation[]>
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 Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts in the Amazon Web Services Systems Manager User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetLocations
-TargetMap <Hashtable[]>
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargetMaps
-TargetParameterName <String>
The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a System.String object. The service call response (type Amazon.SimpleSystemsManagement.Model.StartAutomationExecutionResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Examples

Example 1

Start-SSMAutomationExecution -DocumentName AWS-UpdateLinuxAmi -Parameter @{'AutomationAssumeRole'='arn:aws:iam::123456789012:role/SSMAutomationRole';'SourceAmiId'='ami-f173cc91';'InstanceIamRole'='EC2InstanceRole'}

3a532a4f-0382-11e7-9df7-6f11185f6dd1
This example runs a document specifying an Automation role, an AMI source ID, and an Amazon EC2 instance role.

Supported Version

AWS Tools for PowerShell: 2.x.y.z