2022/05/12 - AWS Systems Manager Incident Manager - 6 updated api methods
Changes Adding support for dynamic SSM Runbook parameter values. Updating validation pattern for engagements. Adding ConflictException to UpdateReplicationSet API contract.
{'actions': {'ssmAutomation': {'dynamicParameters': {'string': {'variable': 'INCIDENT_RECORD_ARN ' '| ' 'INVOLVED_RESOURCES'}}}}}
Creates a response plan that automates the initial response to incidents. A response plan engages contacts, starts chat channel collaboration, and initiates runbooks at the beginning of an incident.
See also: AWS API Documentation
Request Syntax
client.create_response_plan( actions=[ { 'ssmAutomation': { 'documentName': 'string', 'documentVersion': 'string', 'dynamicParameters': { 'string': { 'variable': 'INCIDENT_RECORD_ARN'|'INVOLVED_RESOURCES' } }, 'parameters': { 'string': [ 'string', ] }, 'roleArn': 'string', 'targetAccount': 'RESPONSE_PLAN_OWNER_ACCOUNT'|'IMPACTED_ACCOUNT' } }, ], chatChannel={ 'chatbotSns': [ 'string', ], 'empty': {} }, clientToken='string', displayName='string', engagements=[ 'string', ], incidentTemplate={ 'dedupeString': 'string', 'impact': 123, 'notificationTargets': [ { 'snsTopicArn': 'string' }, ], 'summary': 'string', 'title': 'string' }, name='string', tags={ 'string': 'string' } )
list
The actions that the response plan starts at the beginning of an incident.
(dict) --
The action that starts at the beginning of an incident. The response plan defines the action.
ssmAutomation (dict) --
The Systems Manager automation document to start as the runbook at the beginning of the incident.
documentName (string) -- [REQUIRED]
The automation document's name.
documentVersion (string) --
The automation document's version to use when running.
dynamicParameters (dict) --
The key-value pair to resolve dynamic parameter values when processing a Systems Manager Automation runbook.
(string) --
(dict) --
The dynamic SSM parameter value.
variable (string) --
Variable dynamic parameters. A parameter value is determined when an incident is created.
parameters (dict) --
The key-value pair parameters to use when running the automation document.
(string) --
(list) --
(string) --
roleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the role that the automation document will assume when running commands.
targetAccount (string) --
The account that the automation document will be run in. This can be in either the management account or an application account.
dict
The Chatbot chat channel used for collaboration during an incident.
chatbotSns (list) --
The Amazon SNS targets that Chatbot uses to notify the chat channel of updates to an incident. You can also make updates to the incident through the chat channel by using the Amazon SNS topics.
(string) --
empty (dict) --
Used to remove the chat channel from an incident record or response plan.
string
A token ensuring that the operation is called only once with the specified details.
This field is autopopulated if not provided.
string
The long format of the response plan name. This field can contain spaces.
list
The contacts and escalation plans that the response plan engages during an incident.
(string) --
dict
[REQUIRED]
Details used to create an incident when using this response plan.
dedupeString (string) --
Used to stop Incident Manager from creating multiple incident records for the same incident.
impact (integer) -- [REQUIRED]
The impact of the incident on your customers and applications.
notificationTargets (list) --
The Amazon SNS targets that are notified when updates are made to an incident.
(dict) --
The SNS targets that are notified when updates are made to an incident.
snsTopicArn (string) --
The Amazon Resource Name (ARN) of the SNS topic.
summary (string) --
The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, and context.
title (string) -- [REQUIRED]
The title of the incident.
string
[REQUIRED]
The short format name of the response plan. Can't include spaces.
dict
A list of tags that you are adding to the response plan.
(string) --
(string) --
dict
Response Syntax
{ 'arn': 'string' }
Response Structure
(dict) --
arn (string) --
The Amazon Resource Name (ARN) of the response plan.
{'actions': {'ssmAutomation': {'dynamicParameters': {'string': {'variable': 'INCIDENT_RECORD_ARN ' '| ' 'INVOLVED_RESOURCES'}}}}}
Retrieves the details of the specified response plan.
See also: AWS API Documentation
Request Syntax
client.get_response_plan( arn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the response plan.
dict
Response Syntax
{ 'actions': [ { 'ssmAutomation': { 'documentName': 'string', 'documentVersion': 'string', 'dynamicParameters': { 'string': { 'variable': 'INCIDENT_RECORD_ARN'|'INVOLVED_RESOURCES' } }, 'parameters': { 'string': [ 'string', ] }, 'roleArn': 'string', 'targetAccount': 'RESPONSE_PLAN_OWNER_ACCOUNT'|'IMPACTED_ACCOUNT' } }, ], 'arn': 'string', 'chatChannel': { 'chatbotSns': [ 'string', ], 'empty': {} }, 'displayName': 'string', 'engagements': [ 'string', ], 'incidentTemplate': { 'dedupeString': 'string', 'impact': 123, 'notificationTargets': [ { 'snsTopicArn': 'string' }, ], 'summary': 'string', 'title': 'string' }, 'name': 'string' }
Response Structure
(dict) --
actions (list) --
The actions that this response plan takes at the beginning of the incident.
(dict) --
The action that starts at the beginning of an incident. The response plan defines the action.
ssmAutomation (dict) --
The Systems Manager automation document to start as the runbook at the beginning of the incident.
documentName (string) --
The automation document's name.
documentVersion (string) --
The automation document's version to use when running.
dynamicParameters (dict) --
The key-value pair to resolve dynamic parameter values when processing a Systems Manager Automation runbook.
(string) --
(dict) --
The dynamic SSM parameter value.
variable (string) --
Variable dynamic parameters. A parameter value is determined when an incident is created.
parameters (dict) --
The key-value pair parameters to use when running the automation document.
(string) --
(list) --
(string) --
roleArn (string) --
The Amazon Resource Name (ARN) of the role that the automation document will assume when running commands.
targetAccount (string) --
The account that the automation document will be run in. This can be in either the management account or an application account.
arn (string) --
The ARN of the response plan.
chatChannel (dict) --
The Chatbot chat channel used for collaboration during an incident.
chatbotSns (list) --
The Amazon SNS targets that Chatbot uses to notify the chat channel of updates to an incident. You can also make updates to the incident through the chat channel by using the Amazon SNS topics.
(string) --
empty (dict) --
Used to remove the chat channel from an incident record or response plan.
displayName (string) --
The long format name of the response plan. Can contain spaces.
engagements (list) --
The contacts and escalation plans that the response plan engages during an incident.
(string) --
incidentTemplate (dict) --
Details used to create the incident when using this response plan.
dedupeString (string) --
Used to stop Incident Manager from creating multiple incident records for the same incident.
impact (integer) --
The impact of the incident on your customers and applications.
notificationTargets (list) --
The Amazon SNS targets that are notified when updates are made to an incident.
(dict) --
The SNS targets that are notified when updates are made to an incident.
snsTopicArn (string) --
The Amazon Resource Name (ARN) of the SNS topic.
summary (string) --
The summary of the incident. The summary is a brief synopsis of what occurred, what's currently happening, and context.
title (string) --
The title of the incident.
name (string) --
The short format name of the response plan. The name can't contain spaces.
{'relatedItems': {'identifier': {'type': {'INVOLVED_RESOURCE'}}}}
List all related items for an incident record.
See also: AWS API Documentation
Request Syntax
client.list_related_items( incidentRecordArn='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the incident record containing the listed related items.
integer
The maximum number of related items per page.
string
The pagination token to continue to the next page of results.
dict
Response Syntax
{ 'nextToken': 'string', 'relatedItems': [ { 'identifier': { 'type': 'ANALYSIS'|'INCIDENT'|'METRIC'|'PARENT'|'ATTACHMENT'|'OTHER'|'AUTOMATION'|'INVOLVED_RESOURCE', 'value': { 'arn': 'string', 'metricDefinition': 'string', 'url': 'string' } }, 'title': 'string' }, ] }
Response Structure
(dict) --
nextToken (string) --
The pagination token to continue to the next page of results.
relatedItems (list) --
Details about each related item.
(dict) --
Resources that responders use to triage and mitigate the incident.
identifier (dict) --
Details about the related item.
type (string) --
The type of related item.
value (dict) --
Details about the related item.
arn (string) --
The Amazon Resource Name (ARN) of the related item, if the related item is an Amazon resource.
metricDefinition (string) --
The metric definition, if the related item is a metric in Amazon CloudWatch.
url (string) --
The URL, if the related item is a non-Amazon Web Services resource.
title (string) --
The title of the related item.
{'relatedItems': {'identifier': {'type': {'INVOLVED_RESOURCE'}}}}
Used to start an incident from CloudWatch alarms, EventBridge events, or manually.
See also: AWS API Documentation
Request Syntax
client.start_incident( clientToken='string', impact=123, relatedItems=[ { 'identifier': { 'type': 'ANALYSIS'|'INCIDENT'|'METRIC'|'PARENT'|'ATTACHMENT'|'OTHER'|'AUTOMATION'|'INVOLVED_RESOURCE', 'value': { 'arn': 'string', 'metricDefinition': 'string', 'url': 'string' } }, 'title': 'string' }, ], responsePlanArn='string', title='string', triggerDetails={ 'rawData': 'string', 'source': 'string', 'timestamp': datetime(2015, 1, 1), 'triggerArn': 'string' } )
string
A token ensuring that the operation is called only once with the specified details.
This field is autopopulated if not provided.
integer
Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.
Possible impacts:
1 - Critical impact, this typically relates to full application failure that impacts many to all customers.
2 - High impact, partial application failure with impact to many customers.
3 - Medium impact, the application is providing reduced service to customers.
4 - Low impact, customer might aren't impacted by the problem yet.
5 - No impact, customers aren't currently impacted but urgent action is needed to avoid impact.
list
Add related items to the incident for other responders to use. Related items are AWS resources, external links, or files uploaded to an Amazon S3 bucket.
(dict) --
Resources that responders use to triage and mitigate the incident.
identifier (dict) -- [REQUIRED]
Details about the related item.
type (string) -- [REQUIRED]
The type of related item.
value (dict) -- [REQUIRED]
Details about the related item.
arn (string) --
The Amazon Resource Name (ARN) of the related item, if the related item is an Amazon resource.
metricDefinition (string) --
The metric definition, if the related item is a metric in Amazon CloudWatch.
url (string) --
The URL, if the related item is a non-Amazon Web Services resource.
title (string) --
The title of the related item.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics, runbooks, title, and impact of the incident.
string
Provide a title for the incident. Providing a title overwrites the title provided by the response plan.
dict
Details of what created the incident record in Incident Manager.
rawData (string) --
Raw data passed from either Amazon EventBridge, Amazon CloudWatch, or Incident Manager when an incident is created.
source (string) -- [REQUIRED]
Identifies the service that sourced the event. All events sourced from within Amazon Web Services begin with " aws." Customer-generated events can have any value here, as long as it doesn't begin with " aws." We recommend the use of Java package-name style reverse domain-name strings.
timestamp (datetime) -- [REQUIRED]
The time that the incident was detected.
triggerArn (string) --
The Amazon Resource Name (ARN) of the source that detected the incident.
dict
Response Syntax
{ 'incidentRecordArn': 'string' }
Response Structure
(dict) --
incidentRecordArn (string) --
The ARN of the newly created incident record.
{'relatedItemsUpdate': {'itemToAdd': {'identifier': {'type': {'INVOLVED_RESOURCE'}}}, 'itemToRemove': {'type': {'INVOLVED_RESOURCE'}}}}
Add or remove related items from the related items tab of an incident record.
See also: AWS API Documentation
Request Syntax
client.update_related_items( clientToken='string', incidentRecordArn='string', relatedItemsUpdate={ 'itemToAdd': { 'identifier': { 'type': 'ANALYSIS'|'INCIDENT'|'METRIC'|'PARENT'|'ATTACHMENT'|'OTHER'|'AUTOMATION'|'INVOLVED_RESOURCE', 'value': { 'arn': 'string', 'metricDefinition': 'string', 'url': 'string' } }, 'title': 'string' }, 'itemToRemove': { 'type': 'ANALYSIS'|'INCIDENT'|'METRIC'|'PARENT'|'ATTACHMENT'|'OTHER'|'AUTOMATION'|'INVOLVED_RESOURCE', 'value': { 'arn': 'string', 'metricDefinition': 'string', 'url': 'string' } } } )
string
A token ensuring that the operation is called only once with the specified details.
This field is autopopulated if not provided.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the incident record containing the related items you are updating.
dict
[REQUIRED]
Details about the item you are adding or deleting.
itemToAdd (dict) --
Details about the related item you're adding.
identifier (dict) -- [REQUIRED]
Details about the related item.
type (string) -- [REQUIRED]
The type of related item.
value (dict) -- [REQUIRED]
Details about the related item.
arn (string) --
The Amazon Resource Name (ARN) of the related item, if the related item is an Amazon resource.
metricDefinition (string) --
The metric definition, if the related item is a metric in Amazon CloudWatch.
url (string) --
The URL, if the related item is a non-Amazon Web Services resource.
title (string) --
The title of the related item.
itemToRemove (dict) --
Details about the related item you're deleting.
type (string) -- [REQUIRED]
The type of related item.
value (dict) -- [REQUIRED]
Details about the related item.
arn (string) --
The Amazon Resource Name (ARN) of the related item, if the related item is an Amazon resource.
metricDefinition (string) --
The metric definition, if the related item is a metric in Amazon CloudWatch.
url (string) --
The URL, if the related item is a non-Amazon Web Services resource.
dict
Response Syntax
{}
Response Structure
(dict) --
{'actions': {'ssmAutomation': {'dynamicParameters': {'string': {'variable': 'INCIDENT_RECORD_ARN ' '| ' 'INVOLVED_RESOURCES'}}}}}
Updates the specified response plan.
See also: AWS API Documentation
Request Syntax
client.update_response_plan( actions=[ { 'ssmAutomation': { 'documentName': 'string', 'documentVersion': 'string', 'dynamicParameters': { 'string': { 'variable': 'INCIDENT_RECORD_ARN'|'INVOLVED_RESOURCES' } }, 'parameters': { 'string': [ 'string', ] }, 'roleArn': 'string', 'targetAccount': 'RESPONSE_PLAN_OWNER_ACCOUNT'|'IMPACTED_ACCOUNT' } }, ], arn='string', chatChannel={ 'chatbotSns': [ 'string', ], 'empty': {} }, clientToken='string', displayName='string', engagements=[ 'string', ], incidentTemplateDedupeString='string', incidentTemplateImpact=123, incidentTemplateNotificationTargets=[ { 'snsTopicArn': 'string' }, ], incidentTemplateSummary='string', incidentTemplateTitle='string' )
list
The actions that this response plan takes at the beginning of an incident.
(dict) --
The action that starts at the beginning of an incident. The response plan defines the action.
ssmAutomation (dict) --
The Systems Manager automation document to start as the runbook at the beginning of the incident.
documentName (string) -- [REQUIRED]
The automation document's name.
documentVersion (string) --
The automation document's version to use when running.
dynamicParameters (dict) --
The key-value pair to resolve dynamic parameter values when processing a Systems Manager Automation runbook.
(string) --
(dict) --
The dynamic SSM parameter value.
variable (string) --
Variable dynamic parameters. A parameter value is determined when an incident is created.
parameters (dict) --
The key-value pair parameters to use when running the automation document.
(string) --
(list) --
(string) --
roleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the role that the automation document will assume when running commands.
targetAccount (string) --
The account that the automation document will be run in. This can be in either the management account or an application account.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the response plan.
dict
The Chatbot chat channel used for collaboration during an incident.
Use the empty structure to remove the chat channel from the response plan.
chatbotSns (list) --
The Amazon SNS targets that Chatbot uses to notify the chat channel of updates to an incident. You can also make updates to the incident through the chat channel by using the Amazon SNS topics.
(string) --
empty (dict) --
Used to remove the chat channel from an incident record or response plan.
string
A token ensuring that the operation is called only once with the specified details.
This field is autopopulated if not provided.
string
The long format name of the response plan. The display name can't contain spaces.
list
The contacts and escalation plans that Incident Manager engages at the start of the incident.
(string) --
string
The string Incident Manager uses to prevent duplicate incidents from being created by the same incident in the same account.
integer
Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.
Possible impacts:
5 - Severe impact
4 - High impact
3 - Medium impact
2 - Low impact
1 - No impact
list
The Amazon SNS targets that are notified when updates are made to an incident.
(dict) --
The SNS targets that are notified when updates are made to an incident.
snsTopicArn (string) --
The Amazon Resource Name (ARN) of the SNS topic.
string
A brief summary of the incident. This typically contains what has happened, what's currently happening, and next steps.
string
The short format name of the incident. The title can't contain spaces.
dict
Response Syntax
{}
Response Structure
(dict) --