createCloudMysqlInstance
- Print
- PDF
createCloudMysqlInstance
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Available in VPC
Cloud DB for MySQL instance is generated.
Commands
The text of the command is as follows:
ncloud vmysql createCloudMysqlInstance [regionCode] [vpcNo] [cloudMysqlImageProductCode] [cloudMysqlProductCode] [dataStorageTypeCode] [isHa] [isMultiZone] [isStorageEncryption] [isBackup] [backupFileRetentionPeriod] [backupTime] [isAutomaticBackup] [cloudMysqlServiceName] [cloudMysqlServerNamePrefix] [cloudMysqlUserName] [cloudMysqlUserPassword] [hostIp] [cloudMysqlPort] [cloudMysqlDatabaseName] [subnetNo] [standbyMasterSubnetNo] [isPrivateSubDomain] [privateSubDomainPrefix] [output]
Parameter
The following is a description on parameters.
Parameter | Type | Requirement Status | Description | Restrictions |
---|---|---|---|---|
regionCode | String | N | Region code for which Cloud DB for MySQL instance exists - Can be obtained through getRegionList action - default: the first region of the getRegionList search results is selected. | - |
vpcNo | String | Y | VPC number - Can be obtained through getCloudMysqlTargetVpcList action | - |
cloudMysqlImageProductCode | String | N | Cloud DB for MySQL image product code - Can be obtained through by selecting getCloudMysqlImageProductList and then productCode - Generated in default value if data is not entered | - |
cloudMysqlProductCode | String | N | Cloud DB for MySQL product code - Can be obtained through getCloudMysqlProductList and then productCode - default: select the minimum specification, which comprises of memory and CPU | - |
dataStorageTypeCode | String | N | Data storage type code - Data storage type is not altered after installation - options - If the generationCode of cloudMysqlImageProductCode is G2: SSD | HDD - If the generationCode of cloudMysqlImageProductCode is G3: CB1 - default - If the generationCode of cloudMysqlImageProductCode is G2: SSD - If the generationCode of cloudMysqlImageProductCode is G3: CB1 | - |
isHa | Boolean | N | High-availability (True/False) - If high availability is selected, 2 servers including a Standby Master server are generated, and additional fees are incurred - If the high availability status (isHa) is false, isMultiZone and standbyMasterSubnetNo parameters are not used - default: true | - |
isMultiZone | Boolean | N | Multi-zone (True/False) - If the high availability status (isHa) is true, multi-zone can be selected - If multi-zone is selected, the Master server and Standby Master server are generated in mutually different zones, providing higher availability - Must be entered if the high availability status (isHa) is true - default: false | - |
isStorageEncryption | Boolean | N | Whether data storage encryption is applied - If encryption is applied, DB data is encrypted and stored in the storage; after Cloud DB for MySQL instance is generated, storage encryption setting cannot be changed - Encryption can be applied only if the high availability status (isHa) is true - default: false | - |
isBackup | Boolean | N | Backup (True/False) - If the high availability status (isHa) is true, backup (isBackup) is to be set at true - default: true | - |
backupFileRetentionPeriod | Integer | N | Backup file storage period - Backup is supported for InnoDB engine only, and is not supported for tables generated using other engines is not supported - Backup is done on a daily basis and backup files are stored in a separate backup storage, and fees are charged in proportion to the space used - default: 1 (1 day) | - |
backupTime | String | N | Backup time - Sets the time at which backup is conducted. If backup (isBackup) is set at True and automatic backup (isAutomaticBackup) is set at False, a time must be entered <Example> - 01:15 | - |
isAutomaticBackup | Boolean | N | Backup time is automatically set - Select whether backup time is to be set automatically, and if automatic backup (isAutomaticBackup) is set at True, a backupTime cannot be entered - default: true | - |
cloudMysqlServiceName | String | Y | Cloud DB for MySQL service name | - Only English alphabets, numbers, dash ( - ) and Korean letters can be entered - min: 3 - max: 20 |
cloudMysqlServerNamePrefix | String | Y | Cloud DB for MySQL server name prefix - In order to prevent overlapping host names, random text is added | - Can comprise only lower-case English alphabets, numbers and dash ( - ) - The first letter must be an English alphabet and the last letter must be an English alphabet or a number - min: 3 - max: 30 |
cloudMysqlUserName | String | Y | MySQL User ID | - Only English alphabets, numbers and special characters ( \ _ , - ) are allowed and must start with an English alphabet - min: 4 - max: 16 |
cloudMysqlUserPassword | String | Y | MySQL User password | - At least one English alphabet, number and special character must be included - Certain special characters ( ` & + \ " ' / space ) cannot be used - min: 8 - max: 20 |
hostIp | String | Y | MySQL User host <Example> - Overall connection permitted: % - Connection by specific IPs permitted: 1.1.1.1 - IP band connection permitted: 1.1.1.% | - |
cloudMysqlPort | Integer | N | TCP port number for access to Cloud DB for MySQL instance - default: 3306 | 3306 or - min: 10000 - max: 20000 |
cloudMysqlDatabaseName | String | Y | Name of DB to be generated at default for Cloud DB for MySQL instance | - Only English alphabets, numbers and special characters ( \ _ , - ) are allowed and must start with an English alphabet - min: 1 - max: 30 |
subnetNo | String | Y | Subnet number - Can be obtained through getCloudMysqlTargetSubnetList action - Public domain can only be used on a DB server generated on Public Subnet - Subnet cannot be transferred after Cloud DB for MySQL instance is generated | - |
standbyMasterSubnetNo | String | N | Subnet number of the Standby Master server - If multi-zone (isMultiZone) is set at False, entry is not necessary, but if multi-zone (isMultiZone) is set at True, entry must be made - For standbyMasterSubnetNo, the Master server’s Subnet and Zone must be different, and should be both either Public or Private - Can be obtained through getCloudMysqlTargetSubnetList action | - |
isPrivateSubDomain | Boolean | N | Use of Private Sub Domain (True/False) - If Use of Private Sub Domain (isPrivateSubDomain) is set at True, a private sub domain prefix can be designated | - |
privateSubDomainPrefix | String | N | Private Sub Domain Prefix - A Sub Domain is added to the Private Domain - If Use of Private Sub Domain (isPrivateSubDomain) is set at True, an entry must be made | - Can comprise only lower-case English alphabets, numbers and dash ( - ) - The first letter must be an English alphabet and the last letter must be an English alphabet or a number - min: 3 - max: 15 |
engineVersionCode | String | N | Engine Version - Can be obtained through getCloudMysqlImageProductList action - Necessary if the generationCode of cloudMysqlImageProductCode is G3 - If an entry is not made, then it is generated in the latest currently available version | - |
output | String | N | Format type of the response result - options: xml | json - default: json | - |
Responses
Response data type
Response data type for command recall is as follows.
- CloudMysqlInstanceList type
CloudMysqlInstanceList extends CommonResponse | Description |
---|---|
private Integer totalRows; | Total number of items viewed |
private List<CloudMysqlInstance> cloudMysqlInstanceList = new ArrayList<>(); |
- CloudMysqlInstance type
CloudMysqlInstance | Description |
---|---|
private String cloudMysqlInstanceNo; | Cloud DB for MySQL instance number |
private String cloudMysqlServiceName; | Cloud DB for MySQL service name |
private String cloudMysqlInstanceStatusName; | Cloud DB for MySQL instance status name - creating - deleted - deleting - pending - recovering - reinstalling - restarting - running - settingup - shuttingdown - stopped - upgrading - downgrading |
private CommonCode cloudMysqlInstanceStatus; | Cloud DB for MySQL instance status code - INIT (init) - CREAT (created) - DEL (deleted) |
private CommonCode cloudMysqlInstanceOperation; | Cloud DB for MySQL instance operation code - CREAT (create) - DEL (delete) - FO (failover) - NULL (no) - SETUP (setup) - UPGD (upgrade) - DWGD (downgrade) - BKP (backup) |
private String cloudMysqlImageProductCode; | Cloud DB for MySQL image product code |
private String engineVersion; | Cloud DB for MySQL engine version |
private CommonCode license; | Cloud DB for MySQL license |
private Integer cloudMysqlPort; | Cloud DB for MySQL port |
private Boolean isHa; | High-availability (True/False) |
private Boolean isMultiZone; | Multi-zone (True/False) |
private Boolean isBackup; | Backup (True/False) |
private Integer backupFileRetentionPeriod; | Backup file storage period |
private String backupTime; | Backup time |
private String generationCode; | Server generation code |
private Date createDate; | Date generated |
private List<String> accessControlGroupNoList; | List of ACG numbers |
private List<String> cloudMysqlConfigList; | Cloud DB for MySQL configuration list |
private List<CloudMysqlServerInstance> cloudMysqlServerInstanceList; | Cloud DB for MySQL server instance list |
- CloudMysqlServerInstance type
CloudMysqlServerInstance | Description |
---|---|
private String cloudMysqlServerInstanceNo; | Cloud DB for MySQL server instance number |
private String cloudMysqlServerName; | Cloud DB for MySQL server name |
private CommonCode cloudMysqlServerRole; | Cloud DB for MySQL server role |
private String cloudMysqlServerInstanceStatusName; | Cloud DB for MySQL server instance status - creating - deleted - deleting - downgrading - pending - recovering - reinstalling - restarting - running - settingup - shuttingdown - stopped - upgrading - downgrading |
private CommonCode cloudMysqlServerInstanceStatus; | Cloud DB for MySQL server instance status code - DEL (deleted) - PEND (pending) - RUN (running) - STOP (stopped) - FSTOP (failure stopped) |
private CommonCode cloudMysqlServerInstanceOperation; | Cloud DB for MySQL server instance Operation code - NOOP (no operation) - CREAT (create) - START (start) - RSTRT (restart) - SETUP (setup) - STOP (stop) - FO (failover) - DEL (delete) - UPGD (upgrade) - DWGD (downgrade) - RISTL (서버 reinstall) - MIG (migration) |
private String cloudMysqlProductCode; | Cloud DB for MySQL product code |
private String regionCode; | Region code |
private String zoneCode; | ZONE code |
private String vpcNo; | VPC number |
private String subnetNo; | Subnet number |
private Boolean isPublicSubnet; | Public Subnet (True/False) |
private String publicDomain; | Name of public domain |
private String privateDomain; | Name of private domain |
private CommonCode dataStorageType; | Data storage type |
private Boolean isStorageEncryption; | Whether data storage encryption is applied |
private Long dataStorageSize; | Data storage size |
private Long usedDataStorageSize; | Size of data storage in use |
private Integer cpuCount; | Number of virtual CPUs |
private Long memorySize; | Memory size |
private Date uptime; | VM booting completion time |
private Date createDate; | Date generated |
Examples
Describes examples of recalls and responses.
Recall examples
The following are examples of recalls.
ncloud vmysql 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
Response examples
The following are examples of responses.
If the response shows that format type (output) is json
{
"createCloudMysqlInstanceResponse": {
"requestId": "ae758cc2-006c-4df5-8ad2-aeef4ecfa8bf",
"returnCode": "0",
"returnMessage": "success",
"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": 3306,
"isHa": true,
"isMultiZone": true,
"isBackup": true,
"backupFileRetentionPeriod": 10,
"backupTime": "02:00",
"generationCode": "G2",
"createDate": "2021-05-27T18:00:00+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": "2021-05-27T18:00:00+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": "2021-05-27T18:00:00+0900"
}
]
}
]
}
}
If the response shows that format type (output) is xml
<createCloudMysqlInstanceResponse>
<requestId>c04bfdd1-e27e-4006-9bc3-bc37840ce1dd</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.5732.B050</cloudMysqlImageProductCode>
<engineVersion>MYSQL5.7.32</engineVersion>
<license>
<code>GPL</code>
<codeName>General Public License</codeName>
</license>
<cloudMysqlPort>13306</cloudMysqlPort>
<isHa>true</isHa>
<isMultiZone>true</isMultiZone>
<isBackup>true</isBackup>
<generationCode>G2</generationCode>
<createDate>2021-05-27T18:00:00+0900</createDate>
<accessControlGroupNoList/>
<cloudMysqlConfigList/>
<cloudMysqlServerInstanceList>
<cloudMysqlServerInstance>
<cloudMysqlServerName>test-****-001-e04</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>2021-05-27T18:00:00+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>2021-05-27T18:00:00+0900</createDate>
</cloudMysqlServerInstance>
</cloudMysqlServerInstanceList>
</cloudMysqlInstance>
</cloudMysqlInstanceList>
</createCloudMysqlInstanceResponse>
Was this article helpful?