2024/09/17 - Amazon Simple Systems Manager (SSM) - 11 updated api methods
Changes Support for additional levels of cross-account, cross-Region organizational units in Automation. Various documentation updates.
{'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}Response
{'AssociationDescription': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
A State Manager association defines the state that you want to maintain on your managed nodes. For example, an association can specify that anti-virus software must be installed and running on your managed nodes, or that certain ports must be closed. For static targets, the association specifies a schedule for when the configuration is reapplied. For dynamic targets, such as an Amazon Web Services resource group or an Amazon Web Services autoscaling group, State Manager, a capability of Amazon Web Services Systems Manager applies the configuration when new managed nodes are added to the group. The association also specifies actions to take when applying the configuration. For example, an association for anti-virus software might run once a day. If the software isn't installed, then State Manager installs it. If the software is installed, but the service isn't running, then the association might instruct State Manager to start the service.
See also: AWS API Documentation
Request Syntax
client.create_association( Name='string', DocumentVersion='string', InstanceId='string', Parameters={ 'string': [ 'string', ] }, Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], ScheduleExpression='string', OutputLocation={ 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, AssociationName='string', AutomationTargetParameterName='string', MaxErrors='string', MaxConcurrency='string', ComplianceSeverity='CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', SyncCompliance='AUTO'|'MANUAL', ApplyOnlyAtCronInterval=True|False, CalendarNames=[ 'string', ], TargetLocations=[ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], ScheduleOffset=123, Duration=123, TargetMaps=[ { 'string': [ 'string', ] }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ], AlarmConfiguration={ 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] } )
string
[REQUIRED]
The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.
You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.
For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:
arn:partition:ssm:region:account-id:document/document-name
For example:
arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.
string
The document version you want to associate with the targets. Can be a specific version or the default version.
string
The managed node ID.
dict
The parameters for the runtime configuration of the document.
(string) --
(list) --
(string) --
list
The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the InstanceIds key with a value of *. For more information about choosing targets for an association, see Understanding targets and rate controls in State Manager associations in the Amazon Web Services Systems Manager User Guide.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
string
A cron expression when the association will be applied to the targets.
dict
An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
string
Specify a descriptive name for the association.
string
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
string
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
string
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
string
The severity level to assign to the association.
string
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
boolean
By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
list
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
list
A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to create an association in multiple Regions and multiple accounts.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
integer
Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see Reference: Cron and rate expressions for Systems Manager in the Amazon Web Services Systems Manager User Guide.
integer
The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.
The Duration parameter applies only when both these conditions are true:
The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.
The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.
list
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
list
Adds or overwrites one or more tags for a State Manager association. Tags are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.
(dict) --
Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': 'string', 'AssociationVersion': 'string', 'Date': datetime(2015, 1, 1), 'LastUpdateAssociationDate': datetime(2015, 1, 1), 'Status': { 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' }, 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'DocumentVersion': 'string', 'AutomationTargetParameterName': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AssociationId': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'LastExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulExecutionDate': datetime(2015, 1, 1), 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ] } }
Response Structure
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The managed node ID.
AssociationVersion (string) --
The association version.
Date (datetime) --
The date when the association was made.
LastUpdateAssociationDate (datetime) --
The date when the association was last updated.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Overview (dict) --
Information about the association.
Status (string) --
The status of the association. Status can be: Pending, Success, or Failed.
DetailedStatus (string) --
A detailed status of the association.
AssociationStatusAggregatedCount (dict) --
Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
AutomationTargetParameterName (string) --
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
LastExecutionDate (datetime) --
The date on which the association was last run.
LastSuccessfulExecutionDate (datetime) --
The last date on which the association was successfully run.
AssociationName (string) --
The association name.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level that is assigned to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked during the association.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
{'Entries': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}Response
{'Failed': {'Entry': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}, 'Successful': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes or targets.
When you associate a document with one or more managed nodes using IDs or tags, Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed node processes the document and configures the node as specified.
If you associate a document with a managed node that already has an associated document, the system returns the AssociationAlreadyExists exception.
See also: AWS API Documentation
Request Syntax
client.create_association_batch( Entries=[ { 'Name': 'string', 'InstanceId': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AutomationTargetParameterName': 'string', 'DocumentVersion': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] } }, ] )
list
[REQUIRED]
One or more associations.
(dict) --
Describes the association of a Amazon Web Services Systems Manager document (SSM document) and a managed node.
Name (string) -- [REQUIRED]
The name of the SSM document that contains the configuration information for the managed node. You can specify Command or Automation runbooks.
You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.
For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:
arn:aws:ssm:region:account-id:document/document-name
For example:
arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.
InstanceId (string) --
The managed node ID.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AutomationTargetParameterName (string) --
Specify the target for the association. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
DocumentVersion (string) --
The document version.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the results of this request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
AssociationName (string) --
Specify a descriptive name for the association.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level to assign to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
Use this action to create an association in multiple Regions and multiple accounts.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.
The Duration parameter applies only when both these conditions are true:
The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.
The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
dict
Response Syntax
{ 'Successful': [ { 'Name': 'string', 'InstanceId': 'string', 'AssociationVersion': 'string', 'Date': datetime(2015, 1, 1), 'LastUpdateAssociationDate': datetime(2015, 1, 1), 'Status': { 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' }, 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'DocumentVersion': 'string', 'AutomationTargetParameterName': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AssociationId': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'LastExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulExecutionDate': datetime(2015, 1, 1), 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ] }, ], 'Failed': [ { 'Entry': { 'Name': 'string', 'InstanceId': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AutomationTargetParameterName': 'string', 'DocumentVersion': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] } }, 'Message': 'string', 'Fault': 'Client'|'Server'|'Unknown' }, ] }
Response Structure
(dict) --
Successful (list) --
Information about the associations that succeeded.
(dict) --
Describes the parameters for a document.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The managed node ID.
AssociationVersion (string) --
The association version.
Date (datetime) --
The date when the association was made.
LastUpdateAssociationDate (datetime) --
The date when the association was last updated.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Overview (dict) --
Information about the association.
Status (string) --
The status of the association. Status can be: Pending, Success, or Failed.
DetailedStatus (string) --
A detailed status of the association.
AssociationStatusAggregatedCount (dict) --
Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
AutomationTargetParameterName (string) --
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
LastExecutionDate (datetime) --
The date on which the association was last run.
LastSuccessfulExecutionDate (datetime) --
The last date on which the association was successfully run.
AssociationName (string) --
The association name.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level that is assigned to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked during the association.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
Failed (list) --
Information about the associations that failed.
(dict) --
Describes a failed association.
Entry (dict) --
The association.
Name (string) --
The name of the SSM document that contains the configuration information for the managed node. You can specify Command or Automation runbooks.
You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.
For SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:
arn:aws:ssm:region:account-id:document/document-name
For example:
arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.
InstanceId (string) --
The managed node ID.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AutomationTargetParameterName (string) --
Specify the target for the association. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
DocumentVersion (string) --
The document version.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the results of this request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
AssociationName (string) --
Specify a descriptive name for the association.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level to assign to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
Use this action to create an association in multiple Regions and multiple accounts.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.
The Duration parameter applies only when both these conditions are true:
The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.
The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
Message (string) --
A description of the failure.
Fault (string) --
The source of the failure.
{'AssociationDescription': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Describes the association for the specified target or managed node. If you created the association by using the Targets parameter, then you must retrieve the association by using the association ID.
See also: AWS API Documentation
Request Syntax
client.describe_association( Name='string', InstanceId='string', AssociationId='string', AssociationVersion='string' )
string
The name of the SSM document.
string
The managed node ID.
string
The association ID for which you want information.
string
Specify the association version to retrieve. To view the latest version, either specify $LATEST for this parameter, or omit this parameter. To view a list of all associations for a managed node, use ListAssociations. To get a list of versions for a specific association, use ListAssociationVersions.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': 'string', 'AssociationVersion': 'string', 'Date': datetime(2015, 1, 1), 'LastUpdateAssociationDate': datetime(2015, 1, 1), 'Status': { 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' }, 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'DocumentVersion': 'string', 'AutomationTargetParameterName': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AssociationId': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'LastExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulExecutionDate': datetime(2015, 1, 1), 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ] } }
Response Structure
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The managed node ID.
AssociationVersion (string) --
The association version.
Date (datetime) --
The date when the association was made.
LastUpdateAssociationDate (datetime) --
The date when the association was last updated.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Overview (dict) --
Information about the association.
Status (string) --
The status of the association. Status can be: Pending, Success, or Failed.
DetailedStatus (string) --
A detailed status of the association.
AssociationStatusAggregatedCount (dict) --
Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
AutomationTargetParameterName (string) --
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
LastExecutionDate (datetime) --
The date on which the association was last run.
LastSuccessfulExecutionDate (datetime) --
The last date on which the association was successfully run.
AssociationName (string) --
The association name.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level that is assigned to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked during the association.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
{'AutomationExecutionMetadataList': {'Runbooks': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}, 'TargetLocationsURL': 'string'}}
Provides details about all active and terminated Automation executions.
See also: AWS API Documentation
Request Syntax
client.describe_automation_executions( Filters=[ { 'Key': 'DocumentNamePrefix'|'ExecutionStatus'|'ExecutionId'|'ParentExecutionId'|'CurrentAction'|'StartTimeBefore'|'StartTimeAfter'|'AutomationType'|'TagKey'|'TargetResourceGroup'|'AutomationSubtype'|'OpsItemId', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
list
Filters used to limit the scope of executions that are requested.
(dict) --
A filter used to match specific automation executions. This is used to limit the scope of Automation execution information returned.
Key (string) -- [REQUIRED]
One or more keys to limit the results.
Values (list) -- [REQUIRED]
The values used to limit the execution information associated with the filter's key.
(string) --
integer
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
string
The token for the next set of items to return. (You received this token from a previous call.)
dict
Response Syntax
{ 'AutomationExecutionMetadataList': [ { 'AutomationExecutionId': 'string', 'DocumentName': 'string', 'DocumentVersion': 'string', 'AutomationExecutionStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed'|'PendingApproval'|'Approved'|'Rejected'|'Scheduled'|'RunbookInProgress'|'PendingChangeCalendarOverride'|'ChangeCalendarOverrideApproved'|'ChangeCalendarOverrideRejected'|'CompletedWithSuccess'|'CompletedWithFailure'|'Exited', 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'ExecutedBy': 'string', 'LogFile': 'string', 'Outputs': { 'string': [ 'string', ] }, 'Mode': 'Auto'|'Interactive', 'ParentAutomationExecutionId': 'string', 'CurrentStepName': 'string', 'CurrentAction': 'string', 'FailureMessage': 'string', 'TargetParameterName': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'ResolvedTargets': { 'ParameterValues': [ 'string', ], 'Truncated': True|False }, 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'Target': 'string', 'AutomationType': 'CrossAccount'|'Local', 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ], 'TargetLocationsURL': 'string', 'AutomationSubtype': 'ChangeRequest', 'ScheduledTime': datetime(2015, 1, 1), 'Runbooks': [ { 'DocumentName': 'string', 'DocumentVersion': 'string', 'Parameters': { 'string': [ 'string', ] }, 'TargetParameterName': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ] }, ], 'OpsItemId': 'string', 'AssociationId': 'string', 'ChangeRequestName': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
AutomationExecutionMetadataList (list) --
The list of details about each automation execution which has occurred which matches the filter specification, if any.
(dict) --
Details about a specific Automation execution.
AutomationExecutionId (string) --
The execution ID.
DocumentName (string) --
The name of the Automation runbook used during execution.
DocumentVersion (string) --
The document version used during the execution.
AutomationExecutionStatus (string) --
The status of the execution.
ExecutionStartTime (datetime) --
The time the execution started.
ExecutionEndTime (datetime) --
The time the execution finished. This isn't populated if the execution is still in progress.
ExecutedBy (string) --
The IAM role ARN of the user who ran the automation.
LogFile (string) --
An S3 bucket where execution information is stored.
Outputs (dict) --
The list of execution outputs as defined in the Automation runbook.
(string) --
(list) --
(string) --
Mode (string) --
The Automation execution mode.
ParentAutomationExecutionId (string) --
The execution ID of the parent automation.
CurrentStepName (string) --
The name of the step that is currently running.
CurrentAction (string) --
The action of the step that is currently running.
FailureMessage (string) --
The list of execution outputs as defined in the Automation runbook.
TargetParameterName (string) --
The list of execution outputs as defined in the Automation runbook.
Targets (list) --
The targets defined by the user when starting the automation.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetMaps (list) --
The specified key-value mapping of document parameters to target resources.
(dict) --
(string) --
(list) --
(string) --
ResolvedTargets (dict) --
A list of targets that resolved during the execution.
ParameterValues (list) --
A list of parameter values sent to targets that resolved during the Automation execution.
(string) --
Truncated (boolean) --
A boolean value indicating whether the resolved target list is truncated.
MaxConcurrency (string) --
The MaxConcurrency value specified by the user when starting the automation.
MaxErrors (string) --
The MaxErrors value specified by the user when starting the automation.
Target (string) --
The list of execution outputs as defined in the Automation runbook.
AutomationType (string) --
Use this filter with DescribeAutomationExecutions. Specify either Local or CrossAccount. CrossAccount is an Automation that runs in multiple Amazon Web Services Regions and 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.
AlarmConfiguration (dict) --
The details for the CloudWatch alarm applied to your automation.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked by the automation.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
TargetLocationsURL (string) --
A publicly accessible URL for a file that contains the TargetLocations body. Currently, only files in presigned Amazon S3 buckets are supported
AutomationSubtype (string) --
The subtype of the Automation operation. Currently, the only supported value is ChangeRequest.
ScheduledTime (datetime) --
The date and time the Automation operation is scheduled to start.
Runbooks (list) --
Information about the Automation runbooks that are run during a runbook workflow in Change Manager.
(dict) --
Information about an Automation runbook used in a runbook workflow in Change Manager.
DocumentName (string) --
The name of the Automation runbook used in a runbook workflow.
DocumentVersion (string) --
The version of the Automation runbook used in a runbook workflow.
Parameters (dict) --
The key-value map of execution parameters, which were supplied when calling StartChangeRequestExecution.
(string) --
(list) --
(string) --
TargetParameterName (string) --
The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify Targets.
Targets (list) --
A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify TargetParameterName.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetMaps (list) --
A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
MaxConcurrency (string) --
The MaxConcurrency value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.
MaxErrors (string) --
The MaxErrors value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.
TargetLocations (list) --
Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
OpsItemId (string) --
The ID of an OpsItem that is created to represent a Change Manager change request.
AssociationId (string) --
The ID of a State Manager association used in the Automation operation.
ChangeRequestName (string) --
The name of the Change Manager change request.
NextToken (string) --
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
{'StepExecutions': {'TargetLocation': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Information about all active and terminated step executions in an Automation workflow.
See also: AWS API Documentation
Request Syntax
client.describe_automation_step_executions( AutomationExecutionId='string', Filters=[ { 'Key': 'StartTimeBefore'|'StartTimeAfter'|'StepExecutionStatus'|'StepExecutionId'|'StepName'|'Action'|'ParentStepExecutionId'|'ParentStepIteration'|'ParentStepIteratorValue', 'Values': [ 'string', ] }, ], NextToken='string', MaxResults=123, ReverseOrder=True|False )
string
[REQUIRED]
The Automation execution ID for which you want step execution descriptions.
list
One or more filters to limit the number of step executions returned by the request.
(dict) --
A filter to limit the amount of step execution information returned by the call.
Key (string) -- [REQUIRED]
One or more keys to limit the results.
Values (list) -- [REQUIRED]
The values of the filter key.
(string) --
string
The token for the next set of items to return. (You received this token from a previous call.)
integer
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
boolean
Indicates whether to list step executions in reverse order by start time. The default value is 'false'.
dict
Response Syntax
{ 'StepExecutions': [ { 'StepName': 'string', 'Action': 'string', 'TimeoutSeconds': 123, 'OnFailure': 'string', 'MaxAttempts': 123, 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'StepStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed'|'PendingApproval'|'Approved'|'Rejected'|'Scheduled'|'RunbookInProgress'|'PendingChangeCalendarOverride'|'ChangeCalendarOverrideApproved'|'ChangeCalendarOverrideRejected'|'CompletedWithSuccess'|'CompletedWithFailure'|'Exited', 'ResponseCode': 'string', 'Inputs': { 'string': 'string' }, 'Outputs': { 'string': [ 'string', ] }, 'Response': 'string', 'FailureMessage': 'string', 'FailureDetails': { 'FailureStage': 'string', 'FailureType': 'string', 'Details': { 'string': [ 'string', ] } }, 'StepExecutionId': 'string', 'OverriddenParameters': { 'string': [ 'string', ] }, 'IsEnd': True|False, 'NextStep': 'string', 'IsCritical': True|False, 'ValidNextSteps': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetLocation': { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ], 'ParentStepDetails': { 'StepExecutionId': 'string', 'StepName': 'string', 'Action': 'string', 'Iteration': 123, 'IteratorValue': 'string' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
StepExecutions (list) --
A list of details about the current state of all steps that make up an execution.
(dict) --
Detailed information about an the execution state of an Automation step.
StepName (string) --
The name of this execution step.
Action (string) --
The action this step performs. The action determines the behavior of the step.
TimeoutSeconds (integer) --
The timeout seconds of the step.
OnFailure (string) --
The action to take if the step fails. The default value is Abort.
MaxAttempts (integer) --
The maximum number of tries to run the action of the step. The default value is 1.
ExecutionStartTime (datetime) --
If a step has begun execution, this contains the time the step started. If the step is in Pending status, this field isn't populated.
ExecutionEndTime (datetime) --
If a step has finished execution, this contains the time the execution ended. If the step hasn't yet concluded, this field isn't populated.
StepStatus (string) --
The execution status for this step.
ResponseCode (string) --
The response code returned by the execution of the step.
Inputs (dict) --
Fully-resolved values passed into the step before execution.
(string) --
(string) --
Outputs (dict) --
Returned values from the execution of the step.
(string) --
(list) --
(string) --
Response (string) --
A message associated with the response code for an execution.
FailureMessage (string) --
If a step failed, this message explains why the execution failed.
FailureDetails (dict) --
Information about the Automation failure.
FailureStage (string) --
The stage of the Automation execution when the failure occurred. The stages include the following: InputValidation, PreVerification, Invocation, PostVerification.
FailureType (string) --
The type of Automation failure. Failure types include the following: Action, Permission, Throttling, Verification, Internal.
Details (dict) --
Detailed information about the Automation step failure.
(string) --
(list) --
(string) --
StepExecutionId (string) --
The unique ID of a step execution.
OverriddenParameters (dict) --
A user-specified list of parameters to override when running a step.
(string) --
(list) --
(string) --
IsEnd (boolean) --
The flag which can be used to end automation no matter whether the step succeeds or fails.
NextStep (string) --
The next step after the step succeeds.
IsCritical (boolean) --
The flag which can be used to help decide whether the failure of current step leads to the Automation failure.
ValidNextSteps (list) --
Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step fails. Continue will ignore the failure of current step and allow automation to run the next step. With conditional branching, we add step:stepName to support the automation to go to another specific step.
(string) --
Targets (list) --
The targets for the step execution.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetLocation (dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
TriggeredAlarms (list) --
The CloudWatch alarms that were invoked by the automation.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
ParentStepDetails (dict) --
Information about the parent step.
StepExecutionId (string) --
The unique ID of a step execution.
StepName (string) --
The name of the step.
Action (string) --
The name of the automation action.
Iteration (integer) --
The current repetition of the loop represented by an integer.
IteratorValue (string) --
The current value of the specified iterator in the loop.
NextToken (string) --
The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.
{'AutomationExecution': {'Runbooks': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}, 'StepExecutions': {'TargetLocation': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}, 'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}, 'TargetLocationsURL': 'string'}}
Get detailed information about a particular Automation execution.
See also: AWS API Documentation
Request Syntax
client.get_automation_execution( AutomationExecutionId='string' )
string
[REQUIRED]
The unique identifier for an existing automation execution to examine. The execution ID is returned by StartAutomationExecution when the execution of an Automation runbook is initiated.
dict
Response Syntax
{ 'AutomationExecution': { 'AutomationExecutionId': 'string', 'DocumentName': 'string', 'DocumentVersion': 'string', 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'AutomationExecutionStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed'|'PendingApproval'|'Approved'|'Rejected'|'Scheduled'|'RunbookInProgress'|'PendingChangeCalendarOverride'|'ChangeCalendarOverrideApproved'|'ChangeCalendarOverrideRejected'|'CompletedWithSuccess'|'CompletedWithFailure'|'Exited', 'StepExecutions': [ { 'StepName': 'string', 'Action': 'string', 'TimeoutSeconds': 123, 'OnFailure': 'string', 'MaxAttempts': 123, 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'StepStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed'|'PendingApproval'|'Approved'|'Rejected'|'Scheduled'|'RunbookInProgress'|'PendingChangeCalendarOverride'|'ChangeCalendarOverrideApproved'|'ChangeCalendarOverrideRejected'|'CompletedWithSuccess'|'CompletedWithFailure'|'Exited', 'ResponseCode': 'string', 'Inputs': { 'string': 'string' }, 'Outputs': { 'string': [ 'string', ] }, 'Response': 'string', 'FailureMessage': 'string', 'FailureDetails': { 'FailureStage': 'string', 'FailureType': 'string', 'Details': { 'string': [ 'string', ] } }, 'StepExecutionId': 'string', 'OverriddenParameters': { 'string': [ 'string', ] }, 'IsEnd': True|False, 'NextStep': 'string', 'IsCritical': True|False, 'ValidNextSteps': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetLocation': { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ], 'ParentStepDetails': { 'StepExecutionId': 'string', 'StepName': 'string', 'Action': 'string', 'Iteration': 123, 'IteratorValue': 'string' } }, ], 'StepExecutionsTruncated': True|False, 'Parameters': { 'string': [ 'string', ] }, 'Outputs': { 'string': [ 'string', ] }, 'FailureMessage': 'string', 'Mode': 'Auto'|'Interactive', 'ParentAutomationExecutionId': 'string', 'ExecutedBy': 'string', 'CurrentStepName': 'string', 'CurrentAction': 'string', 'TargetParameterName': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'ResolvedTargets': { 'ParameterValues': [ 'string', ], 'Truncated': True|False }, 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'Target': 'string', 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ProgressCounters': { 'TotalSteps': 123, 'SuccessSteps': 123, 'FailedSteps': 123, 'CancelledSteps': 123, 'TimedOutSteps': 123 }, 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ], 'TargetLocationsURL': 'string', 'AutomationSubtype': 'ChangeRequest', 'ScheduledTime': datetime(2015, 1, 1), 'Runbooks': [ { 'DocumentName': 'string', 'DocumentVersion': 'string', 'Parameters': { 'string': [ 'string', ] }, 'TargetParameterName': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ] }, ], 'OpsItemId': 'string', 'AssociationId': 'string', 'ChangeRequestName': 'string', 'Variables': { 'string': [ 'string', ] } } }
Response Structure
(dict) --
AutomationExecution (dict) --
Detailed information about the current state of an automation execution.
AutomationExecutionId (string) --
The execution ID.
DocumentName (string) --
The name of the Automation runbook used during the execution.
DocumentVersion (string) --
The version of the document to use during execution.
ExecutionStartTime (datetime) --
The time the execution started.
ExecutionEndTime (datetime) --
The time the execution finished.
AutomationExecutionStatus (string) --
The execution status of the Automation.
StepExecutions (list) --
A list of details about the current state of all steps that comprise an execution. An Automation runbook contains a list of steps that are run in order.
(dict) --
Detailed information about an the execution state of an Automation step.
StepName (string) --
The name of this execution step.
Action (string) --
The action this step performs. The action determines the behavior of the step.
TimeoutSeconds (integer) --
The timeout seconds of the step.
OnFailure (string) --
The action to take if the step fails. The default value is Abort.
MaxAttempts (integer) --
The maximum number of tries to run the action of the step. The default value is 1.
ExecutionStartTime (datetime) --
If a step has begun execution, this contains the time the step started. If the step is in Pending status, this field isn't populated.
ExecutionEndTime (datetime) --
If a step has finished execution, this contains the time the execution ended. If the step hasn't yet concluded, this field isn't populated.
StepStatus (string) --
The execution status for this step.
ResponseCode (string) --
The response code returned by the execution of the step.
Inputs (dict) --
Fully-resolved values passed into the step before execution.
(string) --
(string) --
Outputs (dict) --
Returned values from the execution of the step.
(string) --
(list) --
(string) --
Response (string) --
A message associated with the response code for an execution.
FailureMessage (string) --
If a step failed, this message explains why the execution failed.
FailureDetails (dict) --
Information about the Automation failure.
FailureStage (string) --
The stage of the Automation execution when the failure occurred. The stages include the following: InputValidation, PreVerification, Invocation, PostVerification.
FailureType (string) --
The type of Automation failure. Failure types include the following: Action, Permission, Throttling, Verification, Internal.
Details (dict) --
Detailed information about the Automation step failure.
(string) --
(list) --
(string) --
StepExecutionId (string) --
The unique ID of a step execution.
OverriddenParameters (dict) --
A user-specified list of parameters to override when running a step.
(string) --
(list) --
(string) --
IsEnd (boolean) --
The flag which can be used to end automation no matter whether the step succeeds or fails.
NextStep (string) --
The next step after the step succeeds.
IsCritical (boolean) --
The flag which can be used to help decide whether the failure of current step leads to the Automation failure.
ValidNextSteps (list) --
Strategies used when step fails, we support Continue and Abort. Abort will fail the automation when the step fails. Continue will ignore the failure of current step and allow automation to run the next step. With conditional branching, we add step:stepName to support the automation to go to another specific step.
(string) --
Targets (list) --
The targets for the step execution.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetLocation (dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
TriggeredAlarms (list) --
The CloudWatch alarms that were invoked by the automation.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
ParentStepDetails (dict) --
Information about the parent step.
StepExecutionId (string) --
The unique ID of a step execution.
StepName (string) --
The name of the step.
Action (string) --
The name of the automation action.
Iteration (integer) --
The current repetition of the loop represented by an integer.
IteratorValue (string) --
The current value of the specified iterator in the loop.
StepExecutionsTruncated (boolean) --
A boolean value that indicates if the response contains the full list of the Automation step executions. If true, use the DescribeAutomationStepExecutions API operation to get the full list of step executions.
Parameters (dict) --
The key-value map of execution parameters, which were supplied when calling StartAutomationExecution.
(string) --
(list) --
(string) --
Outputs (dict) --
The list of execution outputs as defined in the Automation runbook.
(string) --
(list) --
(string) --
FailureMessage (string) --
A message describing why an execution has failed, if the status is set to Failed.
Mode (string) --
The automation execution mode.
ParentAutomationExecutionId (string) --
The AutomationExecutionId of the parent automation.
ExecutedBy (string) --
The Amazon Resource Name (ARN) of the user who ran the automation.
CurrentStepName (string) --
The name of the step that is currently running.
CurrentAction (string) --
The action of the step that is currently running.
TargetParameterName (string) --
The parameter name.
Targets (list) --
The specified targets.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetMaps (list) --
The specified key-value mapping of document parameters to target resources.
(dict) --
(string) --
(list) --
(string) --
ResolvedTargets (dict) --
A list of resolved targets in the rate control execution.
ParameterValues (list) --
A list of parameter values sent to targets that resolved during the Automation execution.
(string) --
Truncated (boolean) --
A boolean value indicating whether the resolved target list is truncated.
MaxConcurrency (string) --
The MaxConcurrency value specified by the user when the execution started.
MaxErrors (string) --
The MaxErrors value specified by the user when the execution started.
Target (string) --
The target of the execution.
TargetLocations (list) --
The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the Automation.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ProgressCounters (dict) --
An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution.
TotalSteps (integer) --
The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.
SuccessSteps (integer) --
The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.
FailedSteps (integer) --
The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.
CancelledSteps (integer) --
The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.
TimedOutSteps (integer) --
The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.
AlarmConfiguration (dict) --
The details for the CloudWatch alarm applied to your automation.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked by the automation.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
TargetLocationsURL (string) --
A publicly accessible URL for a file that contains the TargetLocations body. Currently, only files in presigned Amazon S3 buckets are supported
AutomationSubtype (string) --
The subtype of the Automation operation. Currently, the only supported value is ChangeRequest.
ScheduledTime (datetime) --
The date and time the Automation operation is scheduled to start.
Runbooks (list) --
Information about the Automation runbooks that are run as part of a runbook workflow.
(dict) --
Information about an Automation runbook used in a runbook workflow in Change Manager.
DocumentName (string) --
The name of the Automation runbook used in a runbook workflow.
DocumentVersion (string) --
The version of the Automation runbook used in a runbook workflow.
Parameters (dict) --
The key-value map of execution parameters, which were supplied when calling StartChangeRequestExecution.
(string) --
(list) --
(string) --
TargetParameterName (string) --
The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify Targets.
Targets (list) --
A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify TargetParameterName.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetMaps (list) --
A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
MaxConcurrency (string) --
The MaxConcurrency value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.
MaxErrors (string) --
The MaxErrors value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.
TargetLocations (list) --
Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
OpsItemId (string) --
The ID of an OpsItem that is created to represent a Change Manager change request.
AssociationId (string) --
The ID of a State Manager association used in the Automation operation.
ChangeRequestName (string) --
The name of the Change Manager change request.
Variables (dict) --
Variables defined for the automation.
(string) --
(list) --
(string) --
{'AssociationVersions': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Retrieves all versions of an association for a specific association ID.
See also: AWS API Documentation
Request Syntax
client.list_association_versions( AssociationId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The association ID for which you want to view all versions.
integer
The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
string
A token to start the list. Use this token to get the next set of results.
dict
Response Syntax
{ 'AssociationVersions': [ { 'AssociationId': 'string', 'AssociationVersion': 'string', 'CreatedDate': datetime(2015, 1, 1), 'Name': 'string', 'DocumentVersion': 'string', 'Parameters': { 'string': [ 'string', ] }, 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
AssociationVersions (list) --
Information about all versions of the association for the specified association ID.
(dict) --
Information about the association version.
AssociationId (string) --
The ID created by the system when the association was created.
AssociationVersion (string) --
The association version.
CreatedDate (datetime) --
The date the association version was created.
Name (string) --
The name specified when the association was created.
DocumentVersion (string) --
The version of an Amazon Web Services Systems Manager document (SSM document) used when the association version was created.
Parameters (dict) --
Parameters specified when the association version was created.
(string) --
(list) --
(string) --
Targets (list) --
The targets specified for the association when the association version was created.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
The cron or rate schedule specified for the association when the association version was created.
OutputLocation (dict) --
The location in Amazon S3 specified for the association when the association version was created.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
AssociationName (string) --
The name specified for the association version when the association version was created.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level that is assigned to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations for this version only run when that Change Calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts where you wanted to run the association when this association version was created.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
NextToken (string) --
The token for the next set of items to return. Use this token to get the next set of results.
{'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}, 'TargetLocationsURL': 'string'}
Initiates execution of an Automation runbook.
See also: AWS API Documentation
Request Syntax
client.start_automation_execution( DocumentName='string', DocumentVersion='string', Parameters={ 'string': [ 'string', ] }, ClientToken='string', Mode='Auto'|'Interactive', TargetParameterName='string', Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], TargetMaps=[ { 'string': [ 'string', ] }, ], MaxConcurrency='string', MaxErrors='string', TargetLocations=[ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ], AlarmConfiguration={ 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, TargetLocationsURL='string' )
string
[REQUIRED]
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.
string
The version of the Automation runbook to use for this execution.
dict
A key-value map of execution parameters, which match the declared parameters in the Automation runbook.
(string) --
(list) --
(string) --
string
User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.
string
The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.
string
The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify targets.
list
A key-value mapping to target resources. Required if you specify TargetParameterName.
If both this parameter and the TargetLocation:Targets parameter are supplied, TargetLocation:Targets takes precedence.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
list
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
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.
If both this parameter and the TargetLocation:TargetsMaxConcurrency are supplied, TargetLocation:TargetsMaxConcurrency takes precedence.
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.
If this parameter and the TargetLocation:TargetsMaxErrors parameter are both supplied, TargetLocation:TargetsMaxErrors takes precedence.
list
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.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
list
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
(dict) --
Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
The CloudWatch alarm you want to apply to your automation.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
string
Specify a publicly accessible URL for a file that contains the TargetLocations body. Currently, only files in presigned Amazon S3 buckets are supported.
dict
Response Syntax
{ 'AutomationExecutionId': 'string' }
Response Structure
(dict) --
AutomationExecutionId (string) --
The unique ID of a newly scheduled automation execution.
{'Runbooks': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Creates a change request for Change Manager. The Automation runbooks specified in the change request run only after all required approvals for the change request have been received.
See also: AWS API Documentation
Request Syntax
client.start_change_request_execution( ScheduledTime=datetime(2015, 1, 1), DocumentName='string', DocumentVersion='string', Parameters={ 'string': [ 'string', ] }, ChangeRequestName='string', ClientToken='string', AutoApprove=True|False, Runbooks=[ { 'DocumentName': 'string', 'DocumentVersion': 'string', 'Parameters': { 'string': [ 'string', ] }, 'TargetParameterName': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ] }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ], ScheduledEndTime=datetime(2015, 1, 1), ChangeDetails='string' )
datetime
The date and time specified in the change request to run the Automation runbooks.
string
[REQUIRED]
The name of the change template document to run during the runbook workflow.
string
The version of the change template document to run during the runbook workflow.
dict
A key-value map of parameters that match the declared parameters in the change template document.
(string) --
(list) --
(string) --
string
The name of the change request associated with the runbook workflow to be run.
string
The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.
boolean
Indicates whether the change request can be approved automatically without the need for manual approvals.
If AutoApprovable is enabled in a change template, then setting AutoApprove to true in StartChangeRequestExecution creates a change request that bypasses approver review.
list
[REQUIRED]
Information about the Automation runbooks that are run during the runbook workflow.
(dict) --
Information about an Automation runbook used in a runbook workflow in Change Manager.
DocumentName (string) -- [REQUIRED]
The name of the Automation runbook used in a runbook workflow.
DocumentVersion (string) --
The version of the Automation runbook used in a runbook workflow.
Parameters (dict) --
The key-value map of execution parameters, which were supplied when calling StartChangeRequestExecution.
(string) --
(list) --
(string) --
TargetParameterName (string) --
The name of the parameter used as the target resource for the rate-controlled runbook workflow. Required if you specify Targets.
Targets (list) --
A key-value mapping to target resources that the runbook operation performs tasks on. Required if you specify TargetParameterName.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetMaps (list) --
A key-value mapping of runbook parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
MaxConcurrency (string) --
The MaxConcurrency value specified by the user when the operation started, indicating the maximum number of resources that the runbook operation can run on at the same time.
MaxErrors (string) --
The MaxErrors value specified by the user when the execution started, indicating the maximum number of errors that can occur during the operation before the updates are stopped or rolled back.
TargetLocations (list) --
Information about the Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Runbook operation.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
list
Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:
Key=Environment,Value=Production
Key=Region,Value=us-east-2
(dict) --
Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
datetime
The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.
string
User-provided details about the change. If no details are provided, content specified in the Template information section of the associated change template is added.
dict
Response Syntax
{ 'AutomationExecutionId': 'string' }
Response Structure
(dict) --
AutomationExecutionId (string) --
The unique ID of a runbook workflow operation. (A runbook workflow is a type of Automation operation.)
{'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}Response
{'AssociationDescription': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Updates an association. You can update the association name and version, the document version, schedule, parameters, and Amazon Simple Storage Service (Amazon S3) output. When you call UpdateAssociation, the system removes all optional parameters from the request and overwrites the association with null values for those parameters. This is by design. You must specify all optional parameters in the call, even if you are not changing the parameters. This includes the Name parameter. Before calling this API action, we recommend that you call the DescribeAssociation API operation and make a note of all optional parameters required for your UpdateAssociation call.
In order to call this API operation, a user, group, or role must be granted permission to call the DescribeAssociation API operation. If you don't have permission to call DescribeAssociation, then you receive the following error: An error occurred (AccessDeniedException) when calling the UpdateAssociation operation: User: <user_arn> isn't authorized to perform: ssm:DescribeAssociation on resource: <resource_arn>
See also: AWS API Documentation
Request Syntax
client.update_association( AssociationId='string', Parameters={ 'string': [ 'string', ] }, DocumentVersion='string', ScheduleExpression='string', OutputLocation={ 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, Name='string', Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], AssociationName='string', AssociationVersion='string', AutomationTargetParameterName='string', MaxErrors='string', MaxConcurrency='string', ComplianceSeverity='CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', SyncCompliance='AUTO'|'MANUAL', ApplyOnlyAtCronInterval=True|False, CalendarNames=[ 'string', ], TargetLocations=[ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], ScheduleOffset=123, Duration=123, TargetMaps=[ { 'string': [ 'string', ] }, ], AlarmConfiguration={ 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] } )
string
[REQUIRED]
The ID of the association you want to update.
dict
The parameters you want to update for the association. If you create a parameter using Parameter Store, a capability of Amazon Web Services Systems Manager, you can reference the parameter using {{ssm:parameter-name}}.
(string) --
(list) --
(string) --
string
The document version you want update for the association.
string
The cron expression used to schedule the association that you want to update.
dict
An S3 bucket where you want to store the results of this request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
string
The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.
You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.
For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:
arn:aws:ssm:region:account-id:document/document-name
For example:
arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.
list
The targets of the association.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
string
The name of the association that you want to update.
string
This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify $LATEST, or omit this parameter.
string
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
string
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
string
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
string
The severity level to assign to the association.
string
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
boolean
By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you update it. This parameter isn't supported for rate expressions.
If you chose this option when you created an association and later you edit that association or you make changes to the SSM document on which that association is based (by using the Documents page in the console), State Manager applies the association at the next specified cron interval. For example, if you chose the Latest version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously selected this option. If this option wasn't selected, State Manager immediately runs the association.
You can reset this option. To do so, specify the no-apply-only-at-cron-interval parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.
list
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
list
A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
integer
Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see Reference: Cron and rate expressions for Systems Manager in the Amazon Web Services Systems Manager User Guide.
integer
The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.
The Duration parameter applies only when both these conditions are true:
The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.
The command specifies the ApplyOnlyAtCronInterval parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.
list
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
dict
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) -- [REQUIRED]
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) -- [REQUIRED]
The name of your CloudWatch alarm.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': 'string', 'AssociationVersion': 'string', 'Date': datetime(2015, 1, 1), 'LastUpdateAssociationDate': datetime(2015, 1, 1), 'Status': { 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' }, 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'DocumentVersion': 'string', 'AutomationTargetParameterName': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AssociationId': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'LastExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulExecutionDate': datetime(2015, 1, 1), 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ] } }
Response Structure
(dict) --
AssociationDescription (dict) --
The description of the association that was updated.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The managed node ID.
AssociationVersion (string) --
The association version.
Date (datetime) --
The date when the association was made.
LastUpdateAssociationDate (datetime) --
The date when the association was last updated.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Overview (dict) --
Information about the association.
Status (string) --
The status of the association. Status can be: Pending, Success, or Failed.
DetailedStatus (string) --
A detailed status of the association.
AssociationStatusAggregatedCount (dict) --
Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
AutomationTargetParameterName (string) --
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
LastExecutionDate (datetime) --
The date on which the association was last run.
LastSuccessfulExecutionDate (datetime) --
The last date on which the association was successfully run.
AssociationName (string) --
The association name.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level that is assigned to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked during the association.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.
{'AssociationDescription': {'TargetLocations': {'ExcludeAccounts': ['string'], 'IncludeChildOrganizationUnits': 'boolean', 'Targets': [{'Key': 'string', 'Values': ['string']}], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string'}}}
Updates the status of the Amazon Web Services Systems Manager document (SSM document) associated with the specified managed node.
UpdateAssociationStatus is primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to report status updates about your associations and is only used for associations created with the InstanceId legacy parameter.
See also: AWS API Documentation
Request Syntax
client.update_association_status( Name='string', InstanceId='string', AssociationStatus={ 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' } )
string
[REQUIRED]
The name of the SSM document.
string
[REQUIRED]
The managed node ID.
dict
[REQUIRED]
The association status.
Date (datetime) -- [REQUIRED]
The date when the status changed.
Name (string) -- [REQUIRED]
The status.
Message (string) -- [REQUIRED]
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': 'string', 'AssociationVersion': 'string', 'Date': datetime(2015, 1, 1), 'LastUpdateAssociationDate': datetime(2015, 1, 1), 'Status': { 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' }, 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'DocumentVersion': 'string', 'AutomationTargetParameterName': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AssociationId': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'LastExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulExecutionDate': datetime(2015, 1, 1), 'AssociationName': 'string', 'MaxErrors': 'string', 'MaxConcurrency': 'string', 'ComplianceSeverity': 'CRITICAL'|'HIGH'|'MEDIUM'|'LOW'|'UNSPECIFIED', 'SyncCompliance': 'AUTO'|'MANUAL', 'ApplyOnlyAtCronInterval': True|False, 'CalendarNames': [ 'string', ], 'TargetLocations': [ { 'Accounts': [ 'string', ], 'Regions': [ 'string', ], 'TargetLocationMaxConcurrency': 'string', 'TargetLocationMaxErrors': 'string', 'ExecutionRoleName': 'string', 'TargetLocationAlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'IncludeChildOrganizationUnits': True|False, 'ExcludeAccounts': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TargetsMaxConcurrency': 'string', 'TargetsMaxErrors': 'string' }, ], 'ScheduleOffset': 123, 'Duration': 123, 'TargetMaps': [ { 'string': [ 'string', ] }, ], 'AlarmConfiguration': { 'IgnorePollAlarmFailure': True|False, 'Alarms': [ { 'Name': 'string' }, ] }, 'TriggeredAlarms': [ { 'Name': 'string', 'State': 'UNKNOWN'|'ALARM' }, ] } }
Response Structure
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The managed node ID.
AssociationVersion (string) --
The association version.
Date (datetime) --
The date when the association was made.
LastUpdateAssociationDate (datetime) --
The date when the association was last updated.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Overview (dict) --
Information about the association.
Status (string) --
The status of the association. Status can be: Pending, Success, or Failed.
DetailedStatus (string) --
A detailed status of the association.
AssociationStatusAggregatedCount (dict) --
Returns the number of targets for the association status. For example, if you created an association with two managed nodes, and one of them was successful, this would return the count of managed nodes by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
AutomationTargetParameterName (string) --
Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The managed nodes targeted by the request.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon Web Services Region of the S3 bucket.
OutputS3BucketName (string) --
The name of the S3 bucket.
OutputS3KeyPrefix (string) --
The S3 bucket subfolder.
LastExecutionDate (datetime) --
The date on which the association was last run.
LastSuccessfulExecutionDate (datetime) --
The last date on which the association was successfully run.
AssociationName (string) --
The association name.
MaxErrors (string) --
The number of errors that are allowed before the system stops sending requests to run the association 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 sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
Executions that are already running an association when MaxErrors 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 MaxConcurrency to 1 so that executions proceed one at a time.
MaxConcurrency (string) --
The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
ComplianceSeverity (string) --
The severity level that is assigned to the association.
SyncCompliance (string) --
The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
By default, all associations use AUTO mode.
ApplyOnlyAtCronInterval (boolean) --
By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
CalendarNames (list) --
The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
(string) --
TargetLocations (list) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.
(dict) --
The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.
Accounts (list) --
The Amazon Web Services accounts targeted by the current Automation execution.
(string) --
Regions (list) --
The Amazon Web Services Regions targeted by the current Automation execution.
(string) --
TargetLocationMaxConcurrency (string) --
The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
TargetLocationMaxErrors (string) --
The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
ExecutionRoleName (string) --
The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
TargetLocationAlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
IncludeChildOrganizationUnits (boolean) --
Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false.
ExcludeAccounts (list) --
Amazon Web Services accounts or organizational units to exclude as expanded targets.
(string) --
Targets (list) --
A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName.
This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied.
(dict) --
An array of search criteria that targets managed nodes using a key-value pair that you specify.
Supported formats include the following.
For all Systems Manager capabilities:
Key=tag-key,Values=tag-value-1,tag-value-2
For Automation and Change Manager:
Key=tag:tag-key,Values=tag-value
Key=ResourceGroup,Values=resource-group-name
Key=ParameterValues,Values=value-1,value-2,value-3
To target all instances in the Amazon Web Services Region:
Key=AWS::EC2::Instance,Values=*
Key=InstanceIds,Values=*
For Run Command and Maintenance Windows:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
Key=resource-groups:Name,Values=resource-group-name
Additionally, Maintenance Windows support targeting resource types:
Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2
For State Manager:
Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3
Key=tag:tag-key,Values=tag-value-1,tag-value-2
To target all instances in the Amazon Web Services Region:
Key=InstanceIds,Values=*
For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the Amazon Web Services Systems Manager User Guide.
Key (string) --
User-defined criteria for sending commands that target managed nodes that meet the criteria.
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer.
Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.
(string) --
TargetsMaxConcurrency (string) --
The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied.
TargetsMaxErrors (string) --
The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied.
ScheduleOffset (integer) --
Number of days to wait after the scheduled day to run an association.
Duration (integer) --
The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.
TargetMaps (list) --
A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
(dict) --
(string) --
(list) --
(string) --
AlarmConfiguration (dict) --
The details for the CloudWatch alarm you want to apply to an automation or command.
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.
Alarms (list) --
The name of the CloudWatch alarm specified in the configuration.
(dict) --
A CloudWatch alarm you apply to an automation or command.
Name (string) --
The name of your CloudWatch alarm.
TriggeredAlarms (list) --
The CloudWatch alarm that was invoked during the association.
(dict) --
The details about the state of your CloudWatch alarm.
Name (string) --
The name of your CloudWatch alarm.
State (string) --
The state of your CloudWatch alarm.