Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . lightsail ]

get-relational-database-events

Description

Returns a list of events for a specific database in Amazon Lightsail.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

get-relational-database-events is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the --no-paginate argument. When using --output text and the --query argument on a paginated response, the --query argument must extract data from the results of the following query expressions: relationalDatabaseEvents

Synopsis

  get-relational-database-events
--relational-database-name <value>
[--duration-in-minutes <value>]
[--cli-input-json <value>]
[--starting-token <value>]
[--max-items <value>]
[--generate-cli-skeleton <value>]

Options

--relational-database-name (string)

The name of the database from which to get events.

--duration-in-minutes (integer)

The number of minutes in the past from which to retrieve events. For example, to get all events from the past 2 hours, enter 120.

Default: 60

The minimum is 1 and the maximum is 14 days (20160 minutes).

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--starting-token (string)

A token to specify where to start paginating. This is the NextToken from a previously truncated response.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--max-items (integer)

The total number of items to return in the command's output. If the total number of items available is more than the value specified, a NextToken is provided in the command's output. To resume pagination, provide the NextToken value in the starting-token argument of a subsequent command. Do not use the NextToken response element directly outside of the AWS CLI.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To get the events for a relational database

The following get-relational-database-events example displays details about events in the last 17 hours (1020 minutes) for the specified relational database.

aws lightsail get-relational-database-events \
    --relational-database-name Database-1 \
    --duration-in-minutes 1020

Output:

{
    "relationalDatabaseEvents": [
        {
            "resource": "Database-1",
            "createdAt": 1571654146.553,
            "message": "Backing up Relational Database",
            "eventCategories": [
                "backup"
            ]
        },
        {
            "resource": "Database-1",
            "createdAt": 1571654249.98,
            "message": "Finished Relational Database backup",
            "eventCategories": [
                "backup"
            ]
        }
    ]
}

Output

relationalDatabaseEvents -> (list)

An object describing the result of your get relational database events request.

(structure)

Describes an event for a database.

resource -> (string)

The database that the database event relates to.

createdAt -> (timestamp)

The timestamp when the database event was created.

message -> (string)

The message of the database event.

eventCategories -> (list)

The category that the database event belongs to.

(string)

nextPageToken -> (string)

The token to advance to the next page of results from your request.

A next page token is not returned if there are no more results to display.

To get the next page of results, perform another GetRelationalDatabaseEvents request and specify the next page token using the pageToken parameter.