--- title: "createCloudMysqlInstance" slug: "database-vmysql-createcloudmysqlinstance" tags: ["Cloud DB for MySQL"] updated: 2026-09-17T10:05:54Z published: 2026-09-17T10:05:54Z canonical: "api.ncloud-docs.com/database-vmysql-createcloudmysqlinstance" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # createCloudMysqlInstance Available in VPC Create a Cloud DB for MySQL instance. ## Request This section describes the request format. The method and URI are as follows: | Method | URI | | --- | --- | | GET \| POST | /vmysql/v2/createCloudMysqlInstance | Note This guide is based on the GET method. POST method call tests can be performed through Swagger in the API Gateway service of the NAVER Cloud Platform console. ### Request headers For information about the headers common to all Cloud DB for MySQL (VPC) APIs, see [Cloud DB for MySQL (VPC) request headers](/docs/en/database-vmysql#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94). ### Request query parameters You can use the following query parameters with your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `regionCode` | String | Optional | Region code - Region code of the Cloud DB for MySQL instance to create. - See [getRegionList](/docs/en/compute-vserver-server-common-getregionlist). - First Region of the `getRegionList` query result (default). | | `vpcNo` | String | Required | Number of VPC to create the Cloud DB for MySQL instance in - See [getCloudMysqlTargetVpcList](/docs/en/database-vmysql-getcloudmysqltargetvpclist). | | `cloudMysqlImageProductCode` | String | Optional | Cloud DB for MySQL image product code - See [getCloudMysqlImageProductList](/docs/en/database-vmysql-getcloudmysqlimageproductlist). - Automatically generated by NAVER Cloud Platform (default) | | `cloudMysqlProductCode` | String | Optional | Cloud DB for MySQL product code - Determine the server specification for the instance to create.Cloud DB for MySQL - See [getCloudMysqlProductList](/docs/en/database-vmysql-getcloudmysqlproductlist). - Minimum specification (default) - Minimum specification is based on 1. memory and 2. CPU. | | `dataStorageTypeCode` | String | Optional | Data storage type code - Unable to change data storage type after installation - `SSD` \| `HDD` \| `CB2` - Default value changes depending on generationCode of `cloudMysqlImageProductCode`. | | `isHa` | Boolean | Optional | High availability status - `true` (default) \| `false` - Selecting `true` (high availability) creates two servers, including a standby master server, and incurs additional fees. - If `false`, `isMultiZone` and `standbyMasterSubnetNo` parameters are not used. | | `isMultiZone` | Boolean | Conditional | Multi-zone status - `true` \| `false` (default) - Required if the high availability status (`isHa`) is `true` - If `true`, provide the master and standby master servers in separate zones to provide higher availability. | | `isStorageEncryption` | Boolean | Optional | Data storage encryption application status (to be applied later) - `true` \| `false` (default) - Encryption can be applied only if the high availability status (`isHa`) is `true`. - When encryption is applied, the DB data is encrypted and saved in the storage. - You can't change the storage encryption settings after creating a Cloud DB for MySQL instance. | | `isBackup` | Boolean | Optional | Whether MySQL backup is enabled - `true` (default) \| `false` - If the high availability status (`isHa`) is `true`, the backup status (isBackup) is fixed to `true`. | | `backupFileRetentionPeriod` | Integer | Optional | Backup file retention period (days) - 1 (default) - Only backup for tables created with the InnoDB engine is supported. - Backup is performed every day, and the backup file is stored in a separate backup storage. | | `backupTime` | String | Conditional | Set backup time. - `true` (default) \| `false` - Required if the backup status (`isBackup`) is `true` and automatic backup status (`isAutomaticBackup`) is `false` - e.g., 01:15 (Backup starts between the selected time + 15 minutes) | | `isAutomaticBackup` | Boolean | Optional | Whether to set the backup time automatically - `true` (default) \| `false` - If set to `true`, `backupTime` can't be entered. | | `cloudMysqlServiceName` | String | Required | Name of the Cloud DB for MySQL service to create - 3 to 30 characters, including English letters, Korean letters, numbers, and special character "-" | | `cloudMysqlServerNamePrefix` | String | Required | Prefix for the Cloud DB for MySQL server name to create - 3 to 20 characters, including English letters, numbers, and the special character "-", and must begin with an English letter and end with an English letter or number. - A 3-digit number is automatically generated after the prefix, with additional random text to prevent hostname duplication. - e.g., if the prefix is test-123: `test-123-001-4y1v` | | `cloudMysqlUserName` | String | Required | DB user account ID - Enter between 3 and 16 characters using a combination of English letters, numbers, and special characters "-" and "_". - The string must start with an English letter. - Predefined reserved words can't be used. | | `cloudMysqlUserPassword` | String | Required | DB user account password - Enter between 8 and 20 characters containing at least one English letter, number, and special character. - Special characters ` & + \ " ' / and spaces can't be used. - If the password plugin is activated, the policy set by the plugin must also be satisfied. | | `hostIp` | String | Required | IP address to access MySQL Server - Allow access to all: % - Allow access to specific IPs (e.g., 1.1.1.1). - Allow access to an IP range (e.g., 1.1.1.%). - Allow CIDR (e.g., 1.1.1.0/24). - When using the GET method, % must be URL-encoded as %25. | | `cloudMysqlPort` | Integer | Optional | TCP port number to access the Cloud DB for MySQL instance - 3306 (default) - Specified range: 10000-20000 - The port number can't be changed after it is specified. | | `cloudMysqlDatabaseName` | String | Required | DB name to be created by default in the Cloud DB for MySQL instance - 1 to 30 characters, including English letters, numbers, and special characters "\ _ , -", and must begin with an English letter. | | `subnetNo` | String | Required | Subnet number of the default network interface to be used in the Cloud DB for MySQL instance - See [getCloudMysqlTargetSubnetList](/docs/en/database-vmysql-getcloudmysqltargetsubnetlist). - Subscription to public domains can only be done in a DB server created in public subnet. - Subnet migrations are not available after creating the Cloud DB for MySQL instance. | | `standbyMasterSubnetNo` | String | Conditional | Subnet number of the standby master server - Must be entered for multi-zone Cloud DB for MySQL. - It must be in a different zone from the master server's subnet, but the public or private status must match. - See [getCloudMysqlTargetSubnetList](/docs/en/database-vmysql-getcloudmysqltargetsubnetlist). | | `isPrivateSubDomain` | Boolean | Optional | Whether to use private sub domains - `true` \| `false` - If set to `true`, `privateSubDomainPrefix` can be specified. | | `privateSubDomainPrefix` | String | Conditional | Enter the sub domain to be added to the private domain. - 3 to 15 characters, including letters, numbers, and the special character "-", and must begin with an English letter and end with an English letter or number. - Required if the private sub domain usage status (`isPrivateSubDomain`) is `true` - The same sub domain policy will be added when adding a slave or recovery. | | `engineVersionCode` | String | Conditional | DB engine version - See [getCloudMysqlImageProductList](/docs/en/database-vmysql-getcloudmysqlimageproductlist). - If not entered, it is created with the latest version currently available. | | `isDeleteProtection` | Boolean | Optional | Cluster termination protection status - `true` \| `false` (default) - `true`: Cluster termination unavailable - `false`: Cluster termination available | | `responseFormatType` | String | Optional | Format of the response result - `xml` (default) \| `json` | ### Request example The request example is as follows: ``` 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 This section describes the response format. ### Response body See [CloudMysqlInstanceList](/docs/en/common-vapidatatype-cloudmysqlinstancelist) for the response body. ### Response status codes For information about the HTTP status codes common to all Cloud DB for MySQL (VPC) APIs, see [Cloud DB for MySQL (VPC) response status codes](/docs/en/database-vmysql#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C). ### Response example The response example is as follows: - 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) ``` a3d093cf-****-****-****-394da22ea7f8 0 success 1 ****890 test-**** creating INIT CLOUD DATABASE(VPC) Init State CREAT CLOUD DATABASE(VPC) Creat OP SW.VDBAS.DBAAS.LNX64.CNTOS.0708.MYSQL.8025.B050 MYSQL8.0.25 GPL General Public License 13306 true true true 10 02:00 G2 2024-05-23T11:25:09+0900 test-****-001-4y1v M Master creating PEND CLOUD DATABASE(VPC) Server Pending State CREAT CLOUD DATABASE(VPC) Server Create OP SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002 KR KR-1 ****83 ****91 true SSD SSD true 10737418240 2 8589934592 2024-05-23T11:25:09+0900 test-****-002-e05 H Standby Master creating PEND CLOUD DATABASE(VPC) Server Pending State CREAT CLOUD DATABASE(VPC) Server Create OP SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002 KR KR-2 ****83 ****93 true SSD SSD true 10737418240 2 8589934592 2024-05-23T11:25:09+0900 ```