Skip to content

list_incident_records

list_incident_records(
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListIncidentRecordsOutput

Lists all incident records in your account. Use this command to retrieve the Amazon Resource Name (ARN) of the incident record you want to update.

Parameters:

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

    Filters the list of incident records you want to search through. You can filter on the following keys:

    • creationTime

    • impact

    • status

    • createdBy

    Note the following when when you use Filters:

    • If you don't specify a Filter, the response includes all incident records.

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

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

  • 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_incident_records(
    self,
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    filters: Optional["capo_ssm_incidents.types.filter_list.FilterList"] = 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_incident_records_output.ListIncidentRecordsOutput":
    """<p>Lists all incident records in your account. Use this command to retrieve the Amazon Resource Name (ARN) of the incident record you want to update. </p>

    Args:
        filters: <p>Filters the list of incident records you want to search through. You can filter on the following keys:</p> <ul> <li> <p> <code>creationTime</code> </p> </li> <li> <p> <code>impact</code> </p> </li> <li> <p> <code>status</code> </p> </li> <li> <p> <code>createdBy</code> </p> </li> </ul> <p>Note the following when when you use Filters:</p> <ul> <li> <p>If you don't specify a Filter, the response includes all incident records.</p> </li> <li> <p>If you specify more than one filter in a single request, the response returns incident records that match all filters.</p> </li> <li> <p>If you specify a filter with more than one value, the response returns incident records that match any of the values provided.</p> </li> </ul>
        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_incident_records_input.ListIncidentRecordsInput]",
    ) -> OperationResponse[
        "capo_ssm_incidents.types.list_incident_records_output.ListIncidentRecordsOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.list_incident_records

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListIncidentRecords")
    )
    input_: capo_ssm_incidents.types.list_incident_records_input.ListIncidentRecordsInput = {}
    if filters is not None:
        input_["filters"] = filters
    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