--- title: "createCloudMysqlSlaveInstance" slug: "database-vmysql-createcloudmysqlslaveinstance" updated: 2026-09-17T09:57:47Z published: 2026-09-17T09:57:47Z canonical: "api.ncloud-docs.com/database-vmysql-createcloudmysqlslaveinstance" --- > ## 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. # createCloudMysqlSlaveInstance VPC環境で利用できます。 Cloud DB for MySQLインスタンスに Slaveサーバインスタンスを追加します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | GET \| POST | /vmysql/v2/createCloudMysqlSlaveInstance | ### リクエストヘッダ Cloud DB for MySQL (VPC) APIで共通して使用されるヘッダの詳細は、[Cloud DB for MySQL (VPC)のリクエストヘッダ](/docs/ja/database-vmysql#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストクエリパラメータ リクエストクエリパラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `regionCode` | String | Optional | リージョンコード - Slaveサーバインスタンス追加対象の Cloud DB for MySQLインスタンスのリージョンコード - [getRegionList](/docs/ja/compute-vserver-server-common-getregionlist)を参照 - `getRegionList`照会結果の最初のリージョン(デフォルト) | | `cloudMysqlInstanceNo` | String | Required | Cloud DB for MySQLインスタンス番号 - [getCloudMysqlInstanceList](/docs/ja/database-vmysql-getcloudmysqlinstancelist)を参照 | | `subnetNo` | String | Conditional | Cloud DB for MySQLインスタンスで使用する基本ネットワークインターフェースの Subnet番号 - [getCloudMysqlTargetSubnetList](/docs/ja/database-vmysql-getcloudmysqltargetsubnetlist)を参照 - Multi ZoneのCloudDB for MySQLの場合、必ず入力 - Multi Zoneではない Cloud DB for MySQLの場合、`subnetNo`の入力は受けず、既存の`subnetNo`に作成される - Publicドメインは Public Subnetに作成された DBサーバでのみ申し込み可能 - Cloud DB for MySQLインスタンス作成後に Subnetの移転はできない | | `responseFormatType` | String | Optional | レスポンス結果の形式 - `xml`(デフォルト) \| `json` | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location --request GET 'https://ncloud.apigw.ntruss.com/vmysql/v2/createCloudMysqlSlaveInstance ?regionCode=KR &cloudMysqlInstanceNo=****890 &subnetNo=****91' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスボディ レスポンスボディの詳細は、[CloudMysqlInstanceList](/docs/ja/common-vapidatatype-cloudmysqlinstancelist)をご参照ください。 ### レスポンスステータスコード Cloud DB for MySQL (VPC) APIで共通して使用されるレスポンスステータスコードの詳細は、[Cloud DB for MySQL (VPC)のレスポンスステータスコード](/docs/ja/database-vmysql#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 - `responseFormatType=json`の場合 ``` { "createCloudMysqlSlaveInstanceResponse": { "totalRows": 1, "cloudMysqlInstanceList": [ { "cloudMysqlInstanceNo": "****890", "cloudMysqlServiceName": "test-****", "cloudMysqlInstanceStatusName": "creating", "cloudMysqlInstanceStatus": { "code": "CREAT", "codeName": "CLOUD DATABASE(VPC) Created State" }, "cloudMysqlInstanceOperation": { "code": "NULL", "codeName": "CLOUD DATABASE(VPC) Null 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": [ "****58" ], "cloudMysqlConfigList": [], "cloudMysqlServerInstanceList": [ { "cloudMysqlServerInstanceNo": "****891", "cloudMysqlServerName": "test-****-001-e04", "cloudMysqlServerRole": { "code": "M", "codeName": "Master" }, "cloudMysqlServerInstanceStatusName": "running", "cloudMysqlServerInstanceStatus": { "code": "RUN", "codeName": "CLOUD DATABASE(VPC) Server Running State" }, "cloudMysqlServerInstanceOperation": { "code": "NOOP", "codeName": "CLOUD DATABASE(VPC) Server Null OP" }, "cloudMysqlProductCode": "SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002", "regionCode": "KR", "zoneCode": "KR-1", "vpcNo": "****83", "subnetNo": "****91", "isPublicSubnet": true, "publicDomain": "db-****.vpc-pub-cdb.ntruss.com", "privateDomain": "db-****.vpc-cdb.ntruss.com", "privateIp": "***.***.***.***", "dataStorageType": { "code": "SSD", "codeName": "SSD" }, "isStorageEncryption": true, "dataStorageSize": 10737418240, "usedDataStorageSize": 2791728640, "cpuCount": 2, "memorySize": 8589934592, "uptime": "2024-05-23T11:34:39+0900", "createDate": "2024-05-23T11:25:09+0900" }, { "cloudMysqlServerInstanceNo": "****897", "cloudMysqlServerName": "test-****-002-e05", "cloudMysqlServerRole": { "code": "H", "codeName": "Standby Master" }, "cloudMysqlServerInstanceStatusName": "running", "cloudMysqlServerInstanceStatus": { "code": "RUN", "codeName": "CLOUD DATABASE(VPC) Server Running State" }, "cloudMysqlServerInstanceOperation": { "code": "NOOP", "codeName": "CLOUD DATABASE(VPC) Server Null OP" }, "cloudMysqlProductCode": "SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002", "regionCode": "KR", "zoneCode": "KR-2", "vpcNo": "***83", "subnetNo": "****93", "isPublicSubnet": true, "privateDomain": "db-****.vpc-cdb.ntruss.com", "privateIp": "***.***.***.***", "dataStorageType": { "code": "SSD", "codeName": "SSD" }, "isStorageEncryption": true, "dataStorageSize": 10737418240, "usedDataStorageSize": 2791728640, "cpuCount": 2, "memorySize": 8589934592, "uptime": "2024-05-23T11:34:05+0900", "createDate": "2024-05-23T11:25:09+0900" }, { "cloudMysqlServerName": "test-****-003-e06", "cloudMysqlServerRole": { "code": "S", "codeName": "Slave" }, "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, "privateDomain": "db-****.vpc-cdb.ntruss.com", "privateIp": "***.***.***.***", "dataStorageType": { "code": "SSD", "codeName": "SSD" }, "isStorageEncryption": true, "dataStorageSize": 10737418240, "cpuCount": 2, "memorySize": 8589934592, "createDate": "2024-05-24T10:30:51+0900" } ] } ], "requestId": "925c7fde-****-****-****-5ae786bd1428", "returnCode": "0", "returnMessage": "success" } } ``` - `responseFormatType=xml`(デフォルト)の場合 ``` 925c7fde-****-****-****-5ae786bd1428 0 success 1 ****890 test-**** creating CREAT CLOUD DATABASE(VPC) Created State NULL CLOUD DATABASE(VPC) Null 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 ****58 ****891 test-****-001-e04 M Master running RUN CLOUD DATABASE(VPC) Server Running State NOOP CLOUD DATABASE(VPC) Server Null OP SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002 KR KR-1 ****83 ****91 true db-****.vpc-pub-cdb.ntruss.com db-****.vpc-cdb.ntruss.com ***.***.***.*** SSD SSD true 10737418240 2791728640 2 8589934592 2024-05-23T11:34:39+0900 2024-05-23T11:25:09+0900 ****897 test-****-002-e05 H Standby Master running RUN CLOUD DATABASE(VPC) Server Running State NOOP CLOUD DATABASE(VPC) Server Null OP SVR.VDBAS.STAND.C002.M008.NET.HDD.B050.G002 KR KR-2 ****83 ****93 true db-****.vpc-cdb.ntruss.com ***.***.***.*** SSD SSD true 10737418240 2791728640 2 8589934592 2024-05-23T11:34:05+0900 2024-05-23T11:25:09+0900 test-****-003-e06 S Slave 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 db-****.vpc-cdb.ntruss.com ***.***.***.*** SSD SSD true 10737418240 2 8589934592 2024-05-24T10:30:51+0900 ```