Create virtual database server (POST /v1.0/{tenantId}/instances)

Creates a virtual database server.

Request URI

{tenantID}

Project ID of the owner of the instance

Data Type Cardinality
String 1..1

Request Parameters

instance

Data Type Cardinality Parent Element Child Element(s)
  1..1 None flavorRef

volume

id

name

description

availabilityZone

subnetGroupId

multi

multiAZ

port

preferredBackupWindow

preferredMaintenanceWindow

preferredRecoveryTime

autoMaintenance

publiclyAccessible

securityGroupIds.

parameterGroupId

backupRetentionPeriod

autoMinorVersionUpgrade

engine

engineVersion

masterUserName

masterUserPassword

characterSet

collate

downloadLogExtension

databases

users

flavorRef

ID of the predefined hardware resource list

Specify the flavor ID.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 instance None

volume

Data Type Cardinality Parent Element Child Element(s)
Volume structures 1..1 instance size

type

size

Size of the data disk

Specify from 10 to 10240 (GB).

Data Type Cardinality Parent Element Child Element(s)
Integer 1..1 volume None

type

Disk type

M1

Data Type Cardinality Parent Element Child Element(s)
String 0..1 volume None

id

ID of the virtual database server
  • Only alphanumeric characters and hyphens can be used
  • The string must start with a letter
  • A hyphen cannot be used at the end of the string
  • Two or more consecutive hyphens cannot be used
  • Up to 63 characters

Default: random value

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

name

Name of the virtual database server
  • Only alphanumeric characters and hyphens can be used
  • The string must start with a letter
  • A hyphen cannot be used at the end of the string
  • Two or more consecutive hyphens cannot be used
  • Up to 255 characters

Default : Random value

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

description

Description of the virtual database server

Up to 1,024 characters

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

availabilityZone

Availability zone where the instance will be created

Data Type Cardinality Parent Element Child Element(s)
String 1..1 instance None

subnetGroupId

Subnet group where the virtual database server will be deployed to

The subnet group must contain a set of subnets that include at least two availability zones.

Default: default subnet group

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

multi

Multi-DB option

true | false
  • If multiAZ = false and multi = true, virtual database servers will be duplicated within the same availability zone.

Default value: false

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 instance None

multiAZ

Multi-availability zone option

true | false

Default value: false

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 instance None

port

Port number

1024 to 32767

Default value: 26500

Data Type Cardinality Parent Element Child Element(s)
Integer 0..1 instance None

preferredBackupWindow

Backup time slot

Format: hh24:mi-hh24:mi

Specify the time slot in which to perform daily backup, if automatic backup is enabled.

A time slot of at least 30 minutes must be specified.
  • East Japan (east-1): 17:00-03:00 UTC
  • West Japan (west-1): 17:00-03:00 UTC

Specify the time in UTC.

It is not possible to specify a time slot that overlaps with PreferredMaintenanceWindow.

Backup may take longer than 30 minutes in some conditions.

Default: A random 30-minute period within the 10-hour period prescribed for each region

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

preferredMaintenanceWindow

Specify the time slot in which to perform weekly maintenance.

Specify a time slot from 30 minutes to 23 hours 30 minutes.

A 30-minute period within the 10-hour period prescribed for each region will be randomly determined (the day of the week is also determined randomly).

Format:

ddd:hh24:mi-ddd:hh24:mi

Example: Sun:05:00-Sun:06:00

Value of day portion: Mon, Tue, Wed, Thu, Fri, Sat, Sun

Default: A random 30-minute period within the 10-hour period prescribed for each region (the day of the week is also determined randomly)

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

preferredRecoveryTime

Time to start automatic recovery

This parameter can only be specified if redundancy configuration is used for the virtual database server (this can only be specified if multi = true)

Data Type Cardinality Parent Element Child Element(s)
preferredRecoveryTime

Structure

0..1 instance applyImmediately

time

applyImmediately

If this parameter is defined, automatic recovery will be immediately performed when DB operation is degraded to a single node.

It is only possible to specify "applyImmediately" or "time" in the "preferredRecoveryTime" structure.

default value: true

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 preferredRecoveryTime None

time

If this parameter is defined, automatic recovery will be performed at the time specified in the parameter value.

It is only possible to specify "applyImmediately" or "time" in the "preferredRecoveryTime" structure.

Data Type Cardinality Parent Element Child Element(s)
String 0..1 preferredRecoveryTime None

autoMaintenance

Whether automatic maintenance is performed or not

true | false

Default value : true

true: Automatic maintenance is performed.

False: Automatic maintenance is not performed.

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 instance None

publiclyAccessible

Whether connection from the Internet is possible during deployment of the virtual database server

true | false

Default value: false

true: External Internet connections are permitted.

false: Only access from within the VPC is permitted.

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 instance None

securityGroupIds.

List of the VPC security groups

Default:default security group

Data Type Cardinality Parent Element Child Element(s)
String list 0..1 instance None

parameterGroupId

ID of the DB parameter group

Default: default DB parameter group

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

backupRetentionPeriod

Backup retention period (days)

Note: Automatic backup will not be performed when the value is 0.

0 to 10

Default value: 1

Data Type Cardinality Parent Element Child Element(s)
Integer 0..1 instance None

autoMinorVersionUpgrade

Automatic minor version upgrade

true | false

Default value: true

CAUTION:

This parameter has no effect.

To apply a minor version upgrade, execute API "Start/Restart the virtual database server" with the parameter "applyPatch" set to true.

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 instance None

engine

Name of the DB engine

enterprisepostgres or symfoware

Default value: enterprisepostgres

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

engineVersion

DB version

Default value: Latest version

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

masterUserName

Administrator user name
  • Length: 1 - 63 characters
  • Usable characters: Alphanumeric characters (lower case) and underscores
  • Other restrictions

    You can only use an alphabetic character (lowercase) or underscore as the first character

Default value: postgres

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

masterUserPassword

Administrator password

  • Alphanumeric characters and symbols other than ' (single quotation mark) can be used
  • Up to 1,024 characters.
Data Type Cardinality Parent Element Child Element(s)
String 1..1 instance None

characterSet

Character encoding

Default: UTF8

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

collate

Collating sequence

Default: C

Data Type Cardinality Parent Element Child Element(s)
String 0..1 instance None

downloadLogExtension

Log extension feature

true | false

Default value: false

true: Enables log extension. When this function is enabled, the disk capacity used for managing log information increases by approximately 10% of the DB log size.

false: Disables log extension.

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 instance None

database

List of the database structures to be created

If omitted, only the default "postgres" DB is created.

Data Type Cardinality Parent Element Child Element(s)
Database structures list 0..1 instance name

name

Database name
  • Specify alphanumeric characters and underscores only.
  • The first character must be a letter or an underscore.
  • Up to 63 characters
  • Even if you specify uppercase letters, they are created in lowercase letters.

    If you want to create it in uppercase letters, create it by creating a database virtual server and executing the CREATE DATABASE statement.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 database None
Restriction:

When creating a database name that uses upper-case letters, it is necessary to enclose the API database name in double quotes, but due to the specifications of the database it is not possible to use double quotes.

Therefore it is not possible to create database names using upper-case letters in the API.

users

List of the user structures to be created

If omitted, only the master user is created.

Data Type Cardinality Parent Element Child Element(s)
User structures list 0..1 instance name

password

(database)name

name

DB user name
  • Specify alphanumeric characters and underscores only.
  • The first character must be a letter or an underscore.
  • Up to 63 characters
  • Even if you specify uppercase letters, they are created in lowercase letters.

    If you want to create it in uppercase letters, create it by creating a database virtual server and executing the CREATE DATABASE statement.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 users None

password

User password
  • Up to 1,024 characters
Data Type Cardinality Parent Element Child Element(s)
String 1..1 users None

(database)name

Names of the databases that the user can log in to
  • Specify alphanumeric characters and underscores only.
  • The first character must be a letter or an underscore.
  • Up to 63 characters
Data Type Cardinality Parent Element Child Element(s)
String list 1..1 users None

Response Headers

Status

Returns the status of the request.

One of the following values will be returned.
400:
badRequest
401:
unauthorized
403:
forbidden
404:
itemNotFound
413:
overLimit
422:
unprocessableEntity
500:
instanceFault
501:
notImplemented
503:
serviceUnavailable
504:
gatewayTimeout
Data Type Cardinality
Int 1..1

Response Elements

instance

Data Type Cardinality Parent Element Child Element(s)
    None created

flavor

id

links

name

status

updated

volume

privateAddress

publicAddress

privateIp

publicIp

subPrivateIp

subPublicIp

port

characterSet

collate

autoMinorVersionUpgrade

availabilityZone

backupRetentionPeriod

engine

engineVersion

engineMinorVersion

masterUserName

multi

multiAZ

parameterGroupId

PendingModifiedValues

preferredBackupWindow

preferredMaintenanceWindow

publiclyAccessible

readReplicaDBInstanceIdentifiers

readReplicaSrcDBInstanceIdentifier

secondaryAvailabilityZone

replicaStatus

subnetGroupId

securityGroupIds

description

downloadLogExtension

readReplicaDBInstances

readReplicaSrcDBInstance

created

The creation date and time

Data Type Cardinality Parent Element Child Element(s)
Date   instance None

flavor

Virtual server specifications

Data Type Cardinality Parent Element Child Element(s)
Flavor structures   instance None

id

ID of the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   instance None

links

URI to the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   instance None

name

Name of the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   instance None

status

Status of the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   instance None

updated

Update date and time

Data Type Cardinality Parent Element Child Element(s)
Date   instance None

volume

Disk type and size of data storage

Data Type Cardinality Parent Element Child Element(s)
Volume structures   instance None

privateAddress

Internal address to the Virtual server where the virtual database server is running (FQDN format)

Data Type Cardinality Parent Element Child Element(s)
String   instance None

publicAddress

Global address to the Virtual server where the virtual database server is running (FQDN format)

Data Type Cardinality Parent Element Child Element(s)
String   instance None

privateIp

Internal IP address to the virtual database server

This is determined based on the subnet of the specified subnet group (CIDR).

Data Type Cardinality Parent Element Child Element(s)
String   instance None

publicIp

Global IP address of the virtual database server

This will not be displayed if publiclyAccessible is "false".

Data Type Cardinality Parent Element Child Element(s)
String   instance None

subPrivateIp

Internal IP address of a standby database instance

This is determined based on the subnet of the specified subnet group (CIDR).

Data Type Cardinality Parent Element Child Element(s)
String   instance None

subPublicIp

Global IP address of a standby database instance

This will not be displayed if publiclyAccessible is "false".

Data Type Cardinality Parent Element Child Element(s)
String   instance None

port

Port number

Data Type Cardinality Parent Element Child Element(s)
Integer   instance None

characterSet

Database encoding

Data Type Cardinality Parent Element Child Element(s)
String   instance None

collate

Database collating sequence

Data Type Cardinality Parent Element Child Element(s)
String   instance None

autoMinorVersionUpgrade

Flag to indicate whether to perform automatic minor version upgrade

Data Type Cardinality Parent Element Child Element(s)
Boolean   instance None

availabilityZone

Availability zone where the virtual database server is running

Data Type Cardinality Parent Element Child Element(s)
String   instance None

backupRetentionPeriod

Backup retention period

Data Type Cardinality Parent Element Child Element(s)
Integer   instance None

engine

Database type

Data Type Cardinality Parent Element Child Element(s)
String   instance None

engineVersion

Database version

Data Type Cardinality Parent Element Child Element(s)
String   instance None

engineMinorVersion

Database minor version

Data Type Cardinality Parent Element Child Element(s)
String   instance None

masterUserName

Administrator user name

Data Type Cardinality Parent Element Child Element(s)
String   instance None

multi

Multi-DB option

Data Type Cardinality Parent Element Child Element(s)
Boolean   instance None

multiAZ

Multi-availability zone option

Data Type Cardinality Parent Element Child Element(s)
Boolean   instance None

parameterGroupId

ID of the DB parameter group

Data Type Cardinality Parent Element Child Element(s)
String   instance None

pendingModifiedValues

List of parameters that will be updated at the next restart

Data Type Cardinality Parent Element Child Element(s)
PendingModifiedValues structures   instance None

preferredBackupWindow

Backup time slot

Data Type Cardinality Parent Element Child Element(s)
String   instance None

preferredMaintenanceWindow

Maintenance time slot

Data Type Cardinality Parent Element Child Element(s)
String   instance None

autoMaintenance

Whether automatic maintenance is performed or not

Data Type Cardinality Parent Element Child Element(s)
Boolean   instance None

publiclyAccessible

Whether connection from the Internet is possible during deployment of the virtual database server

true: Public IP address will be allocated.

Data Type Cardinality Parent Element Child Element(s)
Boolean   instance None

readReplicaDBInstanceIdentifiers

This parameter has been integrated into readReplicaDBInstances. It will always return an empty list.

Data Type Cardinality Parent Element Child Element(s)
String list   instance None

readReplicaSrcDBInstanceIdentifier

This parameter has been integrated into readReplicaSrcDBInstance. It will always return null.

Data Type Cardinality Parent Element Child Element(s)
String   instance None

secondaryAvailabilityZone

If the duplication option is "true":

Availability zone where the secondary virtual database server is running

Data Type Cardinality Parent Element Child Element(s)
String   instance None

replicaStatus

Status of the read replica

Replicating or Error

Data Type Cardinality Parent Element Child Element(s)
String   instance None

subnetGroupId

ID of DB subnet group

Data Type Cardinality Parent Element Child Element(s)
String   instance None

securityGroupIds

List of VPC security group IDs

Data Type Cardinality Parent Element Child Element(s)
String list   instance None

downloadLogExtension

Log extension feature

Data Type Cardinality Parent Element Child Element(s)
Boolean   instance None

readReplicaDBInstances

Read replica instance associated with this database virtual server

Operations performed on the read replica are reflected asynchronously.

Data Type Cardinality Parent Element Child Element(s)
ReadReplicaDBInstance Structure list   instance

region

tenantId

id

readReplicaSrcDBInstance

Source database virtual server

Operations performed on the source database virtual server are reflected asynchronously.

Data Type Cardinality Parent Element Child Element(s)
ReadReplicaSrcDBInstance Structure list   instance

region

tenantId

id

flavor

Data Type Cardinality Parent Element Child Element(s)
    None id

links

id

Flavor ID

Data Type Cardinality Parent Element Child Element(s)
String   flavor None

links

Flavor URI

Data Type Cardinality Parent Element Child Element(s)
String   flavor None

pendingModifiedValues

Data Type Cardinality Parent Element Child Element(s)
    None volume

backupRetentionPeriod

flavor

id

name

parameterGroupId

engineVersion

masterUserName

masterUserPassword

multi

multiAZ

port

engineMinorVersion

securityUpdate

volume

Disk type and size of data storage

Data Type Cardinality Parent Element Child Element(s)
Volume structures   PendingModifiedValues None

backupRetentionPeriod

Backup retention period

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

flavor

Virtual server specifications

Data Type Cardinality Parent Element Child Element(s)
Flavor   PendingModifiedValues None

id

ID of the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

name

Name of the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

parameterGroupId

ID of the DB parameter group

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

engineVersion

Database version

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

masterUserName

Master user name of the virtual database server

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

masterUserPassword

Password of the master user of the virtual database server

For security reasons, return values are masked as "***".

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

multi

Multi-DB option

Data Type Cardinality Parent Element Child Element(s)
Boolean   PendingModifiedValues None

multiAZ

Multi-availability zone option

Data Type Cardinality Parent Element Child Element(s)
Boolean   PendingModifiedValues None

port

Port number

Data Type Cardinality Parent Element Child Element(s)
Integer   PendingModifiedValues None

engineMinorVersion

Minor version of the database

When a minor version of the database is released, you can apply patches.

Data Type Cardinality Parent Element Child Element(s)
String   PendingModifiedValues None

securityUpdate

Presence/absence of security update

Patch application can be implemented when security update is released.

Data Type Cardinality Parent Element Child Element(s)
Boolean   PendingModifiedValues None

volume

Data Type Cardinality Parent Element Child Element(s)
    None size

type

size

Size of the data storage

Data Type Cardinality Parent Element Child Element(s)
String   volume None

type

Type of the data storage

Data Type Cardinality Parent Element Child Element(s)
String   volume None

region

Region of the read replica associated with this database virtual server

Data Type Cardinality Parent Element Child Element(s)
String   readReplicaDBInstances None

tenantId

Project ID of the read replica associated with this database virtual server

Data Type Cardinality Parent Element Child Element(s)
String   readReplicaDBInstances None

id

ID of the read replica associated with this database virtual server

Data Type Cardinality Parent Element Child Element(s)
String   readReplicaDBInstances None

region

Region of the source database virtual server

Data Type Cardinality Parent Element Child Element(s)
String   readReplicaSrcDBInstance None

tenantId

Project ID of the source database virtual server

Data Type Cardinality Parent Element Child Element(s)
String   readReplicaSrcDBInstance None

id

ID of the source database virtual server

Data Type Cardinality Parent Element Child Element(s)
String   readReplicaSrcDBInstance None

Example of Request


{
	"instance":{
		"flavorRef":"1",
		"volume":{
			"size":20,
			"type":"M1"
			}
		"name":"json-rack-instance",
		"availabilityZone":"jp-east-1a",
		"multi":true,
		"multiAZ":true,
		"subnetGroupId":"subnetGroup1",
		"port":1234,
		"preferredBackupWindow":"17:00-18:00",
		"preferredMaintenanceWindow":"Sun:19:00-Sun:20:00",
                "preferredRecoveryTime":{
                  "applyImmediately":true
                },
                "autoMaintenance":true,
        	"publiclyAccessible":true,
		"securityGroupIds":[
			{"securityGroupId":"secid1"},
			{"securityGroupId":"secid2"}
		],
		"parameterGroupId":"paramid1",
		"characterSet":"utf8",
		"collate":"C",
		"backupRetentionPeriod":10,
		"autoMinorVersionUpgrade":true,
		"engine":"symfoware",
		"engineVersion":"12.1",
		"masterUserPassword":"***"
		"databases": [
			{
				"name":"sampledb",
			},
			{
				"name":"nextround"
			}
		],
		"users": [
			{
				"databases":[
					{
					"name":"sampledb"
					}
				],
				"name":"demouser",
				"password":"demopassword"
			}
		]
	}
}       
     

Example of Response


{
	"instance":{
		"created":"2013-03-18T19:09:17",
		"flavor":{
			"id":"1",
			"links":[
				{
				"href":"http://database.{region-name}.tps5.fujitsu.com/v1.0/1234/flavors/1",
				"rel":"self"
				}
			]
		},
		"id":"44b277eb-39be-4921-be31-3d61b43651d7",
		"links":[
			{
				"href":"http://database.{region-name}.tps5.fujitsu.com/v1.0/1234/instances/44b277eb-39be-4921-be31-3d61b43651d7",
				"rel":"self"
			},
		],
		"status":"BUILD"
		"volume":{
			"size":20,
			"type":"M1"
		}
		"name":"json_rack_instance",
		"privateAddress":"fujitsu.s5.dbaas.a23w4e5r6tg7yuhjik",
		"privateIp":"10.125.52.214",
		"port":26500,
		"characterSet":"UTF-8",
		"collate":"C",
		"autoMinorVersionUpgrade":true,
		"availabilityZone":"az-1",
		"backupRetentionPeriod":10,
		"engine":"enterprisepostgres",
		"engineVersion":"9.6",
		"engineMinorVersion":"0",
		"multi":true,
		"multiAZ":true,
		"parameterGroupId":"paramid1",
		"preferredBackupWindow":17:00-18:00,
		"preferredMaintenanceWindow":Sun:19:00-Sun:20:00,
		"preferredRecoveryTime":{
			"applyImmediately":true, 
			"time":none, 
		},
		"autoMaintenance":true,
		"downloadLogExtension":false,
		"publiclyAccessible":true,
		"subnetGroupId":"subnetGroup1",
		"securityGroupIds":[
			{"securityGroupId":"secid1"},
			{"securityGroupId":"secid2"}
		],
		"readReplicaDBInstances": [],
		"readReplicaSrcDBInstance": {},
		"replicaStatus": null,
		"readReplicaDBInstanceIdentifiers": [],
		"readReplicaSrcDBInstanceIdentifier": null
	}
}