[ 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 | --cli-input-yaml]
[--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 | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those 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. This may not be specified along with --cli-input-yaml.

--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. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

See ‘aws help’ for descriptions of global parameters.

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .

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.