describe_events

ElasticBeanstalk.Client.describe_events(**kwargs)

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

Note

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

See also: AWS API Documentation

Request Syntax

response = client.describe_events(
    ApplicationName='string',
    VersionLabel='string',
    TemplateName='string',
    EnvironmentId='string',
    EnvironmentName='string',
    PlatformArn='string',
    RequestId='string',
    Severity='TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    MaxRecords=123,
    NextToken='string'
)
Parameters
  • ApplicationName (string) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those associated with this application.
  • VersionLabel (string) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this application version.
  • TemplateName (string) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that are associated with this environment configuration.
  • EnvironmentId (string) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.
  • EnvironmentName (string) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.
  • PlatformArn (string) -- The ARN of a custom platform version. If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this custom platform version.
  • RequestId (string) -- If specified, AWS Elastic Beanstalk restricts the described events to include only those associated with this request ID.
  • Severity (string) -- If specified, limits the events returned from this call to include only those with the specified severity or higher.
  • StartTime (datetime) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur on or after this time.
  • EndTime (datetime) -- If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur up to, but not including, the EndTime .
  • MaxRecords (integer) -- Specifies the maximum number of events that can be returned, beginning with the most recent event.
  • NextToken (string) -- Pagination token. If specified, the events return the next batch of results.
Return type

dict

Returns

Response Syntax

{
    'Events': [
        {
            'EventDate': datetime(2015, 1, 1),
            'Message': 'string',
            'ApplicationName': 'string',
            'VersionLabel': 'string',
            'TemplateName': 'string',
            'EnvironmentName': 'string',
            'PlatformArn': 'string',
            'RequestId': 'string',
            'Severity': 'TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Result message wrapping a list of event descriptions.

    • Events (list) --

      A list of EventDescription.

      • (dict) --

        Describes an event.

        • EventDate (datetime) --

          The date when the event occurred.

        • Message (string) --

          The event message.

        • ApplicationName (string) --

          The application associated with the event.

        • VersionLabel (string) --

          The release label for the application version associated with this event.

        • TemplateName (string) --

          The name of the configuration associated with this event.

        • EnvironmentName (string) --

          The name of the environment associated with this event.

        • PlatformArn (string) --

          The ARN of the platform version.

        • RequestId (string) --

          The web service request ID for the activity of this event.

        • Severity (string) --

          The severity level of this event.

    • NextToken (string) --

      If returned, this indicates that there are more results to obtain. Use this token in the next DescribeEvents call to get the next batch of events.

Examples

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

response = client.describe_events(
    EnvironmentName='my-env',
)

print(response)

Expected Output:

{
    'Events': [
        {
            'ApplicationName': 'my-app',
            'EnvironmentName': 'my-env',
            'EventDate': datetime(2015, 8, 20, 7, 6, 53, 3, 232, 0),
            'Message': 'Environment health has transitioned from Info to Ok.',
            'Severity': 'INFO',
        },
        {
            'ApplicationName': 'my-app',
            'EnvironmentName': 'my-env',
            'EventDate': datetime(2015, 8, 20, 7, 6, 2, 3, 232, 0),
            'Message': 'Environment update completed successfully.',
            'RequestId': 'b7f3960b-4709-11e5-ba1e-07e16200da41',
            'Severity': 'INFO',
        },
        {
            'ApplicationName': 'my-app',
            'EnvironmentName': 'my-env',
            'EventDate': datetime(2015, 8, 13, 19, 16, 27, 3, 225, 0),
            'Message': 'Using elasticbeanstalk-us-west-2-012445113685 as Amazon S3 storage bucket for environment data.',
            'RequestId': 'ca8dfbf6-41ef-11e5-988b-651aa638f46b',
            'Severity': 'INFO',
        },
        {
            'ApplicationName': 'my-app',
            'EnvironmentName': 'my-env',
            'EventDate': datetime(2015, 8, 13, 19, 16, 26, 3, 225, 0),
            'Message': 'createEnvironment is starting.',
            'RequestId': 'cdfba8f6-41ef-11e5-988b-65638f41aa6b',
            'Severity': 'INFO',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}