2019/06/06 - Amazon Simple Systems Manager (SSM) - 5 new3 updated api methods
Changes Update ssm client to latest version
Get information about an OpsItem by using the ID. You must have permission in AWS Identity and Access Management (IAM) to view information about an OpsItem. For more information, see Getting Started with OpsItems in the AWS Systems Manager User Guide.
Operations engineers and IT professionals use the Systems Manager OpsItems capability to view, investigate, and remediate operational issues impacting the performance and health of their AWS resources. For more information, see AWS Systems Manager OpsItems in the AWS Systems Manager User Guide.
See also: AWS API Documentation
Request Syntax
client.get_ops_item( OpsItemId='string' )
string
[REQUIRED]
The ID of the OpsItem that you want to get.
dict
Response Syntax
{ 'OpsItem': { 'CreatedBy': 'string', 'CreatedTime': datetime(2015, 1, 1), 'Description': 'string', 'LastModifiedBy': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'Notifications': [ { 'Arn': 'string' }, ], 'Priority': 123, 'RelatedOpsItems': [ { 'OpsItemId': 'string' }, ], 'Status': 'Open'|'InProgress'|'Resolved', 'OpsItemId': 'string', 'Version': 'string', 'Title': 'string', 'Source': 'string', 'OperationalData': { 'string': { 'Value': 'string', 'Type': 'SearchableString'|'String' } } } }
Response Structure
(dict) --
OpsItem (dict) --
The OpsItem.
CreatedBy (string) --
The ARN of the AWS account that created the OpsItem.
CreatedTime (datetime) --
The date and time the OpsItem was created.
Description (string) --
The OpsItem description.
LastModifiedBy (string) --
The ARN of the AWS account that last updated the OpsItem.
LastModifiedTime (datetime) --
The date and time the OpsItem was last updated.
Notifications (list) --
The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.
(dict) --
A notification about the OpsItem.
Arn (string) --
The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.
Priority (integer) --
The importance of this OpsItem in relation to other OpsItems in the system.
RelatedOpsItems (list) --
One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
(dict) --
An OpsItems that shares something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
OpsItemId (string) --
The ID of an OpsItem related to the current OpsItem.
Status (string) --
The OpsItem status. Status can be Open, In Progress, or Resolved. For more information, see Editing OpsItem Details in the AWS Systems Manager User Guide.
OpsItemId (string) --
The ID of the OpsItem.
Version (string) --
The version of this OpsItem. Each time the OpsItem is edited the version number increments by one.
Title (string) --
A short heading that describes the nature of the OpsItem and the impacted resource.
Source (string) --
The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. The impacted resource is a subset of source.
OperationalData (dict) --
Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.
This custom data is searchable, but with restrictions. For the Searchable operational data feature, all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API action) can view and search on the specified data. For the Private operational data feature, the data is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API action).
(string) --
(dict) --
An object that defines the value of the key and its type in the OperationalData map.
Value (string) --
The value of the OperationalData key.
Type (string) --
The type of key-value pair. Valid types include SearchableString and String.
Edit or change an OpsItem. You must have permission in AWS Identity and Access Management (IAM) to update an OpsItem. For more information, see Getting Started with OpsItems in the AWS Systems Manager User Guide.
Operations engineers and IT professionals use the Systems Manager OpsItems capability to view, investigate, and remediate operational issues impacting the performance and health of their AWS resources. For more information, see AWS Systems Manager OpsItems in the AWS Systems Manager User Guide.
See also: AWS API Documentation
Request Syntax
client.update_ops_item( Description='string', OperationalData={ 'string': { 'Value': 'string', 'Type': 'SearchableString'|'String' } }, OperationalDataToDelete=[ 'string', ], Notifications=[ { 'Arn': 'string' }, ], Priority=123, RelatedOpsItems=[ { 'OpsItemId': 'string' }, ], Status='Open'|'InProgress'|'Resolved', OpsItemId='string', Title='string' )
string
Update the information about the OpsItem. Provide enough information so that users reading this OpsItem for the first time understand the issue.
dict
Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem object.
Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.
This custom data is searchable, but with restrictions. For the Searchable operational data feature, all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API action) can view and search on the specified data. For the Private operational data feature, the data is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API action).
(string) --
(dict) --
An object that defines the value of the key and its type in the OperationalData map.
Value (string) --
The value of the OperationalData key.
Type (string) --
The type of key-value pair. Valid types include SearchableString and String.
list
Keys that you want to remove from the OperationalData map.
(string) --
list
The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.
(dict) --
A notification about the OpsItem.
Arn (string) --
The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.
integer
The importance of this OpsItem in relation to other OpsItems in the system.
list
One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
(dict) --
An OpsItems that shares something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
OpsItemId (string) -- [REQUIRED]
The ID of an OpsItem related to the current OpsItem.
string
The OpsItem status. Status can be Open, In Progress, or Resolved. For more information, see Editing OpsItem Details in the AWS Systems Manager User Guide.
string
[REQUIRED]
The ID of the OpsItem.
string
A short heading that describes the nature of the OpsItem and the impacted resource.
dict
Response Syntax
{}
Response Structure
(dict) --
Query a set of OpsItems. You must have permission in AWS Identity and Access Management (IAM) to query a list of OpsItems. For more information, see Getting Started with OpsItems in the AWS Systems Manager User Guide.
Operations engineers and IT professionals use the Systems Manager OpsItems capability to view, investigate, and remediate operational issues impacting the performance and health of their AWS resources. For more information, see AWS Systems Manager OpsItems in the AWS Systems Manager User Guide.
See also: AWS API Documentation
Request Syntax
client.describe_ops_items( OpsItemFilters=[ { 'Key': 'Status'|'CreatedBy'|'Source'|'Priority'|'Title'|'OpsItemId'|'CreatedTime'|'LastModifiedTime'|'OperationalData'|'OperationalDataKey'|'OperationalDataValue'|'ResourceId'|'AutomationId', 'Values': [ 'string', ], 'Operator': 'Equal'|'Contains'|'GreaterThan'|'LessThan' }, ], MaxResults=123, NextToken='string' )
list
One or more filters to limit the reponse.
Key: CreatedTime Operations: GreaterThan, LessThan
Key: LastModifiedBy Operations: Contains, Equals
Key: LastModifiedTime Operations: GreaterThan, LessThan
Key: Priority Operations: Equals
Key: Source Operations: Contains, Equals
Key: Status Operations: Equals
Key: Title Operations: Contains
Key: OperationalData Operations: Equals
Key: OperationalDataKey Operations: Equals
Key: OperationalDataValue Operations: Equals, Contains
Key: OpsItemId Operations: Equals
Key: ResourceId Operations: Contains
Key: AutomationId Operations: Equals
(dict) --
Describes an OpsCenter filter.
Key (string) -- [REQUIRED]
The name of the filter.
Values (list) -- [REQUIRED]
The filter value.
(string) --
Operator (string) -- [REQUIRED]
The operator used by the filter 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.
string
A token to start the list. Use this token to get the next set of results.
dict
Response Syntax
{ 'NextToken': 'string', 'OpsItemSummaries': [ { 'CreatedBy': 'string', 'CreatedTime': datetime(2015, 1, 1), 'LastModifiedBy': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'Priority': 123, 'Source': 'string', 'Status': 'Open'|'InProgress'|'Resolved', 'OpsItemId': 'string', 'Title': 'string', 'OperationalData': { 'string': { 'Value': 'string', 'Type': 'SearchableString'|'String' } } }, ] }
Response Structure
(dict) --
NextToken (string) --
The token for the next set of items to return. Use this token to get the next set of results.
OpsItemSummaries (list) --
A list of OpsItems.
(dict) --
A count of OpsItems.
CreatedBy (string) --
The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem.
CreatedTime (datetime) --
The date and time the OpsItem was created.
LastModifiedBy (string) --
The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem.
LastModifiedTime (datetime) --
The date and time the OpsItem was last updated.
Priority (integer) --
The importance of this OpsItem in relation to other OpsItems in the system.
Source (string) --
The impacted AWS resource.
Status (string) --
The OpsItem status. Status can be Open, In Progress, or Resolved.
OpsItemId (string) --
The ID of the OpsItem.
Title (string) --
A short heading that describes the nature of the OpsItem and the impacted resource.
OperationalData (dict) --
Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.
This custom data is searchable, but with restrictions. For the Searchable operational data feature, all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API action) can view and search on the specified data. For the Private operational data feature, the data is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API action).
(string) --
(dict) --
An object that defines the value of the key and its type in the OperationalData map.
Value (string) --
The value of the OperationalData key.
Type (string) --
The type of key-value pair. Valid types include SearchableString and String.
View a summary of OpsItems based on specified filters and aggregators.
See also: AWS API Documentation
Request Syntax
client.get_ops_summary( Filters=[ { 'Key': 'string', 'Values': [ 'string', ], 'Type': 'Equal'|'NotEqual'|'BeginWith'|'LessThan'|'GreaterThan'|'Exists' }, ], Aggregators=[ { 'AggregatorType': 'string', 'TypeName': 'string', 'AttributeName': 'string', 'Values': { 'string': 'string' }, 'Filters': [ { 'Key': 'string', 'Values': [ 'string', ], 'Type': 'Equal'|'NotEqual'|'BeginWith'|'LessThan'|'GreaterThan'|'Exists' }, ], 'Aggregators': {'... recursive ...'} }, ], NextToken='string', MaxResults=123 )
list
Optional filters used to scope down the returned OpsItems.
(dict) --
A filter for viewing OpsItem summaries.
Key (string) -- [REQUIRED]
The name of the filter.
Values (list) -- [REQUIRED]
The filter value.
(string) --
Type (string) --
The type of filter.
list
[REQUIRED]
Optional aggregators that return counts of OpsItems based on one or more expressions.
(dict) --
One or more aggregators for viewing counts of OpsItems using different dimensions such as Source, CreatedTime, or Source and CreatedTime, to name a few.
AggregatorType (string) --
Either a Range or Count aggregator for limiting an OpsItem summary.
TypeName (string) --
The data type name to use for viewing counts of OpsItems.
AttributeName (string) --
The name of an OpsItem attribute on which to limit the count of OpsItems.
Values (dict) --
The aggregator value.
(string) --
(string) --
Filters (list) --
The aggregator filters.
(dict) --
A filter for viewing OpsItem summaries.
Key (string) -- [REQUIRED]
The name of the filter.
Values (list) -- [REQUIRED]
The filter value.
(string) --
Type (string) --
The type of filter.
Aggregators (list) --
A nested aggregator for viewing counts of OpsItems.
string
A token to start the list. Use this token to get the next set of results.
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': { 'Content': [ { 'string': 'string' }, ] } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Entities (list) --
The list of aggregated and filtered OpsItems.
(dict) --
The result of the query.
Id (string) --
The query ID.
Data (dict) --
The data returned by the query.
(string) --
(dict) --
The OpsItem summaries result item.
Content (list) --
The detailed data content for an OpsItem summaries result item.
(dict) --
(string) --
(string) --
NextToken (string) --
The token for the next set of items to return. Use this token to get the next set of results.
Creates a new OpsItem. You must have permission in AWS Identity and Access Management (IAM) to create a new OpsItem. For more information, see Getting Started with OpsItems in the AWS Systems Manager User Guide.
Operations engineers and IT professionals use the Systems Manager OpsItems capability to view, investigate, and remediate operational issues impacting the performance and health of their AWS resources. For more information, see AWS Systems Manager OpsItems in the AWS Systems Manager User Guide.
See also: AWS API Documentation
Request Syntax
client.create_ops_item( Description='string', OperationalData={ 'string': { 'Value': 'string', 'Type': 'SearchableString'|'String' } }, Notifications=[ { 'Arn': 'string' }, ], Priority=123, RelatedOpsItems=[ { 'OpsItemId': 'string' }, ], Source='string', Title='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
Information about the OpsItem.
dict
Operational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB.
This custom data is searchable, but with restrictions. For the Searchable operational data feature, all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API action) can view and search on the specified data. For the Private operational data feature, the data is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API action).
(string) --
(dict) --
An object that defines the value of the key and its type in the OperationalData map.
Value (string) --
The value of the OperationalData key.
Type (string) --
The type of key-value pair. Valid types include SearchableString and String.
list
The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.
(dict) --
A notification about the OpsItem.
Arn (string) --
The Amazon Resource Name (ARN) of an SNS topic where notifications are sent when this OpsItem is edited or changed.
integer
The importance of this OpsItem in relation to other OpsItems in the system.
list
One or more OpsItems that share something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
(dict) --
An OpsItems that shares something in common with the current OpsItems. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
OpsItemId (string) -- [REQUIRED]
The ID of an OpsItem related to the current OpsItem.
string
[REQUIRED]
The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager.
string
[REQUIRED]
A short heading that describes the nature of the OpsItem and the impacted resource.
list
Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsItem to identify the AWS resource or the type of issue. In this case, you could specify the following key name/value pairs:
Key=source,Value=EC2-instance
Key=status,Value=stopped
(dict) --
Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, maintenance windows, Parameter Store parameters, and patch baselines.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
Response Syntax
{ 'OpsItemId': 'string' }
Response Structure
(dict) --
OpsItemId (string) --
The ID of the OpsItem.
{'ResourceType': {'OpsItem'}}
Adds or overwrites one or more tags for the specified resource. Tags are metadata that you can assign to your documents, managed instances, maintenance windows, Parameter Store parameters, and patch baselines. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define. 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 50 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='Document'|'ManagedInstance'|'MaintenanceWindow'|'Parameter'|'PatchBaseline'|'OpsItem', 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.
Use the ID of the resource. Here are some examples:
ManagedInstance: mi-012345abcde
MaintenanceWindow: mw-012345abcde
PatchBaseline: pb-012345abcde
For the Document and Parameter values, use the name of the resource.
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 AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, maintenance windows, Parameter Store parameters, and patch baselines.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
Response Syntax
{}
Response Structure
(dict) --
{'ResourceType': {'OpsItem'}}
Returns a list of the tags assigned to the specified resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ResourceType='Document'|'ManagedInstance'|'MaintenanceWindow'|'Parameter'|'PatchBaseline'|'OpsItem', 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 AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, maintenance windows, Parameter Store parameters, and patch baselines.
Key (string) --
The name of the tag.
Value (string) --
The value of the tag.
{'ResourceType': {'OpsItem'}}
Removes all tags from the specified resource.
See also: AWS API Documentation
Request Syntax
client.remove_tags_from_resource( ResourceType='Document'|'ManagedInstance'|'MaintenanceWindow'|'Parameter'|'PatchBaseline'|'OpsItem', 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. Use the ID of the resource. Here are some examples:
ManagedInstance: mi-012345abcde
MaintenanceWindow: mw-012345abcde
PatchBaseline: pb-012345abcde
For the Document and Parameter values, use the name of the resource.
list
[REQUIRED]
Tag keys that you want to remove from the specified resource.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --