AWS Systems Manager Incident Manager

2022/11/11 - AWS Systems Manager Incident Manager - 7 updated api methods

Changes  RelatedItems now have an ID field which can be used for referencing them else where. Introducing event references in TimelineEvent API and increasing maximum length of "eventData" to 12K characters.

CreateTimelineEvent (updated) Link ¶
Changes (request)
{'eventReferences': [{'relatedItemId': 'string', 'resource': 'string'}]}

Creates a custom timeline event on the incident details page of an incident record. Timeline events are automatically created by Incident Manager, marking key moment during an incident. You can create custom timeline events to mark important events that are automatically detected by Incident Manager.

See also: AWS API Documentation

Request Syntax

client.create_timeline_event(
    clientToken='string',
    eventData='string',
    eventReferences=[
        {
            'relatedItemId': 'string',
            'resource': 'string'
        },
    ],
    eventTime=datetime(2015, 1, 1),
    eventType='string',
    incidentRecordArn='string'
)
type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type eventData:

string

param eventData:

[REQUIRED]

A short description of the event.

type eventReferences:

list

param eventReferences:

Adds one or more references to the TimelineEvent. A reference can be an Amazon Web Services resource involved in the incident or in some way associated with it. When you specify a reference, you enter the Amazon Resource Name (ARN) of the resource. You can also specify a related item. As an example, you could specify the ARN of an Amazon DynamoDB (DynamoDB) table. The table for this example is the resource. You could also specify a Amazon CloudWatch metric for that table. The metric is the related item.

  • (dict) --

    An item referenced in a TimelineEvent that is involved in or somehow associated with an incident. You can specify an Amazon Resource Name (ARN) for an Amazon Web Services resource or a RelatedItem ID.

    • relatedItemId (string) --

      The ID of a RelatedItem referenced in a TimelineEvent.

    • resource (string) --

      The Amazon Resource Name (ARN) of an Amazon Web Services resource referenced in a TimelineEvent.

type eventTime:

datetime

param eventTime:

[REQUIRED]

The time that the event occurred.

type eventType:

string

param eventType:

[REQUIRED]

The type of the event. You can create timeline events of type Custom Event.

type incidentRecordArn:

string

param incidentRecordArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the incident record to which the event will be added.

rtype:

dict

returns:

Response Syntax

{
    'eventId': 'string',
    'incidentRecordArn': 'string'
}

Response Structure

  • (dict) --

    • eventId (string) --

      The ID of the event for easy reference later.

    • incidentRecordArn (string) --

      The ARN of the incident record that you added the event to.

GetTimelineEvent (updated) Link ¶
Changes (response)
{'event': {'eventReferences': [{'relatedItemId': 'string',
                                'resource': 'string'}]}}

Retrieves a timeline event based on its ID and incident record.

See also: AWS API Documentation

Request Syntax

client.get_timeline_event(
    eventId='string',
    incidentRecordArn='string'
)
type eventId:

string

param eventId:

[REQUIRED]

The ID of the event. You can get an event's ID when you create it, or by using ListTimelineEvents.

type incidentRecordArn:

string

param incidentRecordArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the incident that includes the timeline event.

rtype:

dict

returns:

Response Syntax

{
    'event': {
        'eventData': 'string',
        'eventId': 'string',
        'eventReferences': [
            {
                'relatedItemId': 'string',
                'resource': 'string'
            },
        ],
        'eventTime': datetime(2015, 1, 1),
        'eventType': 'string',
        'eventUpdatedTime': datetime(2015, 1, 1),
        'incidentRecordArn': 'string'
    }
}

Response Structure

  • (dict) --

    • event (dict) --

      Details about the timeline event.

      • eventData (string) --

        A short description of the event.

      • eventId (string) --

        The ID of the timeline event.

      • eventReferences (list) --

        A list of references in a TimelineEvent.

        • (dict) --

          An item referenced in a TimelineEvent that is involved in or somehow associated with an incident. You can specify an Amazon Resource Name (ARN) for an Amazon Web Services resource or a RelatedItem ID.

          • relatedItemId (string) --

            The ID of a RelatedItem referenced in a TimelineEvent.

          • resource (string) --

            The Amazon Resource Name (ARN) of an Amazon Web Services resource referenced in a TimelineEvent.

      • eventTime (datetime) --

        The time that the event occurred.

      • eventType (string) --

        The type of event that occurred. Currently Incident Manager supports only the Custom Event type.

      • eventUpdatedTime (datetime) --

        The time that the timeline event was last updated.

      • incidentRecordArn (string) --

        The Amazon Resource Name (ARN) of the incident that the event occurred during.

ListRelatedItems (updated) Link ¶
Changes (response)
{'relatedItems': {'generatedId': 'string'}}

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': [
        {
            'generatedId': 'string',
            '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.

        • generatedId (string) --

          A unique ID for a RelatedItem.

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

ListTimelineEvents (updated) Link ¶
Changes (response)
{'eventSummaries': {'eventReferences': [{'relatedItemId': 'string',
                                         'resource': 'string'}]}}

Lists timeline events for the specified incident record.

See also: AWS API Documentation

Request Syntax

client.list_timeline_events(
    filters=[
        {
            'condition': {
                'after': datetime(2015, 1, 1),
                'before': datetime(2015, 1, 1),
                'equals': {
                    'integerValues': [
                        123,
                    ],
                    'stringValues': [
                        'string',
                    ]
                }
            },
            'key': 'string'
        },
    ],
    incidentRecordArn='string',
    maxResults=123,
    nextToken='string',
    sortBy='EVENT_TIME',
    sortOrder='ASCENDING'|'DESCENDING'
)
type filters:

list

param filters:

Filters the timeline events based on the provided conditional values. You can filter timeline events using the following keys:

  • eventTime

  • eventType

Note the following when deciding how to use Filters:

  • If you don't specify a Filter, the response includes all timeline events.

  • If you specify more than one filter in a single request, the response returns timeline events that match all filters.

  • If you specify a filter with more than one value, the response returns timeline events that match any of the values provided.

  • (dict) --

    Filter the selection by using a condition.

    • condition (dict) -- [REQUIRED]

      The condition accepts before or after a specified time, equal to a string, or equal to an integer.

      • after (datetime) --

        After the specified timestamp.

      • before (datetime) --

        Before the specified timestamp

      • equals (dict) --

        The value is equal to the provided string or integer.

        • integerValues (list) --

          The list of integer values that the filter matches.

          • (integer) --

        • stringValues (list) --

          The list of string values that the filter matches.

          • (string) --

    • key (string) -- [REQUIRED]

      The key that you're filtering on.

type incidentRecordArn:

string

param incidentRecordArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the incident that includes the timeline event.

type maxResults:

integer

param maxResults:

The maximum number of results per page.

type nextToken:

string

param nextToken:

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

type sortBy:

string

param sortBy:

Sort by the specified key value pair.

type sortOrder:

string

param sortOrder:

Sorts the order of timeline events by the value specified in the sortBy field.

rtype:

dict

returns:

Response Syntax

{
    'eventSummaries': [
        {
            'eventId': 'string',
            'eventReferences': [
                {
                    'relatedItemId': 'string',
                    'resource': 'string'
                },
            ],
            'eventTime': datetime(2015, 1, 1),
            'eventType': 'string',
            'eventUpdatedTime': datetime(2015, 1, 1),
            'incidentRecordArn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • eventSummaries (list) --

      Details about each event that occurred during the incident.

      • (dict) --

        Details about a timeline event during an incident.

        • eventId (string) --

          The timeline event ID.

        • eventReferences (list) --

          A list of references in a TimelineEvent.

          • (dict) --

            An item referenced in a TimelineEvent that is involved in or somehow associated with an incident. You can specify an Amazon Resource Name (ARN) for an Amazon Web Services resource or a RelatedItem ID.

            • relatedItemId (string) --

              The ID of a RelatedItem referenced in a TimelineEvent.

            • resource (string) --

              The Amazon Resource Name (ARN) of an Amazon Web Services resource referenced in a TimelineEvent.

        • eventTime (datetime) --

          The time that the event occurred.

        • eventType (string) --

          The type of event. The timeline event must be Custom Event.

        • eventUpdatedTime (datetime) --

          The time that the timeline event was last updated.

        • incidentRecordArn (string) --

          The Amazon Resource Name (ARN) of the incident that the event happened during.

    • nextToken (string) --

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

StartIncident (updated) Link ¶
Changes (request)
{'relatedItems': {'generatedId': 'string'}}

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=[
        {
            'generatedId': 'string',
            '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.

    • generatedId (string) --

      A unique ID for a RelatedItem.

    • 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': {'generatedId': 'string'}}}

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': {
            'generatedId': 'string',
            '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.

    • generatedId (string) --

      A unique ID for a RelatedItem.

    • 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) --

UpdateTimelineEvent (updated) Link ¶
Changes (request)
{'eventReferences': [{'relatedItemId': 'string', 'resource': 'string'}]}

Updates a timeline event. You can update events of type Custom Event.

See also: AWS API Documentation

Request Syntax

client.update_timeline_event(
    clientToken='string',
    eventData='string',
    eventId='string',
    eventReferences=[
        {
            'relatedItemId': 'string',
            'resource': 'string'
        },
    ],
    eventTime=datetime(2015, 1, 1),
    eventType='string',
    incidentRecordArn='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 eventData:

string

param eventData:

A short description of the event.

type eventId:

string

param eventId:

[REQUIRED]

The ID of the event you are updating. You can find this by using ListTimelineEvents.

type eventReferences:

list

param eventReferences:

Updates all existing references in a TimelineEvent. A reference can be an Amazon Web Services resource involved in the incident or in some way associated with it. When you specify a reference, you enter the Amazon Resource Name (ARN) of the resource. You can also specify a related item. As an example, you could specify the ARN of an Amazon DynamoDB (DynamoDB) table. The table for this example is the resource. You could also specify a Amazon CloudWatch metric for that table. The metric is the related item.

  • (dict) --

    An item referenced in a TimelineEvent that is involved in or somehow associated with an incident. You can specify an Amazon Resource Name (ARN) for an Amazon Web Services resource or a RelatedItem ID.

    • relatedItemId (string) --

      The ID of a RelatedItem referenced in a TimelineEvent.

    • resource (string) --

      The Amazon Resource Name (ARN) of an Amazon Web Services resource referenced in a TimelineEvent.

type eventTime:

datetime

param eventTime:

The time that the event occurred.

type eventType:

string

param eventType:

The type of the event. You can update events of type Custom Event.

type incidentRecordArn:

string

param incidentRecordArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the incident that includes the timeline event.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --