Skip to content

list_timeline_events

list_timeline_events(
    incident_record_arn: Arn,
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    filters: Optional[FilterList] = None,
    sort_by: Optional[TimelineEventSort] = None,
    sort_order: Optional[SortOrder] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListTimelineEventsOutput

Lists timeline events for the specified incident record.

Parameters:

  • incident_record_arn (Arn) –

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

  • filters (Optional[FilterList], default: None ) –

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

    • eventReference

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

  • sort_by (Optional[TimelineEventSort], default: None ) –

    Sort timeline events by the specified key value pair.

  • sort_order (Optional[SortOrder], default: None ) –

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

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results per page.

  • next_token (Optional[NextToken], default: None ) –

    The pagination token for the next set of items to return. (You received this token from a previous call.)

Raises:

Source code in docs_src/capo_ssm_incidents/_services/ssm_incidents.py
def list_timeline_events(
    self,
    incident_record_arn: "capo_ssm_incidents.types.arn.Arn",
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    filters: Optional["capo_ssm_incidents.types.filter_list.FilterList"] = None,
    sort_by: Optional[
        "capo_ssm_incidents.types.timeline_event_sort.TimelineEventSort"
    ] = None,
    sort_order: Optional["capo_ssm_incidents.types.sort_order.SortOrder"] = None,
    max_results: Optional["capo_ssm_incidents.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_ssm_incidents.types.next_token.NextToken"] = None,
) -> (
    "capo_ssm_incidents.types.list_timeline_events_output.ListTimelineEventsOutput"
):
    """<p>Lists timeline events for the specified incident record.</p>

    Args:
        incident_record_arn: <p>The Amazon Resource Name (ARN) of the incident that includes the timeline event.</p>
        filters: <p>Filters the timeline events based on the provided conditional values. You can filter timeline events with the following keys:</p> <ul> <li> <p> <code>eventReference</code> </p> </li> <li> <p> <code>eventTime</code> </p> </li> <li> <p> <code>eventType</code> </p> </li> </ul> <p>Note the following when deciding how to use Filters:</p> <ul> <li> <p>If you don't specify a Filter, the response includes all timeline events.</p> </li> <li> <p>If you specify more than one filter in a single request, the response returns timeline events that match all filters.</p> </li> <li> <p>If you specify a filter with more than one value, the response returns timeline events that match any of the values provided.</p> </li> </ul>
        sort_by: <p>Sort timeline events by the specified key value pair.</p>
        sort_order: <p>Sorts the order of timeline events by the value specified in the <code>sortBy</code> field.</p>
        max_results: <p>The maximum number of results per page.</p>
        next_token: <p>The pagination token for the next set of items to return. (You received this token from a previous call.)</p>

    Raises:
        capo_ssm_incidents.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_incidents.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_ssm_incidents.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_incidents.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_incidents.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_incidents.types.list_timeline_events_input.ListTimelineEventsInput]",
    ) -> OperationResponse[
        "capo_ssm_incidents.types.list_timeline_events_output.ListTimelineEventsOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.list_timeline_events

        output, http_response = (
            capo_ssm_incidents._operations.ssm_incidents.list_timeline_events.list_timeline_events(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTimelineEvents")
    )
    input_: capo_ssm_incidents.types.list_timeline_events_input.ListTimelineEventsInput = {
        "incident_record_arn": incident_record_arn
    }
    if filters is not None:
        input_["filters"] = filters
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output