createCloudMysqlInstance
  • PDF

createCloudMysqlInstance

  • PDF

It can be used in a VPC environment.

Overview

Creates a Cloud DB for MySQL instance.

Request

Request parameter

Parameter name Requirement status Type Restrictions Description
regionCode No String Region code
You can decide the region in which the Cloud DB for MySQL instance will be created.
You can obtain regionCode through the getRegionList action.
Default: Selects the first region of the getRegionList search results.
vpcNo Yes String VPC number
Determines the VPC where the Cloud DB for MySQL instance will be created.
You can obtain vpcNo through the getCloudMysqlTargetVpcList action.
cloudMysqlImageProductCode No String Cloud MySQL image product code
You can obtain cloudMysqlImageProductCode with productCode of the getCloudMysqlImageProductList action.
It will be created with the default value if no input is made.
cloudMysqlProductCode No String Cloud MySQL product code
You can decide the server specifications of the Cloud DB for MySQL instance to be created.
You can obtain cloudMysqlProductCode with productCode of the getCloudMysqlProductList action.
Default: Selects the minimum specifications. The minimum specifications are determined by: 1. Memory, 2. CPU.
dataStorageTypeCode No String Data storage type code
The data storage type can't be changed after installation.
Options: SSD | HDD
Default: SSD
isHa No Boolean High availability status
If you choose to have high availability, then two servers including the standby master server are created. Additional charges will be incurred.
If the high availability status (isHa) is false, then the isMultiZone and standbyMasterSubnetNo parameters are not used.
Default: true
isMultiZone Conditional Boolean Multi-zone status
If the high availability status (isHa) is true, then you can select whether to use multi-zones.
If you choose to use multi-zones, then the master server and the standby master server are created in different zones to provide higher availability.
This field must be filled if the high availability status (isHa) is true.
Default: false
isStorageEncryption No Boolean Data storage encryption application status
Applying the encryption encrypts the DB data and saves it in storage. After creating an Cloud DB for MySQL instance, the storage encryption settings can't be changed.
Encryption can only be applied if high availability (isHa) is true.
Default: false
isBackup No Boolean Backup status
If the high availability status (isHa) is true, then the backup status (isBackup) is fixed as true.
Default: true
backupFileRetentionPeriod No Integer Backup file retention period
For backup, only the InnoDB engine is supported. Backup for tables created using any other engines is not supported. Backups are performed every day, and backup files are saved in a separate backup storage. Fees are charged for the space you use.
Default: 1 (1 day)
backupTime Conditional String Backup time
Sets the time for when the backup is performed. This field must be filled if the backup status (isBackup) is true and the automatic backup status (isAutomaticBackup) is false.
Example
- 01:15
isAutomaticBackup No Boolean Automatic backup time status
Selects whether to have the backup time set automatically. backupTime can't be entered if the automatic backup status (isAutomaticBackup) is true.
Default: true
cloudMysqlServiceName Yes String Only Korean and English letters, numbers, and the special character - can be entered. Cloud MySQL service name
cloudMysqlServerNamePrefix Yes String It must only contain English letters (lowercase), numbers, and hyphens (-).
It must start with an English letter and end with an English letter or a number.
Cloud MySQL server name
It is created by adding random text in order to avoid duplicated host names.
cloudMysqlUserName Yes String Only English letters, numbers, and special characters _ , - can be used, and it must start with an English letter. Access user name
Enter the user name to be used for the DB admin.
cloudMysqlUserPassword Yes String It must be at least 8 characters in length and have at least one English letter, one special character, and one number.
` & + \ " ' / and spaces can't be used in passwords.
Access password
Enter the user's password to be used for the DB admin.
hostIp Yes String Allow access to all: %
Allow access to specific IPs: 1.1.1.1
Allow access to an IP range: 1.1.1.%
IP of the access host
Enter the client IP to access.
cloudMysqlPort No Integer 3306
or
Min: 10000, Max: 20000
Cloud MySQL port
Enter the TCP port number for MySQL access.
Default: 3306
cloudMysqlDatabaseName Yes String Only English letters, numbers, and special characters _ , - can be used, and it must start with an English letter. Cloud MySQL DB name
Enter the DB name to be created by default.
subnetNo Yes String Subnet number
Determines the subnet of the Cloud MySQL instance to be created.
You can obtain subnetNo through the getCloudMysqlTargetSubnetList action.
Requesting subscription to public domains can only be done in a DB server created in a public subnet.
Subnet transfers are not available after creating the Cloud DB for MySQL instance.
standbyMasterSubnetNo Conditional String Subnet number of the standby master server
This field must be filled if the multi-zone status (isMultiZone) is true. This field can't be filled if the multi-zone status (isMultiZone) is false.
standbyMasterSubnetNo should have a different zone from the master server's subnet, and they must be both either public or private.
You can obtain standbyMasterSubnetNo through the getCloudMysqlTargetSubnetList action.
isPrivateSubDomain No Boolean Private sub domain use status
If the private sub domain use status (isPrivateSubDomain) is true, then you can specify the private sub domain prefix.
privateSubDomainPrefix Conditional String Only 3 to 15 characters can be entered.
It must only contain English letters (lowercase), numbers, and hyphens (-).
It must start with an English letter and end with an English letter or a number.
Private Sub Domain Prefix
The value entered as privateSubDomainPrefix is automatically included in the sub domain.
This field must be filled if the private sub domain use status (isPrivateSubDomain) is true.
output No String Format type of the response result
Options: xml | json
Default: json

Response

Response data type

  • CloudMysqlInstanceList type
CloudMysqlInstanceList extends CommonResponse
private Integer totalRows;
private List cloudMysqlInstanceList = new ArrayList<>();
CloudMysqlInstance
private String cloudMysqlInstanceNo;
private String cloudMysqlServiceName;
private String cloudMysqlInstanceStatusName;
private CommonCode cloudMysqlInstanceStatus;
private CommonCode cloudMysqlInstanceOperation;
private String cloudMysqlImageProductCode;
private String engineVersion;
private CommonCode license;
private Integer cloudMysqlPort;
private Boolean isHa;
private Boolean isMultiZone;
private Boolean isBackup;
private Integer backupFileRetentionPeriod;
private String backupTime;
private Date createDate;
private AccessControlGroupNoList accessControlGroupNoList;
private CloudMysqlConfigList cloudMysqlConfigList;
private List cloudMysqlServerInstanceList;
AccessControlGroupNoList
private List accessControlGroupNoList = new ArrayList<>();
CloudMysqlConfigList
private List cloudMysqlConfigList = new ArrayList<>();
CloudMysqlServerInstance
private String cloudMysqlServerInstanceNo;
private String cloudMysqlServerName;
private CommonCode cloudMysqlServerRole;
private String cloudMysqlServerInstanceStatusName;
private CommonCode cloudMysqlServerInstanceStatus;
private CommonCode cloudMysqlServerInstanceOperation;
private String cloudMysqlProductCode;
private String regionCode;
private String zoneCode;
private String vpcNo;
private String subnetNo;
private Boolean isPublicSubnet;
private String publicDomain;
private String privateDomain;
private CommonCode dataStorageType;
private Boolean isStorageEncryption;
private Long dataStorageSize;
private Long usedDataStorageSize;
private Integer cpuCount;
private Long memorySize;
private Date uptime;
private Date createDate;

Examples

Request examples

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

{
  "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",
        "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"
          }
        ]
      }
    ]
  }
}
<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>
      <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?