Amazon Lightsail
API Reference (API Version 2016-11-28)

GetRelationalDatabaseMetricData

Returns the data points of the specified metric for a database in Amazon Lightsail.

Request Syntax

{ "endTime": number, "metricName": "string", "period": number, "relationalDatabaseName": "string", "startTime": number, "statistics": [ "string" ], "unit": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

endTime

The end of the time interval from which to get metric data.

Constraints:

  • Specified in Universal Coordinated Time (UTC).

  • Specified in the Unix time format.

    For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the end time.

Type: Timestamp

Required: Yes

metricName

The name of the metric data to return.

Type: String

Valid Values: CPUUtilization | DatabaseConnections | DiskQueueDepth | FreeStorageSpace | NetworkReceiveThroughput | NetworkTransmitThroughput

Required: Yes

period

The granularity, in seconds, of the returned data points.

Type: Integer

Valid Range: Minimum value of 60. Maximum value of 86400.

Required: Yes

relationalDatabaseName

The name of your database from which to get metric data.

Type: String

Pattern: \w[\w\-]*\w

Required: Yes

startTime

The start of the time interval from which to get metric data.

Constraints:

  • Specified in Universal Coordinated Time (UTC).

  • Specified in the Unix time format.

    For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the start time.

Type: Timestamp

Required: Yes

statistics

The array of statistics for your metric data request.

Type: Array of strings

Valid Values: Minimum | Maximum | Sum | Average | SampleCount

Required: Yes

unit

The unit for the metric data request.

Type: String

Valid Values: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None

Required: Yes

Response Syntax

{ "metricData": [ { "average": number, "maximum": number, "minimum": number, "sampleCount": number, "sum": number, "timestamp": number, "unit": "string" } ], "metricName": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

metricData

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

Type: Array of MetricDatapoint objects

metricName

The name of the metric.

Type: String

Valid Values: CPUUtilization | DatabaseConnections | DiskQueueDepth | FreeStorageSpace | NetworkReceiveThroughput | NetworkTransmitThroughput

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.

HTTP Status Code: 400

AccountSetupInProgressException

Lightsail throws this exception when an account is still in the setup in progress state.

HTTP Status Code: 400

InvalidInputException

Lightsail throws this exception when user input does not conform to the validation rules of an input field.

Note

Domain-related APIs are only available in the N. Virginia (us-east-1) Region. Please set your AWS Region configuration to us-east-1 to create, view, or edit these resources.

HTTP Status Code: 400

NotFoundException

Lightsail throws this exception when it cannot find a resource.

HTTP Status Code: 400

OperationFailureException

Lightsail throws this exception when an operation fails to execute.

HTTP Status Code: 400

ServiceException

A general service exception.

HTTP Status Code: 500

UnauthenticatedException

Lightsail throws this exception when the user has not been authenticated.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: