GetRelationalDatabaseBundlesCommand

Returns the list of bundles that are available in Amazon Lightsail. A bundle describes the performance specifications for a database.

You can use a bundle ID to create a new database with explicit performance specifications.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LightsailClient, GetRelationalDatabaseBundlesCommand } from "@aws-sdk/client-lightsail"; // ES Modules import
// const { LightsailClient, GetRelationalDatabaseBundlesCommand } = require("@aws-sdk/client-lightsail"); // CommonJS import
const client = new LightsailClient(config);
const input = { // GetRelationalDatabaseBundlesRequest
  pageToken: "STRING_VALUE",
  includeInactive: true || false,
};
const command = new GetRelationalDatabaseBundlesCommand(input);
const response = await client.send(command);
// { // GetRelationalDatabaseBundlesResult
//   bundles: [ // RelationalDatabaseBundleList
//     { // RelationalDatabaseBundle
//       bundleId: "STRING_VALUE",
//       name: "STRING_VALUE",
//       price: Number("float"),
//       ramSizeInGb: Number("float"),
//       diskSizeInGb: Number("int"),
//       transferPerMonthInGb: Number("int"),
//       cpuCount: Number("int"),
//       isEncrypted: true || false,
//       isActive: true || false,
//     },
//   ],
//   nextPageToken: "STRING_VALUE",
// };

GetRelationalDatabaseBundlesCommand Input

Parameter
Type
Description
includeInactive
boolean | undefined

A Boolean value that indicates whether to include inactive (unavailable) bundles in the response of your request.

pageToken
string | undefined

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

To get a page token, perform an initial GetRelationalDatabaseBundles request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

GetRelationalDatabaseBundlesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
bundles
RelationalDatabaseBundle[] | undefined

An object describing the result of your get relational database bundles 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 GetRelationalDatabaseBundles request and specify the next page token using the pageToken parameter.

Throws

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 (us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources.

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.