Skip to content

describe_event_types async

describe_event_types(
    *,
    config_overrides: Optional[AsyncHealthClientConfig] = None,
    filter: Optional[EventTypeFilter] = None,
    locale: Optional[locale] = None,
    next_token: Optional[nextToken] = None,
    max_results: Optional[maxResults] = None,
) -> DescribeEventTypesResponse

Returns the event types that meet the specified filter criteria. You can use this API operation to find information about the Health event, such as the category, Amazon Web Services service, and event code. The metadata for each event appears in the EventType object.

If you don't specify a filter criteria, the API operation returns all event types, in no particular order.

This API operation uses pagination. Specify the nextToken parameter in the next request to return more results.

Parameters:

  • filter (Optional[EventTypeFilter], default: None ) –

    Values to narrow the results returned.

  • locale (Optional[locale], default: None ) –

    The locale (language) to return information in. English (en) is the default and the only supported value at this time.

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

    If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

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

    The maximum number of items to return in one batch, between 10 and 100, inclusive.

    If you don't specify the maxResults parameter, this operation returns a maximum of 30 items by default.

Raises:

Source code in docs_src/capo_health/_services/async_health.py
async def describe_event_types(
    self,
    *,
    config_overrides: Optional[AsyncHealthClientConfig] = None,
    filter: Optional["capo_health.types.event_type_filter.EventTypeFilter"] = None,
    locale: Optional["capo_health.types.locale.locale"] = None,
    next_token: Optional["capo_health.types.next_token.nextToken"] = None,
    max_results: Optional["capo_health.types.max_results.maxResults"] = None,
) -> "capo_health.types.describe_event_types_response.DescribeEventTypesResponse":
    """<p>Returns the event types that meet the specified filter criteria. You can use this API operation to find information about the Health event, such as the category, Amazon Web Services service, and event code. The metadata for each event appears in the <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_EventType.html">EventType</a> object. </p> <p>If you don't specify a filter criteria, the API operation returns all event types, in no particular order. </p> <note> <p>This API operation uses pagination. Specify the <code>nextToken</code> parameter in the next request to return more results.</p> </note>

    Args:
        filter: <p>Values to narrow the results returned.</p>
        locale: <p>The locale (language) to return information in. English (en) is the default and the only supported value at this time.</p>
        next_token: <p>If the results of a search are large, only a portion of the results are returned, and a <code>nextToken</code> pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.</p>
        max_results: <p>The maximum number of items to return in one batch, between 10 and 100, inclusive.</p> <note> <p>If you don't specify the <code>maxResults</code> parameter, this operation returns a maximum of 30 items by default.</p> </note>

    Raises:
        capo_health.errors.invalid_pagination_token.InvalidPaginationToken: <p>The specified pagination token (<code>nextToken</code>) is not valid.</p>
        capo_health.errors.unsupported_locale.UnsupportedLocale: <p>The specified locale is not supported.</p>
        capo_health.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_health.types.describe_event_types_request.DescribeEventTypesRequest]",
    ) -> AsyncOperationResponse[
        "capo_health.types.describe_event_types_response.DescribeEventTypesResponse"
    ]:
        import capo_health._operations.aws_health_20160804.describe_event_types

        (
            output,
            http_response,
        ) = await capo_health._operations.aws_health_20160804.describe_event_types.async_describe_event_types(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEventTypes")
    )
    input_: capo_health.types.describe_event_types_request.DescribeEventTypesRequest = {}
    if filter is not None:
        input_["filter"] = filter
    if locale is not None:
        input_["locale"] = locale
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output