- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetRelationalDatabaseEventsCommand
Returns a list of events for a specific database in Amazon Lightsail.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LightsailClient, GetRelationalDatabaseEventsCommand } from "@aws-sdk/client-lightsail"; // ES Modules import
// const { LightsailClient, GetRelationalDatabaseEventsCommand } = require("@aws-sdk/client-lightsail"); // CommonJS import
const client = new LightsailClient(config);
const input = { // GetRelationalDatabaseEventsRequest
relationalDatabaseName: "STRING_VALUE", // required
durationInMinutes: Number("int"),
pageToken: "STRING_VALUE",
};
const command = new GetRelationalDatabaseEventsCommand(input);
const response = await client.send(command);
// { // GetRelationalDatabaseEventsResult
// relationalDatabaseEvents: [ // RelationalDatabaseEventList
// { // RelationalDatabaseEvent
// resource: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// message: "STRING_VALUE",
// eventCategories: [ // StringList
// "STRING_VALUE",
// ],
// },
// ],
// nextPageToken: "STRING_VALUE",
// };
GetRelationalDatabaseEventsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
relationalDatabaseName Required | string | undefined | The name of the database from which to get events. |
durationInMinutes | number | undefined | 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: The minimum is 1 and the maximum is 14 days (20160 minutes). |
pageToken | string | undefined | The token to advance to the next page of results from your request. To get a page token, perform an initial |
GetRelationalDatabaseEventsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
nextPageToken | string | undefined | 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 |
relationalDatabaseEvents | RelationalDatabaseEvent[] | undefined | An object describing the result of your get relational database events request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource. |
AccountSetupInProgressException | client | Lightsail throws this exception when an account is still in the setup in progress state. |
InvalidInputException | client | Lightsail throws this exception when user input does not conform to the validation rules of an input field. Domain and distribution APIs are only available in the N. Virginia ( |
NotFoundException | client | Lightsail throws this exception when it cannot find a resource. |
OperationFailureException | client | Lightsail throws this exception when an operation fails to execute. |
ServiceException | server | A general service exception. |
UnauthenticatedException | client | Lightsail throws this exception when the user has not been authenticated. |
LightsailServiceException | Base exception class for all service exceptions from Lightsail service. |