describe_events

describe_events(**kwargs)

Describes events for a specified server. Results are ordered by time, with newest events first.

This operation is synchronous.

A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

See also: AWS API Documentation

Request Syntax

response = client.describe_events(
    ServerName='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • ServerName (string) --

    [REQUIRED]

    The name of the server for which you want to view events.

  • NextToken (string) -- NextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call DescribeEvents again, and assign the token from the previous results as the value of the nextToken parameter. If there are no more results, the response object's nextToken parameter value is null . Setting a nextToken value that was not returned in your previous results causes an InvalidNextTokenException to occur.
  • MaxResults (integer) -- To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.
Return type

dict

Returns

Response Syntax

{
    'ServerEvents': [
        {
            'CreatedAt': datetime(2015, 1, 1),
            'ServerName': 'string',
            'Message': 'string',
            'LogUrl': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ServerEvents (list) --

      Contains the response to a DescribeEvents request.

      • (dict) --

        An event that is related to the server, such as the start of maintenance or backup.

        • CreatedAt (datetime) --

          The time when the event occurred.

        • ServerName (string) --

          The name of the server on or for which the event occurred.

        • Message (string) --

          A human-readable informational or status message.

        • LogUrl (string) --

          The Amazon S3 URL of the event's log file.

    • NextToken (string) --

      NextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call DescribeEvents again, and assign the token from the previous results as the value of the nextToken parameter. If there are no more results, the response object's nextToken parameter value is null . Setting a nextToken value that was not returned in your previous results causes an InvalidNextTokenException to occur.

Exceptions

  • OpsWorksCM.Client.exceptions.ValidationException
  • OpsWorksCM.Client.exceptions.InvalidNextTokenException
  • OpsWorksCM.Client.exceptions.ResourceNotFoundException