AWS Systems Manager Incident Manager

2022/10/13 - AWS Systems Manager Incident Manager - 3 updated api methods

Changes  Update RelatedItem enum to support Tasks

ListRelatedItems (updated) Link ¶
Changes (response)
{'relatedItems': {'identifier': {'type': {'TASK'}}}}

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'|'TASK',
                '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': {'TASK'}}}}

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'|'TASK',
                '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': {'TASK'}}},
                        'itemToRemove': {'type': {'TASK'}}}}

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'|'TASK',
                'value': {
                    'arn': 'string',
                    'metricDefinition': 'string',
                    'url': 'string'
                }
            },
            'title': 'string'
        },
        'itemToRemove': {
            'type': 'ANALYSIS'|'INCIDENT'|'METRIC'|'PARENT'|'ATTACHMENT'|'OTHER'|'AUTOMATION'|'INVOLVED_RESOURCE'|'TASK',
            '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) --