Skip to content

list_ops_item_events async

list_ops_item_events(
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    filters: Optional[OpsItemEventFilters] = None,
    max_results: Optional[OpsItemEventMaxResults] = None,
    next_token: Optional[String] = None,
) -> ListOpsItemEventsResponse

Returns a list of all OpsItem events in the current Amazon Web Services Region and Amazon Web Services account. You can limit the results to events associated with specific OpsItems by specifying a filter.

Parameters:

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

    One or more OpsItem filters. Use a filter to return a more specific list of results.

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

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

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

    A token to start the list. Use this token to get the next set of results.

Raises:

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def list_ops_item_events(
    self,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    filters: Optional[
        "capo_ssm.types.ops_item_event_filters.OpsItemEventFilters"
    ] = None,
    max_results: Optional[
        "capo_ssm.types.ops_item_event_max_results.OpsItemEventMaxResults"
    ] = None,
    next_token: Optional["capo_ssm.types.string.String"] = None,
) -> "capo_ssm.types.list_ops_item_events_response.ListOpsItemEventsResponse":
    """<p>Returns a list of all OpsItem events in the current Amazon Web Services Region and Amazon Web Services account. You can limit the results to events associated with specific OpsItems by specifying a filter.</p>

    Args:
        filters: <p>One or more OpsItem filters. Use a filter to return a more specific list of results. </p>
        max_results: <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results. </p>
        next_token: <p>A token to start the list. Use this token to get the next set of results. </p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.ops_item_invalid_parameter_exception.OpsItemInvalidParameterException: <p>A specified parameter argument isn't valid. Verify the available arguments and try again.</p>
        capo_ssm.errors.ops_item_limit_exceeded_exception.OpsItemLimitExceededException: <p>The request caused OpsItems to exceed one or more quotas.</p>
        capo_ssm.errors.ops_item_not_found_exception.OpsItemNotFoundException: <p>The specified OpsItem ID doesn't exist. Verify the ID and try again.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.list_ops_item_events_request.ListOpsItemEventsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.list_ops_item_events_response.ListOpsItemEventsResponse"
    ]:
        import capo_ssm._operations.amazon_ssm.list_ops_item_events

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.list_ops_item_events.async_list_ops_item_events(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListOpsItemEvents")
    )
    input_: capo_ssm.types.list_ops_item_events_request.ListOpsItemEventsRequest = {}
    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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output