Skip to content

describe_events async

describe_events(
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    application_name: Optional[ApplicationName] = None,
    version_label: Optional[VersionLabel] = None,
    template_name: Optional[ConfigurationTemplateName] = None,
    environment_id: Optional[EnvironmentId] = None,
    environment_name: Optional[EnvironmentName] = None,
    platform_arn: Optional[PlatformArn] = None,
    request_id: Optional[RequestId] = None,
    severity: Optional[EventSeverity] = None,
    start_time: Optional[TimeFilterStart] = None,
    end_time: Optional[TimeFilterEnd] = None,
    max_records: Optional[MaxRecords] = None,
    next_token: Optional[Token] = None,
) -> EventDescriptionsMessage

Returns list of event descriptions matching criteria up to the last 6 weeks.

This action returns the most recent 1,000 events from the specified NextToken.

This action only returns information about resources that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of three resources. When the user calls the this action, the response will only include the one resource that the user has permission to access instead of all three resources. If the user doesn’t have access to any of the resources an empty result is returned.

The AWSElasticBeanstalkReadOnly managed policy allows operators to view information about resources related to Elastic Beanstalk. For more information, see Managing Elastic Beanstalk user policies in the Elastic Beanstalk Developer Guide. For detailed instructions to attach a policy to a user or group, see the section Controlling access with managed policies in the same topic.

Parameters:

  • application_name (Optional[ApplicationName], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to include only those associated with this application.

  • version_label (Optional[VersionLabel], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this application version.

  • template_name (Optional[ConfigurationTemplateName], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to those that are associated with this environment configuration.

  • environment_id (Optional[EnvironmentId], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this environment.

  • environment_name (Optional[EnvironmentName], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this environment.

  • platform_arn (Optional[PlatformArn], default: None ) –

    The ARN of a custom platform version. If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this custom platform version.

  • request_id (Optional[RequestId], default: None ) –

    If specified, Elastic Beanstalk restricts the described events to include only those associated with this request ID.

  • severity (Optional[EventSeverity], default: None ) –

    If specified, limits the events returned from this call to include only those with the specified severity or higher.

  • start_time (Optional[TimeFilterStart], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to those that occur on or after this time.

  • end_time (Optional[TimeFilterEnd], default: None ) –

    If specified, Elastic Beanstalk restricts the returned descriptions to those that occur up to, but not including, the EndTime.

  • max_records (Optional[MaxRecords], default: None ) –

    Specifies the maximum number of events that can be returned, beginning with the most recent event.

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

    Pagination token. If specified, the events return the next batch of results.

Raises:

Examples:

To view events for an environment The following operation retrieves events for an environment named my-env:

>>> await client.describe_events(environment_name='my-env')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
async def describe_events(
    self,
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    application_name: Optional[
        "capo_elastic_beanstalk.types.application_name.ApplicationName"
    ] = None,
    version_label: Optional[
        "capo_elastic_beanstalk.types.version_label.VersionLabel"
    ] = None,
    template_name: Optional[
        "capo_elastic_beanstalk.types.configuration_template_name.ConfigurationTemplateName"
    ] = None,
    environment_id: Optional[
        "capo_elastic_beanstalk.types.environment_id.EnvironmentId"
    ] = None,
    environment_name: Optional[
        "capo_elastic_beanstalk.types.environment_name.EnvironmentName"
    ] = None,
    platform_arn: Optional[
        "capo_elastic_beanstalk.types.platform_arn.PlatformArn"
    ] = None,
    request_id: Optional[
        "capo_elastic_beanstalk.types.request_id.RequestId"
    ] = None,
    severity: Optional[
        "capo_elastic_beanstalk.types.event_severity.EventSeverity"
    ] = None,
    start_time: Optional[
        "capo_elastic_beanstalk.types.time_filter_start.TimeFilterStart"
    ] = None,
    end_time: Optional[
        "capo_elastic_beanstalk.types.time_filter_end.TimeFilterEnd"
    ] = None,
    max_records: Optional[
        "capo_elastic_beanstalk.types.max_records.MaxRecords"
    ] = None,
    next_token: Optional["capo_elastic_beanstalk.types.token.Token"] = None,
) -> "capo_elastic_beanstalk.types.event_descriptions_message.EventDescriptionsMessage":
    """<p>Returns list of event descriptions matching criteria up to the last 6 weeks.</p> <p>This action returns the most recent 1,000 events from the specified <code>NextToken</code>.</p> <p>This action only returns information about resources that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of three resources. When the user calls the this action, the response will only include the one resource that the user has permission to access instead of all three resources. If the user doesn’t have access to any of the resources an empty result is returned.</p> <note> <p>The <a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSElasticBeanstalkReadOnly.html">AWSElasticBeanstalkReadOnly</a> managed policy allows operators to view information about resources related to Elastic Beanstalk. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html"> Managing Elastic Beanstalk user policies</a> in the <i>Elastic Beanstalk Developer Guide</i>. For detailed instructions to attach a policy to a user or group, see the section <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html#iam-userpolicies-managed"> Controlling access with managed policies</a> in the same topic.</p> </note>

    Args:
        application_name: <p>If specified, Elastic Beanstalk restricts the returned descriptions to include only those associated with this application.</p>
        version_label: <p>If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this application version.</p>
        template_name: <p>If specified, Elastic Beanstalk restricts the returned descriptions to those that are associated with this environment configuration.</p>
        environment_id: <p>If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this environment.</p>
        environment_name: <p>If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this environment.</p>
        platform_arn: <p>The ARN of a custom platform version. If specified, Elastic Beanstalk restricts the returned descriptions to those associated with this custom platform version.</p>
        request_id: <p>If specified, Elastic Beanstalk restricts the described events to include only those associated with this request ID.</p>
        severity: <p>If specified, limits the events returned from this call to include only those with the specified severity or higher.</p>
        start_time: <p>If specified, Elastic Beanstalk restricts the returned descriptions to those that occur on or after this time.</p>
        end_time: <p> If specified, Elastic Beanstalk restricts the returned descriptions to those that occur up to, but not including, the <code>EndTime</code>. </p>
        max_records: <p>Specifies the maximum number of events that can be returned, beginning with the most recent event.</p>
        next_token: <p>Pagination token. If specified, the events return the next batch of results.</p>

    Raises:
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To view events for an environment
        The following operation retrieves events for an environment named my-env:

        >>> await client.describe_events(environment_name='my-env')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_beanstalk.types.describe_events_message.DescribeEventsMessage]",
    ) -> AsyncOperationResponse[
        "capo_elastic_beanstalk.types.event_descriptions_message.EventDescriptionsMessage"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.describe_events

        (
            output,
            http_response,
        ) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.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_elastic_beanstalk.types.describe_events_message.DescribeEventsMessage = {}
    if application_name is not None:
        input_["application_name"] = application_name
    if version_label is not None:
        input_["version_label"] = version_label
    if template_name is not None:
        input_["template_name"] = template_name
    if environment_id is not None:
        input_["environment_id"] = environment_id
    if environment_name is not None:
        input_["environment_name"] = environment_name
    if platform_arn is not None:
        input_["platform_arn"] = platform_arn
    if request_id is not None:
        input_["request_id"] = request_id
    if severity is not None:
        input_["severity"] = severity
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if max_records is not None:
        input_["max_records"] = max_records
    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