2016/12/01 - Amazon Simple Systems Manager (SSM) - 36 new17 updated api methods
Changes Update ssm client to latest version
Retrieves the individual task executions (one per target) for a particular task executed as part of a Maintenance Window execution.
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_window_execution_task_invocations( WindowExecutionId='string', TaskId='string', Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the Maintenance Window execution the task is part of.
string
[REQUIRED]
The ID of the specific task in the Maintenance Window task that should be retrieved.
list
Optional filters used to scope down the returned task invocations. The supported filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED.
(dict) --
Filter used in the request.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(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
{ 'WindowExecutionTaskInvocationIdentities': [ { 'WindowExecutionId': 'string', 'TaskExecutionId': 'string', 'InvocationId': 'string', 'ExecutionId': 'string', 'Parameters': 'string', 'Status': 'PENDING'|'IN_PROGRESS'|'SUCCESS'|'FAILED'|'TIMED_OUT'|'CANCELLING'|'CANCELLED'|'SKIPPED_OVERLAPPING', 'StatusDetails': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'OwnerInformation': 'string', 'WindowTargetId': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
WindowExecutionTaskInvocationIdentities (list) --
Information about the task invocation results per invocation.
(dict) --
Describes the information about a task invocation for a particular target as part of a task execution performed as part of a Maintenance Window execution.
WindowExecutionId (string) --
The ID of the Maintenance Window execution that ran the task.
TaskExecutionId (string) --
The ID of the specific task execution in the Maintenance Window execution.
InvocationId (string) --
The ID of the task invocation.
ExecutionId (string) --
The ID of the action performed in the service that actually handled the task invocation. If the task type is RUN_COMMAND, this value is the command ID.
Parameters (string) --
The parameters that were provided for the invocation when it was executed.
Status (string) --
The status of the task invocation.
StatusDetails (string) --
The details explaining the status of the task invocation. Only available for certain Status values.
StartTime (datetime) --
The time the invocation started.
EndTime (datetime) --
The time the invocation finished.
OwnerInformation (string) --
User-provided value that was specified when the target was registered with the Maintenance Window. This was also included in any CloudWatch events raised during the task invocation.
WindowTargetId (string) --
The ID of the target definition in this Maintenance Window the invocation was performed for.
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.
Creates a new Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.create_maintenance_window( Name='string', Schedule='string', Duration=123, Cutoff=123, AllowUnassociatedTargets=True|False, ClientToken='string' )
string
[REQUIRED]
The name of the Maintenance Window.
string
[REQUIRED]
The schedule of the Maintenance Window in the form of a cron or rate expression.
integer
[REQUIRED]
The duration of the Maintenance Window in hours.
integer
[REQUIRED]
The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
boolean
[REQUIRED]
Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.
string
User-provided idempotency token.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'WindowId': 'string' }
Response Structure
(dict) --
WindowId (string) --
The ID of the created Maintenance Window.
List all versions for a document.
See also: AWS API Documentation
Request Syntax
client.list_document_versions( Name='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The name of the document about which you want version information.
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
{ 'DocumentVersions': [ { 'Name': 'string', 'DocumentVersion': 'string', 'CreatedDate': datetime(2015, 1, 1), 'IsDefaultVersion': True|False }, ], 'NextToken': 'string' }
Response Structure
(dict) --
DocumentVersions (list) --
The document versions.
(dict) --
Version information about the document.
Name (string) --
The document name.
DocumentVersion (string) --
The document version.
CreatedDate (datetime) --
The date the document was created.
IsDefaultVersion (boolean) --
An identifier for the default version of the document.
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.
Removes a task from a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.deregister_task_from_maintenance_window( WindowId='string', WindowTaskId='string' )
string
[REQUIRED]
The ID of the Maintenance Window the task should be removed from.
string
[REQUIRED]
The ID of the task to remove from the Maintenance Window.
dict
Response Syntax
{ 'WindowId': 'string', 'WindowTaskId': 'string' }
Response Structure
(dict) --
WindowId (string) --
The ID of the Maintenance Window the task was removed from.
WindowTaskId (string) --
The ID of the task removed from the Maintenance Window.
Updates an association. You can only update the document version, schedule, parameters, and Amazon S3 output of an association.
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' } } )
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, 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. Supported expressions are every half, 1, 2, 4, 8 or 12 hour(s); every specified day and time of the week. For example: cron(0 0/30 * 1/1 * ? *) to run every thirty minutes; cron(0 0 0/4 1/1 * ? *) to run every four hours; and cron(0 0 10 ? * SUN *) to run every Sunday at 10 a.m.
dict
An Amazon S3 bucket where you want to store the results of this request.
"{ \"S3Location\": { \"OutputS3Region\": \"<region>\", \"OutputS3BucketName\": \"bucket name\", \"OutputS3KeyPrefix\": \"folder name\" } }"
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon S3 bucket subfolder.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': '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', '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) } }
Response Structure
(dict) --
AssociationDescription (dict) --
The description of the association that was updated.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The ID of the instance.
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 instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon 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.
Lists the targets registered with the Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_window_targets( WindowId='string', Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the Maintenance Window whose targets should be retrieved.
list
Optional filters that can be used to narrow down the scope of the returned window targets. The supported filter keys are Type, WindowTargetId and OwnerInformation.
(dict) --
Filter used in the request.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(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
{ 'Targets': [ { 'WindowId': 'string', 'WindowTargetId': 'string', 'ResourceType': 'INSTANCE', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'OwnerInformation': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Targets (list) --
Information about the targets in the Maintenance Window.
(dict) --
The target registered with the Maintenance Window.
WindowId (string) --
The Maintenance Window ID where the target is registered.
WindowTargetId (string) --
The ID of the target.
ResourceType (string) --
The type of target.
Targets (list) --
The targets (either instances or tags). Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
OwnerInformation (string) --
User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
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.
All associations for the instance(s).
See also: AWS API Documentation
Request Syntax
client.describe_effective_instance_associations( InstanceId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The instance ID for which you want to view all associations.
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
{ 'Associations': [ { 'AssociationId': 'string', 'InstanceId': 'string', 'Content': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Associations (list) --
The associations for the requested instance.
(dict) --
One or more association documents on the instance.
AssociationId (string) --
The association ID.
InstanceId (string) --
The instance ID.
Content (string) --
The content of the association document for the instance(s).
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.
Retrieves a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.get_maintenance_window( WindowId='string' )
string
[REQUIRED]
The ID of the desired Maintenance Window.
dict
Response Syntax
{ 'WindowId': 'string', 'Name': 'string', 'Schedule': 'string', 'Duration': 123, 'Cutoff': 123, 'AllowUnassociatedTargets': True|False, 'Enabled': True|False, 'CreatedDate': datetime(2015, 1, 1), 'ModifiedDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
WindowId (string) --
The ID of the created Maintenance Window.
Name (string) --
The name of the Maintenance Window.
Schedule (string) --
The schedule of the Maintenance Window in the form of a cron or rate expression.
Duration (integer) --
The duration of the Maintenance Window in hours.
Cutoff (integer) --
The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
AllowUnassociatedTargets (boolean) --
Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.
Enabled (boolean) --
Whether the Maintenance Windows is enabled.
CreatedDate (datetime) --
The date the Maintenance Window was created.
ModifiedDate (datetime) --
The date the Maintenance Window was last modified.
Stop an Automation that is currently executing.
See also: AWS API Documentation
Request Syntax
client.stop_automation_execution( AutomationExecutionId='string' )
string
[REQUIRED]
The execution ID of the Automation to stop.
dict
Response Syntax
{}
Response Structure
(dict) --
The status of the associations for the instance(s).
See also: AWS API Documentation
Request Syntax
client.describe_instance_associations_status( InstanceId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The instance IDs for which you want association status information.
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
{ 'InstanceAssociationStatusInfos': [ { 'AssociationId': 'string', 'Name': 'string', 'DocumentVersion': 'string', 'InstanceId': 'string', 'ExecutionDate': datetime(2015, 1, 1), 'Status': 'string', 'DetailedStatus': 'string', 'ExecutionSummary': 'string', 'ErrorCode': 'string', 'OutputUrl': { 'S3OutputUrl': { 'OutputUrl': 'string' } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
InstanceAssociationStatusInfos (list) --
Status information about the association.
(dict) --
Status information about the instance association.
AssociationId (string) --
The association ID.
Name (string) --
The name of the association.
DocumentVersion (string) --
The association document verions.
InstanceId (string) --
The instance ID where the association was created.
ExecutionDate (datetime) --
The date the instance association executed.
Status (string) --
Status information about the instance association.
DetailedStatus (string) --
Detailed status information about the instance association.
ExecutionSummary (string) --
Summary information about association execution.
ErrorCode (string) --
An error code returned by the request to create the association.
OutputUrl (dict) --
A URL for an Amazon S3 bucket where you want to store the results of this request.
S3OutputUrl (dict) --
The URL of Amazon S3 bucket where you want to store the results of this request.
OutputUrl (string) --
A URL for an Amazon S3 bucket where you want to store the results of this 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.
Updates an existing Maintenance Window. Only specified parameters are modified.
See also: AWS API Documentation
Request Syntax
client.update_maintenance_window( WindowId='string', Name='string', Schedule='string', Duration=123, Cutoff=123, AllowUnassociatedTargets=True|False, Enabled=True|False )
string
[REQUIRED]
The ID of the Maintenance Window to update.
string
The name of the Maintenance Window.
string
The schedule of the Maintenance Window in the form of a cron or rate expression.
integer
The duration of the Maintenance Window in hours.
integer
The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
boolean
Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.
boolean
Whether the Maintenance Window is enabled.
dict
Response Syntax
{ 'WindowId': 'string', 'Name': 'string', 'Schedule': 'string', 'Duration': 123, 'Cutoff': 123, 'AllowUnassociatedTargets': True|False, 'Enabled': True|False }
Response Structure
(dict) --
WindowId (string) --
The ID of the created Maintenance Window.
Name (string) --
The name of the Maintenance Window.
Schedule (string) --
The schedule of the Maintenance Window in the form of a cron or rate expression.
Duration (integer) --
The duration of the Maintenance Window in hours.
Cutoff (integer) --
The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
AllowUnassociatedTargets (boolean) --
Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.
Enabled (boolean) --
Whether the Maintenance Window is enabled.
The document you want to update.
See also: AWS API Documentation
Request Syntax
client.update_document( Content='string', Name='string', DocumentVersion='string' )
string
[REQUIRED]
The content in a document that you want to update.
string
[REQUIRED]
The name of the document that you want to update.
string
The version of the document that you want to update.
dict
Response Syntax
{ 'DocumentDescription': { 'Sha1': 'string', 'Hash': 'string', 'HashType': 'Sha256'|'Sha1', 'Name': 'string', 'Owner': 'string', 'CreatedDate': datetime(2015, 1, 1), 'Status': 'Creating'|'Active'|'Updating'|'Deleting', 'DocumentVersion': 'string', 'Description': 'string', 'Parameters': [ { 'Name': 'string', 'Type': 'String'|'StringList', 'Description': 'string', 'DefaultValue': 'string' }, ], 'PlatformTypes': [ 'Windows'|'Linux', ], 'DocumentType': 'Command'|'Policy'|'Automation', 'SchemaVersion': 'string', 'LatestVersion': 'string', 'DefaultVersion': 'string' } }
Response Structure
(dict) --
DocumentDescription (dict) --
A description of the document that was updated.
Sha1 (string) --
The SHA1 hash of the document, which you can use for verification purposes.
Hash (string) --
The Sha256 or Sha1 hash created by the system when the document was created.
HashType (string) --
Sha256 or Sha1.
Name (string) --
The name of the SSM document.
Owner (string) --
The AWS user account of the person who created the document.
CreatedDate (datetime) --
The date when the SSM document was created.
Status (string) --
The status of the SSM document.
DocumentVersion (string) --
The document version.
Description (string) --
A description of the document.
Parameters (list) --
A description of the parameters for a document.
(dict) --
Parameters specified in the SSM document that execute on the server when the command is run.
Name (string) --
The name of the parameter.
Type (string) --
The type of parameter. The type can be either “String” or “StringList”.
Description (string) --
A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
DefaultValue (string) --
If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
PlatformTypes (list) --
The list of OS platforms compatible with this SSM document.
(string) --
DocumentType (string) --
The type of document.
SchemaVersion (string) --
The schema version.
LatestVersion (string) --
The latest version of the document.
DefaultVersion (string) --
The default version.
Retrieves details about a specific task executed as part of a Maintenance Window execution.
See also: AWS API Documentation
Request Syntax
client.get_maintenance_window_execution( WindowExecutionId='string' )
string
[REQUIRED]
The ID of the Maintenance Window execution that includes the task.
dict
Response Syntax
{ 'WindowExecutionId': 'string', 'TaskIds': [ 'string', ], 'Status': 'PENDING'|'IN_PROGRESS'|'SUCCESS'|'FAILED'|'TIMED_OUT'|'CANCELLING'|'CANCELLED'|'SKIPPED_OVERLAPPING', 'StatusDetails': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
WindowExecutionId (string) --
The ID of the Maintenance Window execution.
TaskIds (list) --
The ID of the task executions from the Maintenance Window execution.
(string) --
Status (string) --
The status of the Maintenance Window execution.
StatusDetails (string) --
The details explaining the Status. Only available for certain status values.
StartTime (datetime) --
The time the Maintenance Window started executing.
EndTime (datetime) --
The time the Maintenance Window finished executing.
Get information about a parameter.
See also: AWS API Documentation
Request Syntax
client.describe_parameters( Filters=[ { 'Key': 'Name'|'Type'|'KeyId', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
list
One or more filters. Use a filter to return a more specific list of results.
(dict) --
One or more filters. Use a filter to return a more specific list of results.
Key (string) --
The name of the filter.
Values (list) -- [REQUIRED]
The filter values.
(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
{ 'Parameters': [ { 'Name': 'string', 'Type': 'String'|'StringList'|'SecureString', 'KeyId': 'string', 'LastModifiedDate': datetime(2015, 1, 1), 'LastModifiedUser': 'string', 'Description': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Parameters (list) --
Parameters returned by the request.
(dict) --
Metada includes information like the ARN of the last user and the date/time the parameter was last used.
Name (string) --
The parameter name.
Type (string) --
The type of parameter. Valid parameter types include the following: String, String list, Secure string.
KeyId (string) --
The ID of the query key used for this parameter.
LastModifiedDate (datetime) --
Date the parameter was last changed or updated.
LastModifiedUser (string) --
Amazon Resource Name (ARN) of the AWS user who last changed the parameter.
Description (string) --
Description of the parameter actions.
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.
Deletes a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.delete_maintenance_window( WindowId='string' )
string
[REQUIRED]
The ID of the Maintenance Window to delete.
dict
Response Syntax
{ 'WindowId': 'string' }
Response Structure
(dict) --
WindowId (string) --
The ID of the deleted Maintenance Window.
For a given Maintenance Window execution, lists the tasks that were executed.
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_window_execution_tasks( WindowExecutionId='string', Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the Maintenance Window execution whose task executions should be retrieved.
list
Optional filters used to scope down the returned tasks. The supported filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED.
(dict) --
Filter used in the request.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(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
{ 'WindowExecutionTaskIdentities': [ { 'WindowExecutionId': 'string', 'TaskExecutionId': 'string', 'Status': 'PENDING'|'IN_PROGRESS'|'SUCCESS'|'FAILED'|'TIMED_OUT'|'CANCELLING'|'CANCELLED'|'SKIPPED_OVERLAPPING', 'StatusDetails': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'TaskArn': 'string', 'TaskType': 'RUN_COMMAND' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
WindowExecutionTaskIdentities (list) --
Information about the task executions.
(dict) --
Information about a task execution performed as part of a Maintenance Window execution.
WindowExecutionId (string) --
The ID of the Maintenance Window execution that ran the task.
TaskExecutionId (string) --
The ID of the specific task execution in the Maintenance Window execution.
Status (string) --
The status of the task execution.
StatusDetails (string) --
The details explaining the status of the task execution. Only available for certain status values.
StartTime (datetime) --
The time the task execution started.
EndTime (datetime) --
The time the task execution finished.
TaskArn (string) --
The ARN of the executed task.
TaskType (string) --
The type of executed task.
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.
Retrieves the details about a specific task executed as part of a Maintenance Window execution.
See also: AWS API Documentation
Request Syntax
client.get_maintenance_window_execution_task( WindowExecutionId='string', TaskId='string' )
string
[REQUIRED]
The ID of the Maintenance Window execution that includes the task.
string
[REQUIRED]
The ID of the specific task execution in the Maintenance Window task that should be retrieved.
dict
Response Syntax
{ 'WindowExecutionId': 'string', 'TaskExecutionId': 'string', 'TaskArn': 'string', 'ServiceRole': 'string', 'Type': 'RUN_COMMAND', 'TaskParameters': [ { 'string': { 'Values': [ 'string', ] } }, ], 'Priority': 123, 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'Status': 'PENDING'|'IN_PROGRESS'|'SUCCESS'|'FAILED'|'TIMED_OUT'|'CANCELLING'|'CANCELLED'|'SKIPPED_OVERLAPPING', 'StatusDetails': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
WindowExecutionId (string) --
The ID of the Maintenance Window execution that includes the task.
TaskExecutionId (string) --
The ID of the specific task execution in the Maintenance Window task that was retrieved.
TaskArn (string) --
The ARN of the executed task.
ServiceRole (string) --
The role that was assumed when executing the task.
Type (string) --
The type of task executed.
TaskParameters (list) --
The parameters passed to the task when it was executed. The map has the following format:
Key: string, 1 ≤ length ≤ 255
Value: an array of strings where each string 1 ≤ length ≤ 255
(dict) --
(string) --
(dict) --
Defines the values for a task parameter.
Values (list) --
This field contains an array of 0 or more strings, each 1 to 255 characters in length.
(string) --
Priority (integer) --
The priority of the task.
MaxConcurrency (string) --
The defined maximum number of task executions that could be run in parallel.
MaxErrors (string) --
The defined maximum number of task execution errors allowed before scheduling of the task execution would have been stopped.
Status (string) --
The status of the task.
StatusDetails (string) --
The details explaining the Status. Only available for certain status values.
StartTime (datetime) --
The time the task execution started.
EndTime (datetime) --
The time the task execution completed.
Bulk update custom inventory items on one more instance. The request adds an inventory item, if it doesn't already exist, or updates an inventory item, if it does exist.
See also: AWS API Documentation
Request Syntax
client.put_inventory( InstanceId='string', Items=[ { 'TypeName': 'string', 'SchemaVersion': 'string', 'CaptureTime': 'string', 'ContentHash': 'string', 'Content': [ { 'string': 'string' }, ] }, ] )
string
[REQUIRED]
One or more instance IDs where you want to add or update inventory items.
list
[REQUIRED]
The inventory items that you want to add or update on instances.
(dict) --
Information collected from managed instances based on your inventory policy document
TypeName (string) -- [REQUIRED]
The name of the inventory type. Default inventory item type names start with AWS. Custom inventory type names will start with Custom. Default inventory item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, AWS:Network, and AWS:WindowsUpdate.
SchemaVersion (string) -- [REQUIRED]
The schema version for the inventory item.
CaptureTime (string) -- [REQUIRED]
The time the inventory information was collected.
ContentHash (string) --
MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API does not update the inventory item type contents if the MD5 hash has not changed since last update.
Content (list) --
The inventory data of the inventory type.
(dict) --
(string) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Adds a new task to a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.register_task_with_maintenance_window( WindowId='string', Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], TaskArn='string', ServiceRoleArn='string', TaskType='RUN_COMMAND', TaskParameters={ 'string': { 'Values': [ 'string', ] } }, Priority=123, MaxConcurrency='string', MaxErrors='string', LoggingInfo={ 'S3BucketName': 'string', 'S3KeyPrefix': 'string', 'S3Region': 'string' }, ClientToken='string' )
string
[REQUIRED]
The id of the Maintenance Window the task should be added to.
list
[REQUIRED]
The targets (either instances or tags). Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
string
[REQUIRED]
The ARN of the task to execute
string
[REQUIRED]
The role that should be assumed when executing the task.
string
[REQUIRED]
The type of task being registered.
dict
The parameters that should be passed to the task when it is executed.
(string) --
(dict) --
Defines the values for a task parameter.
Values (list) --
This field contains an array of 0 or more strings, each 1 to 255 characters in length.
(string) --
integer
The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
string
[REQUIRED]
The maximum number of targets this task can be run for in parallel.
string
[REQUIRED]
The maximum number of errors allowed before this task stops being scheduled.
dict
A structure containing information about an Amazon S3 bucket to write instance-level logs to.
S3BucketName (string) -- [REQUIRED]
The name of an Amazon S3 bucket where execution logs are stored .
S3KeyPrefix (string) --
(Optional) The Amazon S3 bucket subfolder.
S3Region (string) -- [REQUIRED]
The region where the Amazon S3 bucket is located.
string
User-provided idempotency token.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'WindowTaskId': 'string' }
Response Structure
(dict) --
WindowTaskId (string) --
The id of the task in the Maintenance Window.
Delete a parameter from the system.
See also: AWS API Documentation
Request Syntax
client.delete_parameter( Name='string' )
string
[REQUIRED]
The name of the parameter to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Query inventory information.
See also: AWS API Documentation
Request Syntax
client.get_inventory( Filters=[ { 'Key': 'string', 'Values': [ 'string', ], 'Type': 'Equal'|'NotEqual'|'BeginWith'|'LessThan'|'GreaterThan' }, ], ResultAttributes=[ { 'TypeName': 'string' }, ], NextToken='string', MaxResults=123 )
list
One or more filters. Use a filter to return a more specific list of results.
(dict) --
One or more filters. Use a filter to return a more specific list of results.
Key (string) -- [REQUIRED]
The name of the filter key.
Values (list) -- [REQUIRED]
Inventory filter values. Example: inventory filter where instance IDs are specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g, i-1a2b3c4d5e6,Type=Equal
(string) --
Type (string) --
The type of filter. Valid values include the following: "Equal"|"NotEqual"|"BeginWith"|"LessThan"|"GreaterThan"
list
The list of inventory item types to return.
(dict) --
The inventory item result attribute.
TypeName (string) -- [REQUIRED]
Name of the inventory item type. Valid value: “AWS:InstanceInformation”. Default Value: “AWS:InstanceInformation”.
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.
dict
Response Syntax
{ 'Entities': [ { 'Id': 'string', 'Data': { 'string': { 'TypeName': 'string', 'SchemaVersion': 'string', 'CaptureTime': 'string', 'ContentHash': 'string', 'Content': [ { 'string': 'string' }, ] } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Entities (list) --
Collection of inventory entities such as a collection of instance inventory.
(dict) --
Inventory query results.
Id (string) --
ID of the inventory result entity. For example, for managed instance inventory the result will be the managed instance ID. For EC2 instance inventory, the result will be the instance ID.
Data (dict) --
The data section in the inventory result entity json.
(string) --
(dict) --
The inventory result item.
TypeName (string) --
The name of the inventory result item type.
SchemaVersion (string) --
The schema version for the inventory result item/
CaptureTime (string) --
The time inventory item data was captured.
ContentHash (string) --
MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory information. The PutInventory API does not update the inventory item type contents if the MD5 hash has not changed since last update.
Content (list) --
Contains all the inventory data of the item type. Results include attribute names and values.
(dict) --
(string) --
(string) --
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.
Initiates execution of an Automation document.
See also: AWS API Documentation
Request Syntax
client.start_automation_execution( DocumentName='string', DocumentVersion='string', Parameters={ 'string': [ 'string', ] } )
string
[REQUIRED]
The name of the Automation document to use for this execution.
string
The version of the Automation document to use for this execution.
dict
A key-value map of execution parameters, which match the declared parameters in the Automation document.
(string) --
(list) --
(string) --
dict
Response Syntax
{ 'AutomationExecutionId': 'string' }
Response Structure
(dict) --
AutomationExecutionId (string) --
The unique ID of a newly scheduled automation execution.
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 document 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'|'Success'|'TimedOut'|'Cancelled'|'Failed', 'StepExecutions': [ { 'StepName': 'string', 'Action': 'string', 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'StepStatus': 'Pending'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', 'ResponseCode': 'string', 'Inputs': { 'string': 'string' }, 'Outputs': { 'string': [ 'string', ] }, 'Response': 'string', 'FailureMessage': 'string' }, ], 'Parameters': { 'string': [ 'string', ] }, 'Outputs': { 'string': [ 'string', ] }, 'FailureMessage': '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 document 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 document contains a list of steps that are executed 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.
ExecutionStartTime (datetime) --
If a step has begun execution, this contains the time the step started. If the step is in Pending status, this field is not populated.
ExecutionEndTime (datetime) --
If a step has finished execution, this contains the time the execution ended. If the step has not yet concluded, this field is not populated.
StepStatus (string) --
The execution status for this step. Valid values include: Pending, InProgress, Success, Cancelled, Failed, and TimedOut.
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.
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 document.
(string) --
(list) --
(string) --
FailureMessage (string) --
A message describing why an execution has failed, if the status is set to Failed.
Get a list of parameters used by the AWS account.>
See also: AWS API Documentation
Request Syntax
client.get_parameters( Names=[ 'string', ], WithDecryption=True|False )
list
[REQUIRED]
Names of the parameters for which you want to query information.
(string) --
boolean
Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.
dict
Response Syntax
{ 'Parameters': [ { 'Name': 'string', 'Type': 'String'|'StringList'|'SecureString', 'Value': 'string' }, ], 'InvalidParameters': [ 'string', ] }
Response Structure
(dict) --
Parameters (list) --
A list of parameters used by the AWS account.
(dict) --
An Amazon EC2 Systems Manager parameter in Parameter Store.
Name (string) --
The name of the parameter.
Type (string) --
The type of parameter. Valid values include the following: String, String list, Secure string.
Value (string) --
The parameter value.
InvalidParameters (list) --
A list of parameters that are not formatted correctly or do not run when executed.
(string) --
Set the default version of a document.
See also: AWS API Documentation
Request Syntax
client.update_document_default_version( Name='string', DocumentVersion='string' )
string
[REQUIRED]
The name of a custom document that you want to set as the default version.
string
[REQUIRED]
The version of a custom document that you want to set as the default version.
dict
Response Syntax
{ 'Description': { 'Name': 'string', 'DefaultVersion': 'string' } }
Response Structure
(dict) --
Description (dict) --
The description of a custom document that you want to set as the default version.
Name (string) --
The name of the document.
DefaultVersion (string) --
The default version of the document.
Query a list of all parameters used by the AWS account.
See also: AWS API Documentation
Request Syntax
client.get_parameter_history( Name='string', WithDecryption=True|False, MaxResults=123, NextToken='string' )
string
[REQUIRED]
The name of a parameter you want to query.
boolean
Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.
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
{ 'Parameters': [ { 'Name': 'string', 'Type': 'String'|'StringList'|'SecureString', 'KeyId': 'string', 'LastModifiedDate': datetime(2015, 1, 1), 'LastModifiedUser': 'string', 'Description': 'string', 'Value': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Parameters (list) --
A list of parameters returned by the request.
(dict) --
Information about parameter usage.
Name (string) --
The name of the parameter.
Type (string) --
The type of parameter used.
KeyId (string) --
The ID of the query key used for this parameter.
LastModifiedDate (datetime) --
Date the parameter was last changed or updated.
LastModifiedUser (string) --
Amazon Resource Name (ARN) of the AWS user who last changed the parameter.
Description (string) --
Information about the parameter.
Value (string) --
The parameter value.
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.
Provides details about all active and terminated Automation executions.
See also: AWS API Documentation
Request Syntax
client.describe_automation_executions( Filters=[ { 'Key': 'DocumentNamePrefix'|'ExecutionStatus', '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]
The aspect of the Automation execution information that should be limited.
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'|'Success'|'TimedOut'|'Cancelled'|'Failed', 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'ExecutedBy': 'string', 'LogFile': 'string', 'Outputs': { 'string': [ '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 document used during execution.
DocumentVersion (string) --
The document version used during the execution.
AutomationExecutionStatus (string) --
The status of the execution. Valid values include: Running, Succeeded, Failed, Timed out, or Cancelled.
ExecutionStartTime (datetime) --
The time the execution started.>
ExecutionEndTime (datetime) --
The time the execution finished. This is not populated if the execution is still in progress.
ExecutedBy (string) --
The IAM role ARN of the user who executed the Automation.
LogFile (string) --
An Amazon S3 bucket where execution information is stored.
Outputs (dict) --
The list of execution outputs as defined in the Automation document.
(string) --
(list) --
(string) --
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.
Returns detailed information about command execution for an invocation or plugin.
See also: AWS API Documentation
Request Syntax
client.get_command_invocation( CommandId='string', InstanceId='string', PluginName='string' )
string
[REQUIRED]
(Required) The parent command ID of the invocation plugin.
string
[REQUIRED]
(Required) The ID of the managed instance targeted by the command. A managed instance can be an Amazon EC2 instance or an instance in your hybrid environment that is configured for Systems Manager.
string
(Optional) The name of the plugin for which you want detailed results. If the SSM document contains only one plugin, the name can be omitted and the details will be returned.
dict
Response Syntax
{ 'CommandId': 'string', 'InstanceId': 'string', 'Comment': 'string', 'DocumentName': 'string', 'PluginName': 'string', 'ResponseCode': 123, 'ExecutionStartDateTime': 'string', 'ExecutionElapsedTime': 'string', 'ExecutionEndDateTime': 'string', 'Status': 'Pending'|'InProgress'|'Delayed'|'Success'|'Cancelled'|'TimedOut'|'Failed'|'Cancelling', 'StatusDetails': 'string', 'StandardOutputContent': 'string', 'StandardOutputUrl': 'string', 'StandardErrorContent': 'string', 'StandardErrorUrl': 'string' }
Response Structure
(dict) --
CommandId (string) --
The parent command ID of the invocation plugin.
InstanceId (string) --
The ID of the managed instance targeted by the command. A managed instance can be an Amazon EC2 instance or an instance in your hybrid environment that is configured for Systems Manager.
Comment (string) --
The comment text for the command.
DocumentName (string) --
The name of the SSM document that was executed. For example, AWS-RunShellScript is an SSM document.
PluginName (string) --
The name of the plugin for which you want detailed results. For example, aws:RunShellScript is a plugin.
ResponseCode (integer) --
The error level response code for the plugin script. If the response code is -1, then the command has not started executing on the instance, or it was not received by the instance.
ExecutionStartDateTime (string) --
The date and time the plugin started executing. Date and time are written in ISO 8601 format. For example, August 28, 2016 is represented as 2016-08-28. If the plugin has not started to execute, the string is empty.
ExecutionElapsedTime (string) --
Duration since ExecutionStartDateTime.
ExecutionEndDateTime (string) --
The date and time the plugin was finished executing. Date and time are written in ISO 8601 format. For example, August 28, 2016 is represented as 2016-08-28. If the plugin has not started to execute, the string is empty.
Status (string) --
The status of the parent command for this invocation. This status can be different than StatusDetails.
StatusDetails (string) --
A detailed status of the command execution for an invocation. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Monitor Commands (Linux) or Monitor Commands (Windows). StatusDetails can be one of the following values:
Pending – The command has not been sent to the instance.
In Progress – The command has been sent to the instance but has not reached a terminal state.
Delayed – The system attempted to send the command to the target, but the target was not available. The instance might not be available because of network issues, the instance was stopped, etc. The system will try to deliver the command again.
Success – The command or plugin was executed successfully. This is a terminal state.
Delivery Timed Out – The command was not delivered to the instance before the delivery timeout expired. Delivery timeouts do not count against the parent command’s MaxErrors limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.
Execution Timed Out – The command started to execute on the instance, but the execution was not complete before the timeout expired. Execution timeouts count against the MaxErrors limit of the parent command. This is a terminal state.
Failed – The command wasn't executed successfully on the instance. For a plugin, this indicates that the result code was not zero. For a command invocation, this indicates that the result code for one or more plugins was not zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.
Canceled – The command was terminated before it was completed. This is a terminal state.
Undeliverable – The command can't be delivered to the instance. The instance might not exist or might not be responding. Undeliverable invocations don't count against the parent command’s MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.
Terminated – The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.
StandardOutputContent (string) --
The first 24,000 characters written by the plugin to stdout. If the command has not finished executing, if ExecutionStatus is neither Succeeded nor Failed, then this string is empty.
StandardOutputUrl (string) --
The URL for the complete text written by the plugin to stdout in Amazon S3. If an Amazon S3 bucket was not specified, then this string is empty.
StandardErrorContent (string) --
The first 8,000 characters written by the plugin to stderr. If the command has not finished executing, then this string is empty.
StandardErrorUrl (string) --
The URL for the complete text written by the plugin to stderr. If the command has not finished executing, then this string is empty.
Return a list of inventory type names for the account, or return a list of attribute names for a specific Inventory item type.
See also: AWS API Documentation
Request Syntax
client.get_inventory_schema( TypeName='string', NextToken='string', MaxResults=123 )
string
The type of inventory item to return.
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.
dict
Response Syntax
{ 'Schemas': [ { 'TypeName': 'string', 'Version': 'string', 'Attributes': [ { 'Name': 'string', 'DataType': 'string'|'number' }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Schemas (list) --
Inventory schemas returned by the request.
(dict) --
The inventory item schema definition. Users can use this to compose inventory query filters.
TypeName (string) --
The name of the inventory type. Default inventory item type names start with AWS. Custom inventory type names will start with Custom. Default inventory item types include the following: AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, AWS:Network, and AWS:WindowsUpdate.
Version (string) --
The schema version for the inventory item.
Attributes (list) --
The schema attributes for inventory. This contains data type and attribute name.
(dict) --
Attributes are the entries within the inventory item content. It contains name and value.
Name (string) --
Name of the inventory item attribute.
DataType (string) --
The data type of the inventory item attribute.
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.
Lists the tasks in a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_window_tasks( WindowId='string', Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the Maintenance Window whose tasks should be retrieved.
list
Optional filters used to narrow down the scope of the returned tasks. The supported filter keys are WindowTaskId, TaskArn, Priority, and TaskType.
(dict) --
Filter used in the request.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(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
{ 'Tasks': [ { 'WindowId': 'string', 'WindowTaskId': 'string', 'TaskArn': 'string', 'Type': 'RUN_COMMAND', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'TaskParameters': { 'string': { 'Values': [ 'string', ] } }, 'Priority': 123, 'LoggingInfo': { 'S3BucketName': 'string', 'S3KeyPrefix': 'string', 'S3Region': 'string' }, 'ServiceRoleArn': 'string', 'MaxConcurrency': 'string', 'MaxErrors': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Tasks (list) --
Information about the tasks in the Maintenance Window.
(dict) --
Information about a task defined for a Maintenance Window.
WindowId (string) --
The Maintenance Window ID where the task is registered.
WindowTaskId (string) --
The task ID.
TaskArn (string) --
The ARN of the task to execute.
Type (string) --
The type of task.
Targets (list) --
The targets (either instances or tags). Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
TaskParameters (dict) --
The parameters that should be passed to the task when it is executed.
(string) --
(dict) --
Defines the values for a task parameter.
Values (list) --
This field contains an array of 0 or more strings, each 1 to 255 characters in length.
(string) --
Priority (integer) --
The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
LoggingInfo (dict) --
Information about an Amazon S3 bucket to write task-level logs to.
S3BucketName (string) --
The name of an Amazon S3 bucket where execution logs are stored .
S3KeyPrefix (string) --
(Optional) The Amazon S3 bucket subfolder.
S3Region (string) --
The region where the Amazon S3 bucket is located.
ServiceRoleArn (string) --
The role that should be assumed when executing the task
MaxConcurrency (string) --
The maximum number of targets this task can be run for in parallel.
MaxErrors (string) --
The maximum number of errors allowed before this task stops being scheduled.
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.
Add one or more paramaters to the system.
See also: AWS API Documentation
Request Syntax
client.put_parameter( Name='string', Description='string', Value='string', Type='String'|'StringList'|'SecureString', KeyId='string', Overwrite=True|False )
string
[REQUIRED]
The name of the parameter that you want to add to the system.
string
Information about the parameter that you want to add to the system
string
[REQUIRED]
The parameter value that you want to add to the system.
string
[REQUIRED]
The type of parameter that you want to add to the system.
string
The parameter key ID that you want to add to the system.
boolean
Overwrite an existing parameter.
dict
Response Syntax
{}
Response Structure
(dict) --
Retrieves the Maintenance Windows in an AWS account.
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_windows( Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
list
Optional filters used to narrow down the scope of the returned Maintenance Windows. Supported filter keys are Name and Enabled.
(dict) --
Filter used in the request.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(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
{ 'WindowIdentities': [ { 'WindowId': 'string', 'Name': 'string', 'Enabled': True|False, 'Duration': 123, 'Cutoff': 123 }, ], 'NextToken': 'string' }
Response Structure
(dict) --
WindowIdentities (list) --
Information about the Maintenance Windows.
(dict) --
Information about the Maintenance Window.
WindowId (string) --
The ID of the Maintenance Window.
Name (string) --
The name of the Maintenance Window.
Enabled (boolean) --
Whether the Maintenance Window is enabled.
Duration (integer) --
The duration of the Maintenance Window in hours.
Cutoff (integer) --
The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
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.
A list of inventory items returned by the request.
See also: AWS API Documentation
Request Syntax
client.list_inventory_entries( InstanceId='string', TypeName='string', Filters=[ { 'Key': 'string', 'Values': [ 'string', ], 'Type': 'Equal'|'NotEqual'|'BeginWith'|'LessThan'|'GreaterThan' }, ], NextToken='string', MaxResults=123 )
string
[REQUIRED]
The instance ID for which you want inventory information.
string
[REQUIRED]
The type of inventory item for which you want information.
list
One or more filters. Use a filter to return a more specific list of results.
(dict) --
One or more filters. Use a filter to return a more specific list of results.
Key (string) -- [REQUIRED]
The name of the filter key.
Values (list) -- [REQUIRED]
Inventory filter values. Example: inventory filter where instance IDs are specified as values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g, i-1a2b3c4d5e6,Type=Equal
(string) --
Type (string) --
The type of filter. Valid values include the following: "Equal"|"NotEqual"|"BeginWith"|"LessThan"|"GreaterThan"
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.
dict
Response Syntax
{ 'TypeName': 'string', 'InstanceId': 'string', 'SchemaVersion': 'string', 'CaptureTime': 'string', 'Entries': [ { 'string': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
TypeName (string) --
The type of inventory item returned by the request.
InstanceId (string) --
The instance ID targeted by the request to query inventory information.
SchemaVersion (string) --
The inventory schema version used by the instance(s).
CaptureTime (string) --
The time that inventory information was collected for the instance(s).
Entries (list) --
A list of inventory items on the instance(s).
(dict) --
(string) --
(string) --
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.
Registers a target with a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.register_target_with_maintenance_window( WindowId='string', ResourceType='INSTANCE', Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], OwnerInformation='string', ClientToken='string' )
string
[REQUIRED]
The ID of the Maintenance Window the target should be registered with.
string
[REQUIRED]
The type of target being registered with the Maintenance Window.
list
[REQUIRED]
The targets (either instances or tags). Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
string
User-provided value that will be included in any CloudWatch events raised while running tasks for these targets in this Maintenance Window.
string
User-provided idempotency token.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'WindowTargetId': 'string' }
Response Structure
(dict) --
WindowTargetId (string) --
The ID of the target definition in this Maintenance Window.
Removes a target from a Maintenance Window.
See also: AWS API Documentation
Request Syntax
client.deregister_target_from_maintenance_window( WindowId='string', WindowTargetId='string' )
string
[REQUIRED]
The ID of the Maintenance Window the target should be removed from.
string
[REQUIRED]
The ID of the target definition to remove.
dict
Response Syntax
{ 'WindowId': 'string', 'WindowTargetId': 'string' }
Response Structure
(dict) --
WindowId (string) --
The ID of the Maintenance Window the target was removed from.
WindowTargetId (string) --
The ID of the removed target definition.
Lists the executions of a Maintenance Window (meaning, information about when the Maintenance Window was scheduled to be active and information about tasks registered and run with the Maintenance Window).
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_window_executions( WindowId='string', Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the Maintenance Window whose executions should be retrieved.
list
Each entry in the array is a structure containing:
Key (string, 1 ≤ length ≤ 128)
Values (array of strings 1 ≤ length ≤ 256)
The supported Keys are ExecutedBefore and ExecutedAfter with the value being a date/time string such as 2016-11-04T05:00:00Z.
(dict) --
Filter used in the request.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(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
{ 'WindowExecutions': [ { 'WindowId': 'string', 'WindowExecutionId': 'string', 'Status': 'PENDING'|'IN_PROGRESS'|'SUCCESS'|'FAILED'|'TIMED_OUT'|'CANCELLING'|'CANCELLED'|'SKIPPED_OVERLAPPING', 'StatusDetails': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
WindowExecutions (list) --
Information about the Maintenance Windows execution.
(dict) --
Describes the information about an execution of a Maintenance Window.
WindowId (string) --
The ID of the Maintenance Window.
WindowExecutionId (string) --
The ID of the Maintenance Window execution.
Status (string) --
The status of the execution.
StatusDetails (string) --
The details explaining the Status. Only available for certain status values.
StartTime (datetime) --
The time the execution started.
EndTime (datetime) --
The time the execution finished.
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.
{'ResourceType': {'MaintenanceWindow', 'Parameter'}}
Adds or overwrites one or more tags for the specified resource. Tags are metadata that you assign to your managed instances. Tags enable you to categorize your managed instances 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. For example, you could define a set of tags for your account's managed instances that helps you track each instance's owner and stack level. For example: Key=Owner and Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack and Value=Production, Pre-Production, or Test. Each resource can have a maximum of 10 tags.
We recommend that you devise a set of tag keys that meets your needs for each resource type. Using a consistent set of tag keys makes it easier for you to manage your resources. You can search and filter the resources based on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and are interpreted strictly as a string of characters.
For more information about tags, see Tagging Your Amazon EC2 Resources in the Amazon EC2 User Guide.
See also: AWS API Documentation
Request Syntax
client.add_tags_to_resource( ResourceType='ManagedInstance'|'MaintenanceWindow'|'Parameter', ResourceId='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
Specifies the type of resource you are tagging.
string
[REQUIRED]
The resource ID you want to tag.
list
[REQUIRED]
One or more tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.
(dict) --
Metadata that you assign to your managed instances. Tags enable you to categorize your managed instances in different ways, for example, by purpose, owner, or environment.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
Response Syntax
{}
Response Structure
(dict) --
{'DocumentVersion': 'string', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}Response
{'AssociationDescription': {'AssociationId': 'string', 'DocumentVersion': 'string', 'LastExecutionDate': 'timestamp', 'LastSuccessfulExecutionDate': 'timestamp', 'LastUpdateAssociationDate': 'timestamp', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'Overview': {'AssociationStatusAggregatedCount': {'string': 'integer'}, 'DetailedStatus': 'string', 'Status': 'string'}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Associates the specified SSM document with the specified instances or targets.
When you associate an SSM document with one or more instances using instance IDs or tags, the SSM agent running on the instance processes the document and configures the instance as specified.
If you associate a document with an instance that already has an associated document, the system throws the AssociationAlreadyExists exception.
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' } } )
string
[REQUIRED]
The name of the SSM document.
string
The document version you want to associate with the target(s). Can be a specific version or the default version.
string
The instance ID.
dict
The parameters for the documents runtime configuration.
(string) --
(list) --
(string) --
list
The targets (either instances or tags) for the association. Instances are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
string
A cron expression when the association will be applied to the target(s). Supported expressions are every half, 1, 2, 4, 8 or 12 hour(s); every specified day and time of the week. For example: cron(0 0/30 * 1/1 * ? *) to run every thirty minutes; cron(0 0 0/4 1/1 * ? *) to run every four hours; and cron(0 0 10 ? * SUN *) to run every Sunday at 10 a.m.
dict
An Amazon S3 bucket where you want to store the output details of the request. For example:
"{ \"S3Location\": { \"OutputS3Region\": \"<region>\", \"OutputS3BucketName\": \"bucket name\", \"OutputS3KeyPrefix\": \"folder name\" } }"
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon S3 bucket subfolder.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': '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', '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) } }
Response Structure
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The ID of the instance.
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 instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon 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.
{'Entries': {'DocumentVersion': 'string', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}Response
{'Failed': {'Entry': {'DocumentVersion': 'string', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}, 'Successful': {'AssociationId': 'string', 'DocumentVersion': 'string', 'LastExecutionDate': 'timestamp', 'LastSuccessfulExecutionDate': 'timestamp', 'LastUpdateAssociationDate': 'timestamp', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'Overview': {'AssociationStatusAggregatedCount': {'string': 'integer'}, 'DetailedStatus': 'string', 'Status': 'string'}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Associates the specified SSM document with the specified instances or targets.
When you associate an SSM document with one or more instances using instance IDs or tags, the SSM agent running on the instance processes the document and configures the instance as specified.
If you associate a document with an instance that already has an associated document, the system throws the AssociationAlreadyExists exception.
See also: AWS API Documentation
Request Syntax
client.create_association_batch( Entries=[ { 'Name': 'string', 'InstanceId': 'string', 'Parameters': { 'string': [ 'string', ] }, 'DocumentVersion': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } } }, ] )
list
[REQUIRED]
One or more associations.
(dict) --
Describes the association of an SSM document and an instance.
Name (string) -- [REQUIRED]
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
DocumentVersion (string) --
The document version.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the results of this request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon S3 bucket subfolder.
dict
Response Syntax
{ 'Successful': [ { 'Name': 'string', 'InstanceId': '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', '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) }, ], 'Failed': [ { 'Entry': { 'Name': 'string', 'InstanceId': 'string', 'Parameters': { 'string': [ 'string', ] }, 'DocumentVersion': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': '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 ID of the instance.
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 instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon 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.
Failed (list) --
Information about the associations that failed.
(dict) --
Describes a failed association.
Entry (dict) --
The association.
Name (string) --
The name of the configuration document.
InstanceId (string) --
The ID of the instance.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
DocumentVersion (string) --
The document version.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the results of this request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon S3 bucket subfolder.
Message (string) --
A description of the failure.
Fault (string) --
The source of the failure.
{'DocumentType': 'Command | Policy | Automation'}Response
{'DocumentDescription': {'DefaultVersion': 'string', 'DocumentType': 'Command | Policy | Automation', 'DocumentVersion': 'string', 'LatestVersion': 'string', 'SchemaVersion': 'string', 'Status': {'Updating'}}}
Creates an SSM document.
After you create an SSM document, you can use CreateAssociation to associate it with one or more running instances.
See also: AWS API Documentation
Request Syntax
client.create_document( Content='string', Name='string', DocumentType='Command'|'Policy'|'Automation' )
string
[REQUIRED]
A valid JSON string.
string
[REQUIRED]
A name for the SSM document.
string
The type of document to create. Valid document types include: Policy, Automation, and Command.
dict
Response Syntax
{ 'DocumentDescription': { 'Sha1': 'string', 'Hash': 'string', 'HashType': 'Sha256'|'Sha1', 'Name': 'string', 'Owner': 'string', 'CreatedDate': datetime(2015, 1, 1), 'Status': 'Creating'|'Active'|'Updating'|'Deleting', 'DocumentVersion': 'string', 'Description': 'string', 'Parameters': [ { 'Name': 'string', 'Type': 'String'|'StringList', 'Description': 'string', 'DefaultValue': 'string' }, ], 'PlatformTypes': [ 'Windows'|'Linux', ], 'DocumentType': 'Command'|'Policy'|'Automation', 'SchemaVersion': 'string', 'LatestVersion': 'string', 'DefaultVersion': 'string' } }
Response Structure
(dict) --
DocumentDescription (dict) --
Information about the SSM document.
Sha1 (string) --
The SHA1 hash of the document, which you can use for verification purposes.
Hash (string) --
The Sha256 or Sha1 hash created by the system when the document was created.
HashType (string) --
Sha256 or Sha1.
Name (string) --
The name of the SSM document.
Owner (string) --
The AWS user account of the person who created the document.
CreatedDate (datetime) --
The date when the SSM document was created.
Status (string) --
The status of the SSM document.
DocumentVersion (string) --
The document version.
Description (string) --
A description of the document.
Parameters (list) --
A description of the parameters for a document.
(dict) --
Parameters specified in the SSM document that execute on the server when the command is run.
Name (string) --
The name of the parameter.
Type (string) --
The type of parameter. The type can be either “String” or “StringList”.
Description (string) --
A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
DefaultValue (string) --
If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
PlatformTypes (list) --
The list of OS platforms compatible with this SSM document.
(string) --
DocumentType (string) --
The type of document.
SchemaVersion (string) --
The schema version.
LatestVersion (string) --
The latest version of the document.
DefaultVersion (string) --
The default version.
{'AssociationId': 'string'}
Disassociates the specified SSM document from the specified instance.
When you disassociate an SSM document from an instance, it does not change the configuration of the instance. To change the configuration state of an instance after you disassociate a document, you must create a new document with the desired configuration and associate it with the instance.
See also: AWS API Documentation
Request Syntax
client.delete_association( Name='string', InstanceId='string', AssociationId='string' )
string
The name of the SSM document.
string
The ID of the instance.
string
The association ID that you want to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
{'AssociationId': 'string'}Response
{'AssociationDescription': {'AssociationId': 'string', 'DocumentVersion': 'string', 'LastExecutionDate': 'timestamp', 'LastSuccessfulExecutionDate': 'timestamp', 'LastUpdateAssociationDate': 'timestamp', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'Overview': {'AssociationStatusAggregatedCount': {'string': 'integer'}, 'DetailedStatus': 'string', 'Status': 'string'}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Describes the associations for the specified SSM document or instance.
See also: AWS API Documentation
Request Syntax
client.describe_association( Name='string', InstanceId='string', AssociationId='string' )
string
The name of the SSM document.
string
The instance ID.
string
The association ID for which you want information.
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': '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', '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) } }
Response Structure
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The ID of the instance.
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 instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon 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.
{'DocumentVersion': 'string'}Response
{'Document': {'DefaultVersion': 'string', 'DocumentType': 'Command | Policy | Automation', 'DocumentVersion': 'string', 'LatestVersion': 'string', 'SchemaVersion': 'string', 'Status': {'Updating'}}}
Describes the specified SSM document.
See also: AWS API Documentation
Request Syntax
client.describe_document( Name='string', DocumentVersion='string' )
string
[REQUIRED]
The name of the SSM document.
string
The document version for which you want information. Can be a specific version or the default version.
dict
Response Syntax
{ 'Document': { 'Sha1': 'string', 'Hash': 'string', 'HashType': 'Sha256'|'Sha1', 'Name': 'string', 'Owner': 'string', 'CreatedDate': datetime(2015, 1, 1), 'Status': 'Creating'|'Active'|'Updating'|'Deleting', 'DocumentVersion': 'string', 'Description': 'string', 'Parameters': [ { 'Name': 'string', 'Type': 'String'|'StringList', 'Description': 'string', 'DefaultValue': 'string' }, ], 'PlatformTypes': [ 'Windows'|'Linux', ], 'DocumentType': 'Command'|'Policy'|'Automation', 'SchemaVersion': 'string', 'LatestVersion': 'string', 'DefaultVersion': 'string' } }
Response Structure
(dict) --
Document (dict) --
Information about the SSM document.
Sha1 (string) --
The SHA1 hash of the document, which you can use for verification purposes.
Hash (string) --
The Sha256 or Sha1 hash created by the system when the document was created.
HashType (string) --
Sha256 or Sha1.
Name (string) --
The name of the SSM document.
Owner (string) --
The AWS user account of the person who created the document.
CreatedDate (datetime) --
The date when the SSM document was created.
Status (string) --
The status of the SSM document.
DocumentVersion (string) --
The document version.
Description (string) --
A description of the document.
Parameters (list) --
A description of the parameters for a document.
(dict) --
Parameters specified in the SSM document that execute on the server when the command is run.
Name (string) --
The name of the parameter.
Type (string) --
The type of parameter. The type can be either “String” or “StringList”.
Description (string) --
A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.
DefaultValue (string) --
If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.
PlatformTypes (list) --
The list of OS platforms compatible with this SSM document.
(string) --
DocumentType (string) --
The type of document.
SchemaVersion (string) --
The schema version.
LatestVersion (string) --
The latest version of the document.
DefaultVersion (string) --
The default version.
{'Filters': [{'Key': 'string', 'Values': ['string']}], 'InstanceInformationFilterList': {'key': {'AssociationStatus'}}}Response
{'InstanceInformationList': {'AssociationOverview': {'DetailedStatus': 'string', 'InstanceAssociationStatusAggregatedCount': {'string': 'integer'}}, 'AssociationStatus': 'string', 'LastAssociationExecutionDate': 'timestamp', 'LastSuccessfulAssociationExecutionDate': 'timestamp'}}
Describes one or more of your instances. You can use this to get information about instances like the operating system platform, the SSM agent version (Linux), status etc. If you specify one or more instance IDs, it returns information for those instances. If you do not specify instance IDs, it returns information for all your instances. If you specify an instance ID that is not valid or an instance that you do not own, you receive an error.
See also: AWS API Documentation
Request Syntax
client.describe_instance_information( InstanceInformationFilterList=[ { 'key': 'InstanceIds'|'AgentVersion'|'PingStatus'|'PlatformTypes'|'ActivationIds'|'IamRole'|'ResourceType'|'AssociationStatus', 'valueSet': [ 'string', ] }, ], Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
list
One or more filters. Use a filter to return a more specific list of instances.
(dict) --
Describes a filter for a specific list of instances.
key (string) -- [REQUIRED]
The name of the filter.
valueSet (list) -- [REQUIRED]
The filter values.
(string) --
list
One or more filters. Use a filter to return a more specific list of instances.
(dict) --
The filters to describe or get information about your managed instances.
Key (string) -- [REQUIRED]
The filter key name to describe your instances. For example:
"InstanceIds"|"AgentVersion"|"PingStatus"|"PlatformTypes"|"ActivationIds"|"IamRole"|"ResourceType"|”AssociationStatus”|”Tag Key”
Values (list) -- [REQUIRED]
The filter values.
(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
{ 'InstanceInformationList': [ { 'InstanceId': 'string', 'PingStatus': 'Online'|'ConnectionLost'|'Inactive', 'LastPingDateTime': datetime(2015, 1, 1), 'AgentVersion': 'string', 'IsLatestVersion': True|False, 'PlatformType': 'Windows'|'Linux', 'PlatformName': 'string', 'PlatformVersion': 'string', 'ActivationId': 'string', 'IamRole': 'string', 'RegistrationDate': datetime(2015, 1, 1), 'ResourceType': 'ManagedInstance'|'Document'|'EC2Instance', 'Name': 'string', 'IPAddress': 'string', 'ComputerName': 'string', 'AssociationStatus': 'string', 'LastAssociationExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulAssociationExecutionDate': datetime(2015, 1, 1), 'AssociationOverview': { 'DetailedStatus': 'string', 'InstanceAssociationStatusAggregatedCount': { 'string': 123 } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
InstanceInformationList (list) --
The instance information list.
(dict) --
Describes a filter for a specific list of instances.
InstanceId (string) --
The instance ID.
PingStatus (string) --
Connection status of the SSM agent.
LastPingDateTime (datetime) --
The date and time when agent last pinged Systems Manager service.
AgentVersion (string) --
The version of the SSM agent running on your Linux instance.
IsLatestVersion (boolean) --
Indicates whether latest version of the SSM agent is running on your instance.
PlatformType (string) --
The operating system platform type.
PlatformName (string) --
The name of the operating system platform running on your instance.
PlatformVersion (string) --
The version of the OS platform running on your instance.
ActivationId (string) --
The activation ID created by Systems Manager when the server or VM was registered.
IamRole (string) --
The Amazon Identity and Access Management (IAM) role assigned to EC2 instances or managed instances.
RegistrationDate (datetime) --
The date the server or VM was registered with AWS as a managed instance.
ResourceType (string) --
The type of instance. Instances are either EC2 instances or managed instances.
Name (string) --
The name of the managed instance.
IPAddress (string) --
The IP address of the managed instance.
ComputerName (string) --
The fully qualified host name of the managed instance.
AssociationStatus (string) --
The status of the association.
LastAssociationExecutionDate (datetime) --
The date the association was last executed.
LastSuccessfulAssociationExecutionDate (datetime) --
The last date the association was successfully run.
AssociationOverview (dict) --
Information about the association.
DetailedStatus (string) --
Detailed status information about the aggregated associations.
InstanceAssociationStatusAggregatedCount (dict) --
The number of associations for the instance(s).
(string) --
(integer) --
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.
{'DocumentVersion': 'string'}Response
{'DocumentType': 'Command | Policy | Automation', 'DocumentVersion': 'string'}
Gets the contents of the specified SSM document.
See also: AWS API Documentation
Request Syntax
client.get_document( Name='string', DocumentVersion='string' )
string
[REQUIRED]
The name of the SSM document.
string
The document version for which you want information.
dict
Response Syntax
{ 'Name': 'string', 'DocumentVersion': 'string', 'Content': 'string', 'DocumentType': 'Command'|'Policy'|'Automation' }
Response Structure
(dict) --
Name (string) --
The name of the SSM document.
DocumentVersion (string) --
The document version.
Content (string) --
The contents of the SSM document.
DocumentType (string) --
The document type.
{'AssociationFilterList': {'key': {'AssociationId', 'AssociationStatusName', 'LastExecutedAfter', 'LastExecutedBefore'}}}Response
{'Associations': {'AssociationId': 'string', 'DocumentVersion': 'string', 'LastExecutionDate': 'timestamp', 'Overview': {'AssociationStatusAggregatedCount': {'string': 'integer'}, 'DetailedStatus': 'string', 'Status': 'string'}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Lists the associations for the specified SSM document or instance.
See also: AWS API Documentation
Request Syntax
client.list_associations( AssociationFilterList=[ { 'key': 'InstanceId'|'Name'|'AssociationId'|'AssociationStatusName'|'LastExecutedBefore'|'LastExecutedAfter', 'value': 'string' }, ], MaxResults=123, NextToken='string' )
list
One or more filters. Use a filter to return a more specific list of results.
(dict) --
Describes a filter.
key (string) -- [REQUIRED]
The name of the filter.
value (string) -- [REQUIRED]
The filter value.
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
{ 'Associations': [ { 'Name': 'string', 'InstanceId': 'string', 'AssociationId': 'string', 'DocumentVersion': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'LastExecutionDate': datetime(2015, 1, 1), 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'ScheduleExpression': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Associations (list) --
The associations.
(dict) --
Describes an association of an SSM document and an instance.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The ID of the instance.
AssociationId (string) --
The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.
DocumentVersion (string) --
The version of the document used in the association.
Targets (list) --
The instances targeted by the request to create an association.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
LastExecutionDate (datetime) --
The date on which the association was last run.
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 instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
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.
{'CommandInvocations': {'CommandPlugins': {'OutputS3Region': 'string', 'StandardErrorUrl': 'string', 'StandardOutputUrl': 'string', 'StatusDetails': 'string'}, 'InstanceName': 'string', 'StandardErrorUrl': 'string', 'StandardOutputUrl': 'string', 'Status': {'Delayed'}, 'StatusDetails': 'string'}}
An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. ListCommandInvocations provide status about command execution.
See also: AWS API Documentation
Request Syntax
client.list_command_invocations( CommandId='string', InstanceId='string', MaxResults=123, NextToken='string', Filters=[ { 'key': 'InvokedAfter'|'InvokedBefore'|'Status', 'value': 'string' }, ], Details=True|False )
string
(Optional) The invocations for a specific command ID.
string
(Optional) The command execution details for a specific instance ID.
integer
(Optional) 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
(Optional) The token for the next set of items to return. (You received this token from a previous call.)
list
(Optional) One or more filters. Use a filter to return a more specific list of results.
(dict) --
Describes a command filter.
key (string) -- [REQUIRED]
The name of the filter. For example, requested date and time.
value (string) -- [REQUIRED]
The filter value. For example: June 30, 2015.
boolean
(Optional) If set this returns the response of the command executions and any command output. By default this is set to False.
dict
Response Syntax
{ 'CommandInvocations': [ { 'CommandId': 'string', 'InstanceId': 'string', 'InstanceName': 'string', 'Comment': 'string', 'DocumentName': 'string', 'RequestedDateTime': datetime(2015, 1, 1), 'Status': 'Pending'|'InProgress'|'Delayed'|'Success'|'Cancelled'|'TimedOut'|'Failed'|'Cancelling', 'StatusDetails': 'string', 'TraceOutput': 'string', 'StandardOutputUrl': 'string', 'StandardErrorUrl': 'string', 'CommandPlugins': [ { 'Name': 'string', 'Status': 'Pending'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', 'StatusDetails': 'string', 'ResponseCode': 123, 'ResponseStartDateTime': datetime(2015, 1, 1), 'ResponseFinishDateTime': datetime(2015, 1, 1), 'Output': 'string', 'StandardOutputUrl': 'string', 'StandardErrorUrl': 'string', 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' }, ], 'ServiceRole': 'string', 'NotificationConfig': { 'NotificationArn': 'string', 'NotificationEvents': [ 'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', ], 'NotificationType': 'Command'|'Invocation' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
CommandInvocations (list) --
(Optional) A list of all invocations.
(dict) --
An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. A command invocation returns status and detail information about a command you executed.
CommandId (string) --
The command against which this invocation was requested.
InstanceId (string) --
The instance ID in which this invocation was requested.
InstanceName (string) --
The name of the invocation target. For Amazon EC2 instances this is the value for the aws:Name tag. For on-premises instances, this is the name of the instance.
Comment (string) --
User-specified information about the command, such as a brief description of what the command should do.
DocumentName (string) --
The document name that was requested for execution.
RequestedDateTime (datetime) --
The time and date the request was sent to this instance.
Status (string) --
Whether or not the invocation succeeded, failed, or is pending.
StatusDetails (string) --
A detailed status of the command execution for each invocation (each instance targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Monitor Commands (Linux) or Monitor Commands (Windows). StatusDetails can be one of the following values:
Pending – The command has not been sent to the instance.
In Progress – The command has been sent to the instance but has not reached a terminal state.
Success – The execution of the command or plugin was successfully completed. This is a terminal state.
Delivery Timed Out – The command was not delivered to the instance before the delivery timeout expired. Delivery timeouts do not count against the parent command’s MaxErrors limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.
Execution Timed Out – Command execution started on the instance, but the execution was not complete before the execution timeout expired. Execution timeouts count against the MaxErrors limit of the parent command. This is a terminal state.
Failed – The command was not successful on the instance. For a plugin, this indicates that the result code was not zero. For a command invocation, this indicates that the result code for one or more plugins was not zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.
Canceled – The command was terminated before it was completed. This is a terminal state.
Undeliverable – The command can't be delivered to the instance. The instance might not exist or might not be responding. Undeliverable invocations don't count against the parent command’s MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.
Terminated – The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.
TraceOutput (string) --
Gets the trace output sent by the agent.
StandardOutputUrl (string) --
The URL to the plugin’s StdOut file in Amazon S3, if the Amazon S3 bucket was defined for the parent command. For an invocation, StandardOutputUrl is populated if there is just one plugin defined for the command, and the Amazon S3 bucket was defined for the command.
StandardErrorUrl (string) --
The URL to the plugin’s StdErr file in Amazon S3, if the Amazon S3 bucket was defined for the parent command. For an invocation, StandardErrorUrl is populated if there is just one plugin defined for the command, and the Amazon S3 bucket was defined for the command.
CommandPlugins (list) --
(dict) --
Describes plugin details.
Name (string) --
The name of the plugin. Must be one of the following: aws:updateAgent, aws:domainjoin, aws:applications, aws:runPowerShellScript, aws:psmodule, aws:cloudWatch, aws:runShellScript, or aws:updateSSMAgent.
Status (string) --
The status of this plugin. You can execute a document with multiple plugins.
StatusDetails (string) --
A detailed status of the plugin execution. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Monitor Commands (Linux) or Monitor Commands (Windows). StatusDetails can be one of the following values:
Pending – The command has not been sent to the instance.
In Progress – The command has been sent to the instance but has not reached a terminal state.
Success – The execution of the command or plugin was successfully completed. This is a terminal state.
Delivery Timed Out – The command was not delivered to the instance before the delivery timeout expired. Delivery timeouts do not count against the parent command’s MaxErrors limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.
Execution Timed Out – Command execution started on the instance, but the execution was not complete before the execution timeout expired. Execution timeouts count against the MaxErrors limit of the parent command. This is a terminal state.
Failed – The command was not successful on the instance. For a plugin, this indicates that the result code was not zero. For a command invocation, this indicates that the result code for one or more plugins was not zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.
Canceled – The command was terminated before it was completed. This is a terminal state.
Undeliverable – The command can't be delivered to the instance. The instance might not exist, or it might not be responding. Undeliverable invocations don't count against the parent command’s MaxErrors limit, and they don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.
Terminated – The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.
ResponseCode (integer) --
A numeric response code generated after executing the plugin.
ResponseStartDateTime (datetime) --
The time the plugin started executing.
ResponseFinishDateTime (datetime) --
The time the plugin stopped executing. Could stop prematurely if, for example, a cancel command was sent.
Output (string) --
Output of the plugin execution.
StandardOutputUrl (string) --
The URL for the complete text written by the plugin to stdout in Amazon S3. If the Amazon S3 bucket for the command was not specified, then this string is empty.
StandardErrorUrl (string) --
The URL for the complete text written by the plugin to stderr. If execution is not yet complete, then this string is empty.
OutputS3Region (string) --
The name of the region where the output is stored in Amazon S3.
OutputS3BucketName (string) --
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:
test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript
test_folder is the name of the Amazon S3 bucket;
ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix;
i-1234567876543 is the instance ID;
awsrunShellScript is the name of the plugin.
OutputS3KeyPrefix (string) --
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:
test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript
test_folder is the name of the Amazon S3 bucket;
ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix;
i-1234567876543 is the instance ID;
awsrunShellScript is the name of the plugin.
ServiceRole (string) --
The IAM service role that Run Command uses to act on your behalf when sending notifications about command status changes on a per instance basis.
NotificationConfig (dict) --
Configurations for sending notifications about command status changes on a per instance basis.
NotificationArn (string) --
An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
NotificationEvents (list) --
The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Monitoring Commands in the *Amazon Elastic Compute Cloud User Guide *.
(string) --
NotificationType (string) --
Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
NextToken (string) --
(Optional) The token for the next set of items to return. (You received this token from a previous call.)
{'Commands': {'CompletedCount': 'integer', 'ErrorCount': 'integer', 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'OutputS3Region': 'string', 'StatusDetails': 'string', 'TargetCount': 'integer', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Lists the commands requested by users of the AWS account.
See also: AWS API Documentation
Request Syntax
client.list_commands( CommandId='string', InstanceId='string', MaxResults=123, NextToken='string', Filters=[ { 'key': 'InvokedAfter'|'InvokedBefore'|'Status', 'value': 'string' }, ] )
string
(Optional) If provided, lists only the specified command.
string
(Optional) Lists commands issued against this instance ID.
integer
(Optional) 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
(Optional) The token for the next set of items to return. (You received this token from a previous call.)
list
(Optional) One or more filters. Use a filter to return a more specific list of results.
(dict) --
Describes a command filter.
key (string) -- [REQUIRED]
The name of the filter. For example, requested date and time.
value (string) -- [REQUIRED]
The filter value. For example: June 30, 2015.
dict
Response Syntax
{ 'Commands': [ { 'CommandId': 'string', 'DocumentName': 'string', 'Comment': 'string', 'ExpiresAfter': datetime(2015, 1, 1), 'Parameters': { 'string': [ 'string', ] }, 'InstanceIds': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'RequestedDateTime': datetime(2015, 1, 1), 'Status': 'Pending'|'InProgress'|'Success'|'Cancelled'|'Failed'|'TimedOut'|'Cancelling', 'StatusDetails': 'string', 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'TargetCount': 123, 'CompletedCount': 123, 'ErrorCount': 123, 'ServiceRole': 'string', 'NotificationConfig': { 'NotificationArn': 'string', 'NotificationEvents': [ 'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', ], 'NotificationType': 'Command'|'Invocation' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Commands (list) --
(Optional) The list of commands requested by the user.
(dict) --
Describes a command request.
CommandId (string) --
A unique identifier for this command.
DocumentName (string) --
The name of the SSM document requested for execution.
Comment (string) --
User-specified information about the command, such as a brief description of what the command should do.
ExpiresAfter (datetime) --
If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
Parameters (dict) --
The parameter values to be inserted in the SSM document when executing the command.
(string) --
(list) --
(string) --
InstanceIds (list) --
The instance IDs against which this command was requested.
(string) --
Targets (list) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
RequestedDateTime (datetime) --
The date and time the command was requested.
Status (string) --
The status of the command.
StatusDetails (string) --
A detailed status of the command execution. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Monitor Commands (Linux) or Monitor Commands (Windows). StatusDetails can be one of the following values:
Pending – The command has not been sent to any instances.
In Progress – The command has been sent to at least one instance but has not reached a final state on all instances.
Success – The command successfully executed on all invocations. This is a terminal state.
Delivery Timed Out – The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
Execution Timed Out – The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
Failed – The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
Incomplete – The command was attempted on all instances and one or more invocations does not have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
Canceled – The command was terminated before it was completed. This is a terminal state.
Rate Exceeded – The number of instances targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before executing it on any instance. This is a terminal state.
OutputS3Region (string) --
The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.
OutputS3BucketName (string) --
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
OutputS3KeyPrefix (string) --
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
MaxConcurrency (string) --
The maximum number of instances that are allowed to execute the command at the same time. You can specify a number of instances, such as 10, or a percentage of instances, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
MaxErrors (string) --
The maximum number of errors allowed before the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
TargetCount (integer) --
The number of targets for the command.
CompletedCount (integer) --
The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or Undeliverable.
ErrorCount (integer) --
The number of targets for which the status is Failed or Execution Timed Out.
ServiceRole (string) --
The IAM service role that Run Command uses to act on your behalf when sending notifications about command status changes.
NotificationConfig (dict) --
Configurations for sending notifications about command status changes.
NotificationArn (string) --
An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
NotificationEvents (list) --
The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Monitoring Commands in the *Amazon Elastic Compute Cloud User Guide *.
(string) --
NotificationType (string) --
Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
NextToken (string) --
(Optional) The token for the next set of items to return. (You received this token from a previous call.)
{'DocumentFilterList': {'key': {'DocumentType'}}}Response
{'DocumentIdentifiers': {'DocumentType': 'Command | Policy | Automation', 'DocumentVersion': 'string', 'SchemaVersion': 'string'}}
Describes one or more of your SSM documents.
See also: AWS API Documentation
Request Syntax
client.list_documents( DocumentFilterList=[ { 'key': 'Name'|'Owner'|'PlatformTypes'|'DocumentType', 'value': 'string' }, ], MaxResults=123, NextToken='string' )
list
One or more filters. Use a filter to return a more specific list of results.
(dict) --
Describes a filter.
key (string) -- [REQUIRED]
The name of the filter.
value (string) -- [REQUIRED]
The value of the filter.
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
{ 'DocumentIdentifiers': [ { 'Name': 'string', 'Owner': 'string', 'PlatformTypes': [ 'Windows'|'Linux', ], 'DocumentVersion': 'string', 'DocumentType': 'Command'|'Policy'|'Automation', 'SchemaVersion': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
DocumentIdentifiers (list) --
The names of the SSM documents.
(dict) --
Describes the name of an SSM document.
Name (string) --
The name of the SSM document.
Owner (string) --
The AWS user account of the person who created the document.
PlatformTypes (list) --
The operating system platform.
(string) --
DocumentVersion (string) --
The document version.
DocumentType (string) --
The document type.
SchemaVersion (string) --
The schema version.
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.
{'ResourceType': {'MaintenanceWindow', 'Parameter'}}
Returns a list of the tags assigned to the specified resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ResourceType='ManagedInstance'|'MaintenanceWindow'|'Parameter', ResourceId='string' )
string
[REQUIRED]
Returns a list of tags for a specific resource type.
string
[REQUIRED]
The resource ID for which you want to see a list of tags.
dict
Response Syntax
{ 'TagList': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) --
TagList (list) --
A list of tags.
(dict) --
Metadata that you assign to your managed instances. Tags enable you to categorize your managed instances in different ways, for example, by purpose, owner, or environment.
Key (string) --
The name of the tag.
Value (string) --
The value of the tag.
{'ResourceType': {'MaintenanceWindow', 'Parameter'}}
Removes all tags from the specified resource.
See also: AWS API Documentation
Request Syntax
client.remove_tags_from_resource( ResourceType='ManagedInstance'|'MaintenanceWindow'|'Parameter', ResourceId='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
The type of resource of which you want to remove a tag.
string
[REQUIRED]
The resource ID for which you want to remove tags.
list
[REQUIRED]
Tag keys that you want to remove from the specified resource.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
{'MaxConcurrency': 'string', 'MaxErrors': 'string', 'OutputS3Region': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}Response
{'Command': {'CompletedCount': 'integer', 'ErrorCount': 'integer', 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'OutputS3Region': 'string', 'StatusDetails': 'string', 'TargetCount': 'integer', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Executes commands on one or more remote instances.
See also: AWS API Documentation
Request Syntax
client.send_command( InstanceIds=[ 'string', ], Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], DocumentName='string', DocumentHash='string', DocumentHashType='Sha256'|'Sha1', TimeoutSeconds=123, Comment='string', Parameters={ 'string': [ 'string', ] }, OutputS3Region='string', OutputS3BucketName='string', OutputS3KeyPrefix='string', MaxConcurrency='string', MaxErrors='string', ServiceRoleArn='string', NotificationConfig={ 'NotificationArn': 'string', 'NotificationEvents': [ 'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', ], 'NotificationType': 'Command'|'Invocation' } )
list
Required. The instance IDs where the command should execute. You can specify a maximum of 50 IDs.
(string) --
list
(Optional) An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call. For more information about how to use Targets, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
string
[REQUIRED]
Required. The name of the SSM document to execute. This can be an SSM public document or a custom document.
string
The Sha256 or Sha1 hash created by the system when the document was created.
string
Sha256 or Sha1.
integer
If this time is reached and the command has not already started executing, it will not execute.
string
User-specified information about the command, such as a brief description of what the command should do.
dict
The required and optional parameters specified in the SSM document being executed.
(string) --
(list) --
(string) --
string
(Optional) The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.
string
The name of the S3 bucket where command execution responses should be stored.
string
The directory structure within the S3 bucket where the responses should be stored.
string
(Optional) The maximum number of instances that are allowed to execute the command at the same time. You can specify a number such as “10” or a percentage such as “10%”. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
string
The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value of MaxErrors, the systems stops sending the command to additional targets. You can specify a number like “10” or a percentage like “10%”. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
string
The IAM role that Systems Manager uses to send notifications.
dict
Configurations for sending notifications.
NotificationArn (string) --
An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
NotificationEvents (list) --
The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Monitoring Commands in the *Amazon Elastic Compute Cloud User Guide *.
(string) --
NotificationType (string) --
Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
dict
Response Syntax
{ 'Command': { 'CommandId': 'string', 'DocumentName': 'string', 'Comment': 'string', 'ExpiresAfter': datetime(2015, 1, 1), 'Parameters': { 'string': [ 'string', ] }, 'InstanceIds': [ 'string', ], 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'RequestedDateTime': datetime(2015, 1, 1), 'Status': 'Pending'|'InProgress'|'Success'|'Cancelled'|'Failed'|'TimedOut'|'Cancelling', 'StatusDetails': 'string', 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'MaxConcurrency': 'string', 'MaxErrors': 'string', 'TargetCount': 123, 'CompletedCount': 123, 'ErrorCount': 123, 'ServiceRole': 'string', 'NotificationConfig': { 'NotificationArn': 'string', 'NotificationEvents': [ 'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', ], 'NotificationType': 'Command'|'Invocation' } } }
Response Structure
(dict) --
Command (dict) --
The request as it was received by Systems Manager. Also provides the command ID which can be used future references to this request.
CommandId (string) --
A unique identifier for this command.
DocumentName (string) --
The name of the SSM document requested for execution.
Comment (string) --
User-specified information about the command, such as a brief description of what the command should do.
ExpiresAfter (datetime) --
If this time is reached and the command has not already started executing, it will not execute. Calculated based on the ExpiresAfter user input provided as part of the SendCommand API.
Parameters (dict) --
The parameter values to be inserted in the SSM document when executing the command.
(string) --
(list) --
(string) --
InstanceIds (list) --
The instance IDs against which this command was requested.
(string) --
Targets (list) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
RequestedDateTime (datetime) --
The date and time the command was requested.
Status (string) --
The status of the command.
StatusDetails (string) --
A detailed status of the command execution. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Monitor Commands (Linux) or Monitor Commands (Windows). StatusDetails can be one of the following values:
Pending – The command has not been sent to any instances.
In Progress – The command has been sent to at least one instance but has not reached a final state on all instances.
Success – The command successfully executed on all invocations. This is a terminal state.
Delivery Timed Out – The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
Execution Timed Out – The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
Failed – The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
Incomplete – The command was attempted on all instances and one or more invocations does not have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
Canceled – The command was terminated before it was completed. This is a terminal state.
Rate Exceeded – The number of instances targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before executing it on any instance. This is a terminal state.
OutputS3Region (string) --
The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.
OutputS3BucketName (string) --
The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
OutputS3KeyPrefix (string) --
The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
MaxConcurrency (string) --
The maximum number of instances that are allowed to execute the command at the same time. You can specify a number of instances, such as 10, or a percentage of instances, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
MaxErrors (string) --
The maximum number of errors allowed before the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
TargetCount (integer) --
The number of targets for the command.
CompletedCount (integer) --
The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Canceled, Terminated, or Undeliverable.
ErrorCount (integer) --
The number of targets for which the status is Failed or Execution Timed Out.
ServiceRole (string) --
The IAM service role that Run Command uses to act on your behalf when sending notifications about command status changes.
NotificationConfig (dict) --
Configurations for sending notifications about command status changes.
NotificationArn (string) --
An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
NotificationEvents (list) --
The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Monitoring Commands in the *Amazon Elastic Compute Cloud User Guide *.
(string) --
NotificationType (string) --
Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
{'AssociationDescription': {'AssociationId': 'string', 'DocumentVersion': 'string', 'LastExecutionDate': 'timestamp', 'LastSuccessfulExecutionDate': 'timestamp', 'LastUpdateAssociationDate': 'timestamp', 'OutputLocation': {'S3Location': {'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string', 'OutputS3Region': 'string'}}, 'Overview': {'AssociationStatusAggregatedCount': {'string': 'integer'}, 'DetailedStatus': 'string', 'Status': 'string'}, 'ScheduleExpression': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}}
Updates the status of the SSM document associated with the specified instance.
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 ID of the instance.
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', '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', '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) } }
Response Structure
(dict) --
AssociationDescription (dict) --
Information about the association.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The ID of the instance.
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 instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The instances targeted by the request.
(dict) --
An array of search criteria that targets instances using a Key; Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --
User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or name:<Amazon EC2 instance ID>. For example, tag:ServerRole or name:0123456789012345. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
Values (list) --
User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send commands that target instances using Key; Value parameters, see Executing a Command Using Amazon EC2 Run Command (Linux) or Executing a Command Using Amazon EC2 Run Command (Windows).
(string) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon 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.