createCloudMysqlInstance
    • PDF

    createCloudMysqlInstance

    • PDF

    Article Summary

    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.

    ParameterTypeRequirement StatusDescriptionRestrictions
    regionCodeStringNRegion 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.
    -
    vpcNoStringYVPC number
    - Can be obtained through getCloudMysqlTargetVpcList action
    -
    cloudMysqlImageProductCodeStringNCloud 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
    -
    cloudMysqlProductCodeStringNCloud DB for MySQL product code
    - Can be obtained through getCloudMysqlProductList and then productCode
    - default: select the minimum specification, which comprises of memory and CPU
    -
    dataStorageTypeCodeStringNData 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
    -
    isHaBooleanNHigh-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
    -
    isMultiZoneBooleanNMulti-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
    -
    isStorageEncryptionBooleanNWhether 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
    -
    isBackupBooleanNBackup (True/False)
    - If the high availability status (isHa) is true, backup (isBackup) is to be set at true
    - default: true
    -
    backupFileRetentionPeriodIntegerNBackup 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)
    -
    backupTimeStringNBackup 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
    -
    isAutomaticBackupBooleanNBackup 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
    -
    cloudMysqlServiceNameStringYCloud DB for MySQL service name- Only English alphabets, numbers, dash ( - ) and Korean letters can be entered
    - min: 3
    - max: 20
    cloudMysqlServerNamePrefixStringYCloud 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
    cloudMysqlUserNameStringYMySQL User ID- Only English alphabets, numbers and special characters ( \ _ , - ) are allowed and must start with an English alphabet
    - min: 4
    - max: 16
    cloudMysqlUserPasswordStringYMySQL 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
    hostIpStringYMySQL User host
    <Example>
    - Overall connection permitted: %
    - Connection by specific IPs permitted: 1.1.1.1
    - IP band connection permitted: 1.1.1.%
    -
    cloudMysqlPortIntegerNTCP port number for access to Cloud DB for MySQL instance
    - default: 3306
    3306
    or
    - min: 10000
    - max: 20000
    cloudMysqlDatabaseNameStringYName 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
    subnetNoStringYSubnet 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
    -
    standbyMasterSubnetNoStringNSubnet 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
    -
    isPrivateSubDomainBooleanNUse 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
    -
    privateSubDomainPrefixStringNPrivate 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
    engineVersionCodeStringNEngine 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
    -
    outputStringNFormat 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 CommonResponseDescription
    private Integer totalRows;Total number of items viewed
    private List<CloudMysqlInstance> cloudMysqlInstanceList = new ArrayList<>();
    • CloudMysqlInstance type
    CloudMysqlInstanceDescription
    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
    CloudMysqlServerInstanceDescription
    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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.