Skip to content

describe_events async

describe_events(
    *,
    config_overrides: Optional[AsyncHealthClientConfig] = None,
    filter: Optional[EventFilter] = None,
    next_token: Optional[nextToken] = None,
    max_results: Optional[maxResultsLowerRange] = None,
    locale: Optional[locale] = None,
) -> DescribeEventsResponse

Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeEventDetails and DescribeAffectedEntities operations.

If no filter criteria are specified, all events are returned. Results are sorted by lastModifiedTime, starting with the most recent event.

  • When you call the DescribeEvents operation and specify an entity for the entityValues parameter, Health might return public events that aren't specific to that resource. For example, if you call DescribeEvents and specify an ID for an Amazon Elastic Compute Cloud (Amazon EC2) instance, Health might return events that aren't specific to that resource or service. To get events that are specific to a service, use the services parameter in the filter object. For more information, see Event.

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

Parameters:

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

    Values to narrow the results returned.

  • 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[maxResultsLowerRange], default: None ) –

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

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

Raises:

Source code in docs_src/capo_health/_services/async_health.py
async def describe_events(
    self,
    *,
    config_overrides: Optional[AsyncHealthClientConfig] = None,
    filter: Optional["capo_health.types.event_filter.EventFilter"] = None,
    next_token: Optional["capo_health.types.next_token.nextToken"] = None,
    max_results: Optional[
        "capo_health.types.max_results_lower_range.maxResultsLowerRange"
    ] = None,
    locale: Optional["capo_health.types.locale.locale"] = None,
) -> "capo_health.types.describe_events_response.DescribeEventsResponse":
    """<p> Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html">DescribeEventDetails</a> and <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntities.html">DescribeAffectedEntities</a> operations.</p> <p>If no filter criteria are specified, all events are returned. Results are sorted by <code>lastModifiedTime</code>, starting with the most recent event.</p> <note> <ul> <li> <p>When you call the <code>DescribeEvents</code> operation and specify an entity for the <code>entityValues</code> parameter, Health might return public events that aren't specific to that resource. For example, if you call <code>DescribeEvents</code> and specify an ID for an Amazon Elastic Compute Cloud (Amazon EC2) instance, Health might return events that aren't specific to that resource or service. To get events that are specific to a service, use the <code>services</code> parameter in the <code>filter</code> object. For more information, see <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html">Event</a>.</p> </li> <li> <p>This API operation uses pagination. Specify the <code>nextToken</code> parameter in the next request to return more results.</p> </li> </ul> </note>

    Args:
        filter: <p>Values to narrow the results returned.</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 1 and 100, inclusive.</p>
        locale: <p>The locale (language) to return information in. English (en) is the default and the only supported value at this time.</p>

    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_events_request.DescribeEventsRequest]",
    ) -> AsyncOperationResponse[
        "capo_health.types.describe_events_response.DescribeEventsResponse"
    ]:
        import capo_health._operations.aws_health_20160804.describe_events

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

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

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