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

Creates a read replica virtual database server.

Note:

The database virtual server that is used as the source for a reference replica database virtual server must meet the following conditions:

  • "multi" is "true"
  • backupRetentionPeriod is 1 or more
  • "engine" is "enterprisepostgres"
Note:

Up until November 2018, POST /v1.0/{tenantId}/instances/{instanceId} was used as the API for creating reference replicas, however do not use this API as it is now deprecated. Use this API instead.

Request URI

{tenantID}

Project ID of the owner of the instance

Data Type Cardinality
String 1..1

Request Parameters

action

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

readreplica

A read replica instance starts if this parameter is defined.

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

instance

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

volume

id

name

description

availabilityZone

subnetGroupId

port

preferredMaintenanceWindow

preferredRecoveryTime

autoMaintenance

publiclyAccessible

securityGroupIds

parameterGroupId

downloadLogExtension

readReplicaSrcDBInstance

flavorRef

ID of the predefined hardware resource list

Specify an existing flavor ID

Default value: Value of the source database virtual server

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

volume

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

type

size

Size of the data disk

10 to 10240 (GB)

Default value: Value of the source database virtual server

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

type

Disk type

M1

Default value: Value of the source database virtual server

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 value: Value of the source database virtual server. However, if the value is the same, 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 value: Value of the source database virtual server

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

description

Description of the database virtual server

Up to 1,024 characters.

Default value: Value of the source database virtual server

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

When using the multi-availability zone option, the subnet group must contain a set of subnets that include at least two availability zones.

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

port

Port number

1024 to 32767

Default value: Value of the source database virtual server

Data Type Cardinality Parent Element Child Element(s)
Integer 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.

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 value: Value of the source database virtual server

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

preferredRecoveryTime

Time to start automatic recovery

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 performed immediately when an error occurs on the reference replica database virtual server.

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

Default value: Value of the source database virtual server

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 either "applyImmediately" or "time" in the "preferredRecoveryTime" structure.

Default value: Value of the source database virtual server

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

autoMaintenance

Whether automatic maintenance is performed or not

true | false

true: Automatic maintenance is performed.

False: Automatic maintenance is not performed.

Default value: Value of the source database virtual server

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

true: External Internet connections are permitted.

false: Only access from within the VPC is permitted.

Default value: Value of the source database virtual server

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

securityGroupIds.

Name of the VPC security group

VPC security group list

Default value: default security group

Note: Specify the VPC security group.

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

parameterGroupId

Parameter group

Default value: default parameter group

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

downloadLogExtension

Log extension feature

true | 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.

Default value : Value of the source database virtual server

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

readReplicaSrcDBInstance

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

region

tenantId

id

region

Region of the source database virtual server

Default value: Region where the API is executed

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

tenantId

Project ID of the source database virtual server

Default value: ID of the project where the API is executed

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

Id

ID of the source database virtual server

Data Type Cardinality Parent Element Child Element(s)
String 1..1 readReplicaSrcDBInstance 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

port

characterSet

collate

autoMinorVersionUpgrade

availabilityZone

backupRetentionPeriod

engine

engineVersion

engineMinorVersion

masterUserName

parameterGroupId

pendingModifiedValues

preferredBackupWindow

preferredMaintenanceWindow

publiclyAccessible

readReplicaDBInstanceIdentifiers

readReplicaSrcDBInstanceIdentifier

replicaStatus

subnetGroupId

securityGroupIds

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

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

publicIp

Global IP address of the virtual database server

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

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

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

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

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

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


{
  "action":{"readreplica":""}, 
  "instance": {
    "availabilityZone": "jp-west-2a",
    "name": "replica-instance-name",
    "subnetGroupId": "replica-subnetgroup-id",
    "securityGroupIds": [{"securityGroupId": "secid1"}],
    "id": "replica-instance-id",
    "readReplicaSrcDBInstance": {
      "region": "jp-east-1",
      "tenantId": "44b277eb-39be-4921-be31-3d61b43651d7",
      "id": "test-instance-id"
    }
  }
}

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",
    "address": "fujitsu.s5.dbaas.a23w4e5r6tg7yuhjik",
    "ip":"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",
    "multiAZ" : true,
    "parameterGroupId" : "paramid1",
    "preferredBackupWindow" : 17:00-18:00,
    "preferredMaintenanceWindow" : Sun:19:00-Sun:20:00,
    "preferredRecoveryTime" : {"applyImmediately" : true, "time" : none},
    "downloadLogExtension": false,
    "publiclyAccessible" : true,
    "subnetGroupId " : "subnetGroup1",
    "securityGroupIds." : [{"securityGroupId" : "secid1"}, {"securityGroupId" : "secid2"}],
    "readReplicaDBInstances": [],
    "readReplicaSrcDBInstance": {"region": "jp-east-1", "tenantId": "29320d5e-dd29-425c-b386-3cbb2754ad03", "id": "source-dbinstance"},
    "replicaStatus": "Replicating",
    "readReplicaDBInstanceIdentifiers": [],
    "readReplicaSrcDBInstanceIdentifier": null
   }
}