createCloudMysqlInstance
- Print
- PDF
createCloudMysqlInstance
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Available in VPC
Create a Cloud DB for MySQL instance.Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
GET, POST | /createCloudMysqlInstance |
Request headers
For headers common to all Cloud DB for MySQL (VPC) APIs, see Cloud DB for MySQL (VPC) request headers.
Request parameter
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
regionCode | String | Optional | Region code
|
vpcNo | String | Required | Number of VPC to create the Cloud DB for MySQL instance in
|
cloudMysqlImageProductCode | String | Optional | Cloud DB for MySQL image product code
|
cloudMysqlProductCode | String | Optional | Cloud DB for MySQL product code
|
dataStorageTypeCode | String | Optional | Data storage type code
|
isHa | Boolean | Optional | High availability status
|
isMultiZone | Boolean | Conditional | Multi-zone status
|
isStorageEncryption | Boolean | Optional | Data storage encryption application status
|
isBackup | Boolean | Optional | Whether MySQL backup is enabled
|
backupFileRetentionPeriod | Integer | Optional | Backup file retention period (days)
|
backupTime | String | Conditional | Set backup time
|
isAutomaticBackup | Boolean | Optional | Whether to set the backup time automatically
|
cloudMysqlServiceName | String | Required | Name of the Cloud DB for MySQL service to create
|
cloudMysqlServerNamePrefix | String | Required | Prefix for the Cloud DB for MySQL server name to create
|
cloudMysqlUserName | String | Required | DB user account ID
|
cloudMysqlUserPassword | String | Required | DB user account password
|
hostIp | String | Required | IP addresses to access MySQL Server
|
cloudMysqlPort | Integer | Optional | TCP port number to access the Cloud DB for MySQL instance
|
cloudMysqlDatabaseName | String | Required | DB name to be created by default in the Cloud DB for MySQL instance
|
subnetNo | String | Required | Subnet number of the default network interface to be used in the Cloud DB for MySQL instance
|
standbyMasterSubnetNo | String | Conditional | Subnet number of the standby master server
|
isPrivateSubDomain | Boolean | Optional | Whether to use private sub domains
|
privateSubDomainPrefix | String | Conditional | Enter the sub domain to be added to the private domain
|
engineVersionCode | String | Conditional | DB engine version
|
isDeleteProtection | Boolean | Optional | Cluster termination protection status
|
responseFormatType | String | Optional | Format of the response result
|
Request example
The following is a sample request.
curl --location --request GET 'https://ncloud.apigw.ntruss.com/vmysql/v2/createCloudMysqlInstance
?regionCode=KR
&vpcNo=****83
&cloudMysqlImageProductCode=SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050
&cloudMysqlProductCode=SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002
&dataStorageTypeCode=SSD
&isHa=true
&isMultiZone=true
&isStorageEncryption=true
&isBackup=true
&backupFileRetentionPeriod=10
&backupTime=02:00
&isAutomaticBackup=false
&cloudMysqlServiceName=test-****
&cloudMysqlServerNamePrefix=test-****
&cloudMysqlUserName=test-****
&cloudMysqlUserPassword=********
&hostIp=192.168.0.%
&cloudMysqlPort=13306
&cloudMysqlDatabaseName=test-****
&subnetNo=****91
&standbyMasterSubnetNo=****93'
--header 'x-ncp-apigw-timestamp: {Timestamp}'
--header 'x-ncp-iam-access-key: {Access Key}'
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
The following describes the response format.
Response body
See CloudMysqlInstanceList for the response body.
Response status codes
For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.
Response example
The following is a sample example.
- If
responseFormatType=json
{
"createCloudMysqlInstanceResponse": {
"totalRows": 1,
"cloudMysqlInstanceList": [
{
"cloudMysqlInstanceNo": "****890",
"cloudMysqlServiceName": "test-****",
"cloudMysqlInstanceStatusName": "creating",
"cloudMysqlInstanceStatus": {
"code": "INIT",
"codeName": "CLOUD DATABASE(VPC) Init State"
},
"cloudMysqlInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Creat OP"
},
"cloudMysqlImageProductCode": "SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050",
"engineVersion": "MYSQL8.0.25",
"license": {
"code": "GPL",
"codeName": "General Public License"
},
"cloudMysqlPort": 13306,
"isHa": true,
"isMultiZone": true,
"isBackup": true,
"backupFileRetentionPeriod": 10,
"backupTime": "02:00",
"generationCode": "G2",
"createDate": "2024-05-23T11:25:09+0900",
"accessControlGroupNoList": [],
"cloudMysqlConfigList": [],
"cloudMysqlServerInstanceList": [
{
"cloudMysqlServerName": "test-****-001-e04",
"cloudMysqlServerRole": {
"code": "M",
"codeName": "Master"
},
"cloudMysqlServerInstanceStatusName": "creating",
"cloudMysqlServerInstanceStatus": {
"code": "PEND",
"codeName": "CLOUD DATABASE(VPC) Server Pending State"
},
"cloudMysqlServerInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Server Create OP"
},
"cloudMysqlProductCode": "SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002",
"regionCode": "KR",
"zoneCode": "KR-1",
"vpcNo": "****83",
"subnetNo": "****91",
"isPublicSubnet": true,
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": true,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 8589934592,
"createDate": "2024-05-23T11:25:09+0900"
},
{
"cloudMysqlServerName": "test-****-002-e05",
"cloudMysqlServerRole": {
"code": "H",
"codeName": "Standby Master"
},
"cloudMysqlServerInstanceStatusName": "creating",
"cloudMysqlServerInstanceStatus": {
"code": "PEND",
"codeName": "CLOUD DATABASE(VPC) Server Pending State"
},
"cloudMysqlServerInstanceOperation": {
"code": "CREAT",
"codeName": "CLOUD DATABASE(VPC) Server Create OP"
},
"cloudMysqlProductCode": "SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002",
"regionCode": "KR",
"zoneCode": "KR-2",
"vpcNo": "****83",
"subnetNo": "****93",
"isPublicSubnet": true,
"dataStorageType": {
"code": "SSD",
"codeName": "SSD"
},
"isStorageEncryption": true,
"dataStorageSize": 10737418240,
"cpuCount": 2,
"memorySize": 8589934592,
"createDate": "2024-05-23T11:25:09+0900"
}
]
}
],
"requestId": "a3d093cf-****-****-****-394da22ea7f8",
"returnCode": "0",
"returnMessage": "success"
}
}
- If
responseFormatType=xml
(default)
<?xml version="1.0" encoding="UTF-8"?>
<createCloudMysqlInstanceResponse>
<requestId>a3d093cf-****-****-****-394da22ea7f8</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<cloudMysqlInstanceList>
<cloudMysqlInstance>
<cloudMysqlInstanceNo>****890</cloudMysqlInstanceNo>
<cloudMysqlServiceName>test-****</cloudMysqlServiceName>
<cloudMysqlInstanceStatusName>creating</cloudMysqlInstanceStatusName>
<cloudMysqlInstanceStatus>
<code>INIT</code>
<codeName>CLOUD DATABASE(VPC) Init State</codeName>
</cloudMysqlInstanceStatus>
<cloudMysqlInstanceOperation>
<code>CREAT</code>
<codeName>CLOUD DATABASE(VPC) Creat OP</codeName>
</cloudMysqlInstanceOperation>
<cloudMysqlImageProductCode>SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050</cloudMysqlImageProductCode>
<engineVersion>MYSQL8.0.25</engineVersion>
<license>
<code>GPL</code>
<codeName>General Public License</codeName>
</license>
<cloudMysqlPort>13306</cloudMysqlPort>
<isHa>true</isHa>
<isMultiZone>true</isMultiZone>
<isBackup>true</isBackup>
<backupFileRetentionPeriod>10</backupFileRetentionPeriod>
<backupTime>02:00</backupTime>
<generationCode>G2</generationCode>
<createDate>2024-05-23T11:25:09+0900</createDate>
<accessControlGroupNoList />
<cloudMysqlConfigList />
<cloudMysqlServerInstanceList>
<cloudMysqlServerInstance>
<cloudMysqlServerName>test-****-001-4y1v</cloudMysqlServerName>
<cloudMysqlServerRole>
<code>M</code>
<codeName>Master</codeName>
</cloudMysqlServerRole>
<cloudMysqlServerInstanceStatusName>creating</cloudMysqlServerInstanceStatusName>
<cloudMysqlServerInstanceStatus>
<code>PEND</code>
<codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
</cloudMysqlServerInstanceStatus>
<cloudMysqlServerInstanceOperation>
<code>CREAT</code>
<codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
</cloudMysqlServerInstanceOperation>
<cloudMysqlProductCode>SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002</cloudMysqlProductCode>
<regionCode>KR</regionCode>
<zoneCode>KR-1</zoneCode>
<vpcNo>****83</vpcNo>
<subnetNo>****91</subnetNo>
<isPublicSubnet>true</isPublicSubnet>
<dataStorageType>
<code>SSD</code>
<codeName>SSD</codeName>
</dataStorageType>
<isStorageEncryption>true</isStorageEncryption>
<dataStorageSize>10737418240</dataStorageSize>
<cpuCount>2</cpuCount>
<memorySize>8589934592</memorySize>
<createDate>2024-05-23T11:25:09+0900</createDate>
</cloudMysqlServerInstance>
<cloudMysqlServerInstance>
<cloudMysqlServerName>test-****-002-e05</cloudMysqlServerName>
<cloudMysqlServerRole>
<code>H</code>
<codeName>Standby Master</codeName>
</cloudMysqlServerRole>
<cloudMysqlServerInstanceStatusName>creating</cloudMysqlServerInstanceStatusName>
<cloudMysqlServerInstanceStatus>
<code>PEND</code>
<codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
</cloudMysqlServerInstanceStatus>
<cloudMysqlServerInstanceOperation>
<code>CREAT</code>
<codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
</cloudMysqlServerInstanceOperation>
<cloudMysqlProductCode>SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002</cloudMysqlProductCode>
<regionCode>KR</regionCode>
<zoneCode>KR-2</zoneCode>
<vpcNo>****83</vpcNo>
<subnetNo>****93</subnetNo>
<isPublicSubnet>true</isPublicSubnet>
<dataStorageType>
<code>SSD</code>
<codeName>SSD</codeName>
</dataStorageType>
<isStorageEncryption>true</isStorageEncryption>
<dataStorageSize>10737418240</dataStorageSize>
<cpuCount>2</cpuCount>
<memorySize>8589934592</memorySize>
<createDate>2024-05-23T11:25:09+0900</createDate>
</cloudMysqlServerInstance>
</cloudMysqlServerInstanceList>
</cloudMysqlInstance>
</cloudMysqlInstanceList>
</createCloudMysqlInstanceResponse>
Was this article helpful?