DBClusters
Learn how to access DBCluster objects via the DNAnexus API.
A license is required to use the Relational Database Service, which provides the functionality described on this page. Contact DNAnexus Sales for more information.
A DBCluster object is used to represent a relational database cluster that exists in the same cloud provider and region as the project it resides within. These databases can be accessed from within DNAnexus jobs at the port and endpoint properties returned when describing the dbcluster. All dbclusters are created with two instances in the cluster to provide high availability for the database operations. If the primary instance should fail, the second instance will be automatically promoted to primary. DBClusters can only exist within a single project, they cannot be cloned.
See the Relational Database Clusters page for more information on the dbcluster service.
DBCluster API Specification
API method: /dbcluster-xxxx/describe
/dbcluster-xxxx/describe
Specification
Describes the specified dbcluster object.
Inputs:
project string A project or container ID used as a hint for finding the dbcluster.
defaultFields boolean (optional, default false if fields is supplied, true otherwise) Whether to include the default set of fields in the output (the default fields are described in the "Outputs" section below). The selections are overridden by any fields explicitly named in the fields input.
fields mapping (optional) Include or exclude specific fields from the output. These selections override settings in defaultFields.
key Desired output field. See "Outputs" Section for valid values here
value boolean Whether to include the field
Outputs:
id string The id of the dbcluster.
The following fields are included by default (but can be disabled using
fields
ordefaultFields
):project
string ID of the project or container in which the object was foundclass
string The value "dbcluster"types
array of strings Types associated with the object. See the Types page for detailscreated
timestamp Time at which this object was createdstate
string Always "open"hidden
boolean Whether the object is hidden or notname
string The name of the database data object, matches the idfolder
string The project folder the dbcluster object resides insponsored
boolean Whether the object is sponsored by DNAnexustags
array of strings Tags associated with the object. See the Tags page for detailsmodified
timestamp Time at which the user-provided metadata of the object was last modifiedcreatedBy
mapping How the object was createduser
string ID of the user who created the object or launched an execution which created the object
properties
mapping Properties associated with the objectkey Property name
value string Property value
details
mapping or array Contents of the object’s detailsstatus
string The status of the database cluster instances. Refer to Relational Databases for possible values and meaningport
integer The port this db should be accessed onengineVersion
string The engine version this cluster is running, corresponds to AWS Aurora engine versions for MySQL MySQL Versions and PostGres Postgres Versions. Refer to DBCluster Support Matrix for valid dxInstanceClass, engine, and engineVersion combinationsengine
string The engine this cluster is runningdxInstanceClass
string The instance class for the instances in the clusterstatusAsOf
timestamp The timestamp the cluster's status was last updatedendpoint
string The host endpoint to use when accessing this database from a DNAnexus jobThe following field (included by default) is available if the object is sponsored by a third party:
sponsoredUntil
timestamp Indicates the expiration time of data sponsorship (this field is only set if the object is currently sponsored, and if set, the specified time is always in the future)
Errors:
ResourceNotFound
Thrown if the dbcluster is not found in any accessible project
InvalidInput
The input is not a valid JSON object, other inputs (if supplied) are not of the correct types
PermissionDenied
Thrown if user does not have VIEW access to the specified project
API method: /dbcluster/new
/dbcluster/new
Specification
Creates a new dbcluster in the specified project.
Inputs:
All of the following inputs are required:
name string A user friendly name for the database cluster
project string The project ID that the database cluster will be created in
engine string The database engine to use (aurora, aurora-mysql, aurora-postgresql)
engineVersion string The version of the database engine to use.
Aurora (mysql) versions:
Postgresql versions:
dxInstanceClass string The DNAnexus instance class for the database instances in this cluster
adminPassword string The password associated with the admin user for this cluster. Must be at least 8 characters in length.
Note: The admin user will have the username 'root' for purposes of connecting to the database
Outputs:
id string The id of the dbcluster.
Errors:
InvalidInput - Thrown for invalid combinations of dxInstanceClass + engine + engineVersion
ResourceNotFound - Thrown if the projectID does not exist
PermissionDenied
User doesn't have ADMIN access to the project or the org does not have the 'dbcluster' license feature enabled
DBCluster pricing is required for the project's
billTo
in the project's region to create a new DBClusterDBCluster pricing for instance type <> is required for the project's
billTo
in the project's region to create a new DBCluster that uses this instance type.
API method: /dbcluster-xxxx/stop
/dbcluster-xxxx/stop
Specification
Stops the specified dbcluster. The cluster must be in the 'available' status in order for this call to succeed.
Inputs:
None
Outputs:
id string The id of the dbcluster.
Errors:
InvalidState - Thrown if the cluster is not in the available status.
PermissionDenied - User doesn't have ADMIN access to the project or the org does not have the 'dbcluster' license feature enabled
API method: /dbcluster-xxxx/start
/dbcluster-xxxx/start
Specification
Restarts the specified dbcluster. Can only be called when the dbcluster is in the 'stopped' status.
Inputs:
None
Outputs:
id string The id of the dbcluster.
Errors:
InvalidState - Thrown if the cluster is not in the stopped status.
PermissionDenied - User doesn't have ADMIN access to the project or the org does not have the 'dbcluster' license feature enabled
API method: /dbcluster-xxxx/terminate
/dbcluster-xxxx/terminate
Specification
Terminates the specified dbcluster. This can only be called when the dbcluster is in the 'available' status as AWS does not allow users to terminate stopped databases.
Note: Once a dbcluster is terminated, the data is no longer accessible from the platform and all the data on the databases will be lost.
Inputs:
None
Outputs:
id string The id of the dbcluster.
Errors:
InvalidState - Thrown if the cluster is not in the 'available' status.
PermissionDenied - User doesn't have ADMIN access to the project or the org does not have the 'dbcluster' license feature enabled
Last updated