DBClusters
Learn how to access DBCluster objects via the DNAnexus API.
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 are accessible 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 database operations. If the primary instance fails, the second instance is automatically promoted to primary. DBClusters can only exist within a single project and 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/describeSpecification
Describes the specified DBCluster object.
Inputs
projectstring A project or container ID used as a hint for finding the DBCluster.defaultFieldsboolean (optional, default false iffieldsis 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.fieldsmapping (optional) Include or exclude specific fields from the output. These selections override settings indefaultFields.key Desired output field. See "Outputs" Section for valid values here
value boolean Whether to include the field
Outputs
idstring The id of the DBCluster.The following fields are included by default (but can be disabled using
fieldsordefaultFields):projectstring ID of the project or container in which the object was foundclassstring The valuedbclustertypesarray of strings Types associated with the object. See the Types page for detailscreatedtimestamp Time at which this object was createdstatestring Always "open"hiddenboolean Whether the object is hidden or notnamestring The name of the database data object, matches the idfolderstring The project folder the DBCluster object resides insponsoredboolean Whether the object is sponsored by DNAnexustagsarray of strings Tags associated with the object. See the Tags page for detailsmodifiedtimestamp Time at which the user-provided metadata of the object was last modifiedcreatedBymapping How the object was createduserstring ID of the user who created the object or launched an execution which created the object
propertiesmapping Properties associated with the objectkey Property name
value string Property value
detailsmapping or array Contents of the object's detailsstatusstring The status of the database cluster instances. Refer to Relational Databases for possible values and meaningportinteger The port this db should be accessed onengineVersionstring The engine version this cluster is running, corresponds to AWS Aurora engine versions for MySQL Versions and Postgres Versions. Refer to DBCluster Support Matrix for validdxInstanceClass,engine, andengineVersioncombinationsenginestring The engine this cluster is runningdxInstanceClassstring The instance class for the instances in the clusterstatusAsOftimestamp The timestamp the cluster's status was last updatedendpointstring 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:
sponsoredUntiltimestamp Indicates the expiration time of data sponsorship (this field appears only for sponsored objects, and when present, 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/newSpecification
Creates a new DBCluster in the specified project.
Inputs
The following inputs are required:
namestring A user friendly name for the database clusterprojectstring The project ID for creating the database clusterenginestring The database engine to use (aurora, aurora-mysql, aurora-postgresql)engineVersionstring The version of the database engine to use.Aurora (
mysql) versions:PostgreSQL versions:
dxInstanceClassstring The DNAnexus instance class for the database instances in this clusteradminPasswordstring The password associated with the admin user for this cluster. Must be at least 8 characters in length. The admin user has the username 'root' for connecting to the database.
Outputs
id string The id of the DBCluster.
Errors
InvalidInput - Thrown for invalid combinations of
dxInstanceClass+engine+engineVersionResourceNotFound - Thrown if the projectID does not exist
PermissionDenied
User doesn't have ADMIN access to the project or the org does not have the
dbclusterlicense feature enabledDBCluster pricing is required for the project's
billToin the project's region to create a new DBClusterDBCluster pricing for instance type <> is required for the project's
billToin the project's region to create a new DBCluster that uses this instance type.
API method: /dbcluster-xxxx/stop
/dbcluster-xxxx/stopSpecification
Stops the specified DBCluster. The cluster needs 'available' status 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
dbclusterlicense feature enabled
API method: /dbcluster-xxxx/start
/dbcluster-xxxx/startSpecification
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
dbclusterlicense feature enabled
API method: /dbcluster-xxxx/terminate
/dbcluster-xxxx/terminateSpecification
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.
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
dbclusterlicense feature enabled
Last updated
Was this helpful?