Skip to content

list_engagements

list_engagements(
    *,
    config_overrides: Optional[SSMContactsClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
    incident_id: Optional[IncidentId] = None,
    time_range_value: Optional[TimeRange] = None,
) -> ListEngagementsResult

Lists all engagements that have happened in an incident.

Parameters:

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

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

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

    The maximum number of engagements per page of results.

  • incident_id (Optional[IncidentId], default: None ) –

    The Amazon Resource Name (ARN) of the incident you're listing engagements for.

  • time_range_value (Optional[TimeRange], default: None ) –

    The time range to lists engagements for an incident.

Raises:

Source code in docs_src/capo_ssm_contacts/_services/ssm_contacts.py
def list_engagements(
    self,
    *,
    config_overrides: Optional[SSMContactsClientConfig] = None,
    next_token: Optional[
        "capo_ssm_contacts.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_ssm_contacts.types.max_results.MaxResults"] = None,
    incident_id: Optional["capo_ssm_contacts.types.incident_id.IncidentId"] = None,
    time_range_value: Optional[
        "capo_ssm_contacts.types.time_range.TimeRange"
    ] = None,
) -> "capo_ssm_contacts.types.list_engagements_result.ListEngagementsResult":
    """<p>Lists all engagements that have happened in an incident.</p>

    Args:
        next_token: <p>The pagination token to continue to the next page of results.</p>
        max_results: <p>The maximum number of engagements per page of results.</p>
        incident_id: <p>The Amazon Resource Name (ARN) of the incident you're listing engagements for.</p>
        time_range_value: <p>The time range to lists engagements for an incident.</p>

    Raises:
        capo_ssm_contacts.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_contacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred while processing the request.</p>
        capo_ssm_contacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_contacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_contacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_contacts.types.list_engagements_request.ListEngagementsRequest]",
    ) -> OperationResponse[
        "capo_ssm_contacts.types.list_engagements_result.ListEngagementsResult"
    ]:
        import capo_ssm_contacts._operations.ssm_contacts.list_engagements

        output, http_response = (
            capo_ssm_contacts._operations.ssm_contacts.list_engagements.list_engagements(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEngagements")
    )
    input_: capo_ssm_contacts.types.list_engagements_request.ListEngagementsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if incident_id is not None:
        input_["incident_id"] = incident_id
    if time_range_value is not None:
        input_["time_range_value"] = time_range_value

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