AWS Systems Manager Incident Manager

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.

CreateResponsePlan (updated) Link ¶
Changes (request)
{'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'
    }
)
type actions

list

param actions

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.

type chatChannel

dict

param chatChannel

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.

type clientToken

string

param clientToken

A token ensuring that the operation is called only once with the specified details.

This field is autopopulated if not provided.

type displayName

string

param displayName

The long format of the response plan name. This field can contain spaces.

type engagements

list

param engagements

The contacts and escalation plans that the response plan engages during an incident.

  • (string) --

type incidentTemplate

dict

param incidentTemplate

[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.

type name

string

param name

[REQUIRED]

The short format name of the response plan. Can't include spaces.

type tags

dict

param tags

A list of tags that you are adding to the response plan.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'arn': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the response plan.

GetResponsePlan (updated) Link ¶
Changes (response)
{'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'
)
type arn

string

param arn

[REQUIRED]

The Amazon Resource Name (ARN) of the response plan.

rtype

dict

returns

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.

ListRelatedItems (updated) Link ¶
Changes (response)
{'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'
)
type incidentRecordArn

string

param incidentRecordArn

[REQUIRED]

The Amazon Resource Name (ARN) of the incident record containing the listed related items.

type maxResults

integer

param maxResults

The maximum number of related items per page.

type nextToken

string

param nextToken

The pagination token to continue to the next page of results.

rtype

dict

returns

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.

StartIncident (updated) Link ¶
Changes (request)
{'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'
    }
)
type clientToken

string

param clientToken

A token ensuring that the operation is called only once with the specified details.

This field is autopopulated if not provided.

type impact

integer

param impact

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.

type relatedItems

list

param relatedItems

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.

type responsePlanArn

string

param responsePlanArn

[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.

type title

string

param title

Provide a title for the incident. Providing a title overwrites the title provided by the response plan.

type triggerDetails

dict

param triggerDetails

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.

rtype

dict

returns

Response Syntax

{
    'incidentRecordArn': 'string'
}

Response Structure

  • (dict) --

    • incidentRecordArn (string) --

      The ARN of the newly created incident record.

UpdateRelatedItems (updated) Link ¶
Changes (request)
{'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'
            }
        }
    }
)
type clientToken

string

param clientToken

A token ensuring that the operation is called only once with the specified details.

This field is autopopulated if not provided.

type incidentRecordArn

string

param incidentRecordArn

[REQUIRED]

The Amazon Resource Name (ARN) of the incident record containing the related items you are updating.

type relatedItemsUpdate

dict

param relatedItemsUpdate

[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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateResponsePlan (updated) Link ¶
Changes (request)
{'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'
)
type actions

list

param actions

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.

type arn

string

param arn

[REQUIRED]

The Amazon Resource Name (ARN) of the response plan.

type chatChannel

dict

param chatChannel

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.

type clientToken

string

param clientToken

A token ensuring that the operation is called only once with the specified details.

This field is autopopulated if not provided.

type displayName

string

param displayName

The long format name of the response plan. The display name can't contain spaces.

type engagements

list

param engagements

The contacts and escalation plans that Incident Manager engages at the start of the incident.

  • (string) --

type incidentTemplateDedupeString

string

param incidentTemplateDedupeString

The string Incident Manager uses to prevent duplicate incidents from being created by the same incident in the same account.

type incidentTemplateImpact

integer

param incidentTemplateImpact

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

type incidentTemplateNotificationTargets

list

param incidentTemplateNotificationTargets

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.

type incidentTemplateSummary

string

param incidentTemplateSummary

A brief summary of the incident. This typically contains what has happened, what's currently happening, and next steps.

type incidentTemplateTitle

string

param incidentTemplateTitle

The short format name of the incident. The title can't contain spaces.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --