createCloudMssqlInstance

Prev Next

Available in VPC

Create a Cloud DB for MSSQL instance.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET, POST /createCloudMssqlInstance

Request headers

For headers common to all Cloud DB for MSSQL (VPC) APIs, see Cloud DB for MSSQL (VPC) request headers.

Request parameters

The following describes the parameters.

Field Type Required Description
regionCode String Optional Region code of the Cloud DB for MSSQL instance to create
  • Check through getRegionList.
  • First Region of the getRegionList query result (default)
vpcNo String Required Number of VPC to create the Cloud DB for MSSQL instance in
subnetNo String Required Subnet number of the default network interface to be used in the Cloud DB for MSSQL instance
  • Check through getCloudMssqlTargetSubnetList.
  • 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 MSSQL instance.
mirrorSubnetNo String Conditional Subnet number of the mirror server
  • Must be entered for multi-zone CloudDB for MSSQL.
  • Check through getCloudMssqlTargetSubnetList.
  • It must be in a different zone from the principal server's subnet, but the public or private status must match.
cloudMssqlServiceName String Required Name of the Cloud DB for MSSQL service to create
  • 3 to 15 characters, including English letters, Korean letters, numbers, and special character "-"
configGroupNo String Optional Cloud DB for MSSQL config group number
  • A config group created in advance can be applied when you create a server.
  • If you don't have your own config group, you can choose from the config groups provided by default.
  • Check through getCloudMssqlConfigGroupList
  • 0 (default).
cloudMssqlImageProductCode String Optional Cloud DB for MSSQL image product code
cloudMssqlProductCode String Optional Cloud DB for MSSQL product code
  • Determine the server specification for the Cloud DB for MSSQL instance to create.
  • Check through getCloudMssqlProductList
  • 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 getCloudMssqlImageProduct.
    • For G2: SSD
    • For G3: CB2
isHa Boolean Required High availability status
  • Selecting true (high availability) creates two servers, including a standby master server, and incurs additional fees.
  • If false, isMultiZone and mirrorSubnetNo parameters are not used.
isMultiZone Boolean Optional Multi-zone status
  • true | false (default)
    • Can only be entered if the high availability status (isHa) is true.
    • If true, provide the principal and mirror servers in separate zones to provide higher availability.
backupFileRetentionPeriod Integer Optional Backup file retention period (days)
  • 1-30 (default: 1)
  • Backup is performed every day, and the backup file is stored in a separate backup storage.
  • Fees are charged for the space you use.
backupTime String Conditional Set backup time (HH:MM).
  • Required if the automatic backup status (isAutomaticBackup) is false
  • Enter in 15 minute increments.
  • e.g., 01:15
isAutomaticBackup Boolean Optional Whether to set the backup time automatically
  • true (default) | false
    • If true, the backup time is set automatically regardless of backupTime.
cloudMssqlUserName String Required DB user account ID
  • 4 to 16 characters, including English letters, numbers, and special character "_", and must begin with an English letter.
cloudMssqlUserPassword 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.
cloudMssqlPort Integer Optional TCP port number to access the Cloud DB for MSSQL instance
  • 1433 (default)
  • Specified range: 10000 - 20000
characterSetName String Optional DB character set
  • Check through getCloudMssqlCharacterSetList.
  • Select between Korean and English collation.
  • Korean_Wansung_CI_AS (default) | SQL_Latin1_General_CP1_CI_AS
    • Korean_Wansung_CI_AS: Korean perfect form
    • SQL_Latin1_General_CP1_CI_AS: English version
engineVersionCode String Conditional DB engine version
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/vmssql/v2/createCloudMssqlInstance
?regionCode=KR
&vpcNo=59***
&subnetNo=140***
&mirrorSubnetNo=158***
&cloudMssqlServiceName=mssql003
&configGroupNo=***
&cloudMssqlImageProductCode=SW.VMSSL.OS.WND64.WINNT.SVR2016.MSSQL.15043553.EE.B100
&cloudMssqlProductCode=SVR.VMSSL.HICPU.C002.M004.NET.HDD.B100.G002
&dataStorageTypeCode=SSD
&isHa=true
&isMultiZone=true
&backupFileRetentionPeriod=1
&backupTime=10:15
&isAutomaticBackup=false
&cloudMssqlUserName=user000
&cloudMssqlUserPassword=*********
&cloudMssqlPort=1433
&characterSetName=Korean_Wansung_CI_AS
&engineVersionCode=15.0.4355.3
&responseFormatType=json'
--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 CloudMssqlInstanceList for the response body.

Response status codes

For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

Response example

The response example is as follows:

  • If responseFormetType=json

    {
        "createCloudMssqlInstanceResponse": {
            "totalRows": 1,
            "cloudMssqlInstanceList": [
                    {
                        "cloudMssqlInstanceNo": "2528****",
                        "cloudMssqlServiceName": "mssql003",
                        "cloudMssqlInstanceStatusName": "creating",
                    "cloudMssqlInstanceStatus": {
                        "code": "INIT",
                        "codeName": "CLOUD DATABASE(VPC) Init State"
                    },
                    "cloudMssqlInstanceOperation": {
                        "code": "CREAT",
                        "codeName": "CLOUD DATABASE(VPC) Creat OP"
                    },
                    "generationCode": "G2",
                    "cloudMssqlImageProductCode": "SW.VMSSL.OS.WND64.WINNT.SVR2016.MSSQL.15043553.EE.B100",
                    "isHa": true,
                    "isMultiZone": true,
                    "license": {
                        "code": "SPLA",
                        "codeName": "Service Provider License Agreement"
                    },
                    "cloudMssqlPort": 1433,
                    "backupFileRetentionPeriod": 1,
                    "backupTime": "10:15",
                    "configGroupNo": "***",
                    "configGroupName": "mssql_2019_default",
                    "engineVersion": "MSSQL 15.0.4355.3 Enterprise Edition",
                    "createDate": "2024-07-01T11:34:11+0900",
                    "dbCollation": "Korean_Wansung_CI_AS",
                    "cloudMssqlServerInstanceList": [
                        {
                            "cloudMssqlServerName": "m-2528****-001",
                            "cloudMssqlServerRole": {
                                "code": "M",
                                "codeName": "Principal"
                            },
                            "cloudMssqlServerInstanceStatusName": "creating",
                            "cloudMssqlServerInstanceStatus": {
                                "code": "PEND",
                                "codeName": "CLOUD DATABASE(VPC) Server Pending State"
                            },
                            "cloudMssqlServerInstanceOperation": {
                                "code": "CREAT",
                                "codeName": "CLOUD DATABASE(VPC) Server Create OP"
                            },
                            "regionCode": "KR",
                            "zoneCode": "KR-1",
                            "vpcNo": "59***",
                            "subnetNo": "140***",
                            "dataStorageSize": 107374182400,
                            "cpuCount": 2,
                            "memorySize": 4294967296,
                            "isPublicSubnet": true,
                            "cloudMssqlProductCode": "SVR.VMSSL.HICPU.C002.M004.NET.HDD.B100.G002",
                            "createDate": "2024-07-01T11:34:11+0900",
                            "dataStorageType": {
                                "code": "SSD",
                                "codeName": "SSD"
                            }
                        },
                        {
                            "cloudMssqlServerName": "m-2528****-002",
                            "cloudMssqlServerRole": {
                                "code": "H",
                                "codeName": "Mirror"
                            },
                            "cloudMssqlServerInstanceStatusName": "creating",
                            "cloudMssqlServerInstanceStatus": {
                                "code": "PEND",
                                "codeName": "CLOUD DATABASE(VPC) Server Pending State"
                            },
                            "cloudMssqlServerInstanceOperation": {
                                "code": "CREAT",
                                "codeName": "CLOUD DATABASE(VPC) Server Create OP"
                            },
                            "regionCode": "KR",
                            "zoneCode": "KR-2",
                            "vpcNo": "59***",
                            "subnetNo": "158***",
                            "dataStorageSize": 107374182400,
                            "cpuCount": 2,
                            "memorySize": 4294967296,
                            "isPublicSubnet": true,
                            "cloudMssqlProductCode": "SVR.VMSSL.HICPU.C002.M004.NET.HDD.B100.G002",
                            "createDate": "2024-07-01T11:34:11+0900",
                            "dataStorageType": {
                                "code": "SSD",
                                "codeName": "SSD"
                            }
                        }
                    ]
                }
            ],
            "requestId": "7e05dba1-****-****-****-e463eb447507",
            "returnCode": "0",
            "returnMessage": "success"
        }
    }
    
  • If responseFormetType=xml (default)

    <?xml version="1.0" encoding="UTF-8"?>
    <createCloudMssqlInstanceResponse>
        <requestId>7e05dba1-****-****-****-e463eb447507</requestId>
        <returnCode>0</returnCode>
        <returnMessage>success</returnMessage>
        <totalRows>1</totalRows>
        <cloudMssqlInstanceList>
            <cloudMssqlInstance>
                <cloudMssqlInstanceNo>2528****</cloudMssqlInstanceNo>
                <cloudMssqlServiceName>mssql003</cloudMssqlServiceName>
                <cloudMssqlInstanceStatusName>creating</cloudMssqlInstanceStatusName>
                <cloudMssqlInstanceStatus>
                    <code>INIT</code>
                    <codeName>CLOUD DATABASE(VPC) Init State</codeName>
                </cloudMssqlInstanceStatus>
                <cloudMssqlInstanceOperation>
                    <code>CREAT</code>
                    <codeName>CLOUD DATABASE(VPC) Creat OP</codeName>
                </cloudMssqlInstanceOperation>
                <generationCode>G2</generationCode>
                <cloudMssqlImageProductCode>SW.VMSSL.OS.WND64.WINNT.SVR2016.MSSQL.15043553.EE.B100</cloudMssqlImageProductCode>
                <isHa>true</isHa>
                <isMultiZone>true</isMultiZone>
                <license>
                    <code>SPLA</code>
                    <codeName>Service Provider License Agreement</codeName>
                </license>
                <cloudMssqlPort>1433</cloudMssqlPort>
                <backupFileRetentionPeriod>1</backupFileRetentionPeriod>
                <backupTime>10:15</backupTime>
                <configGroupNo>***</configGroupNo>
                <configGroupName>mssql_2019_default</configGroupName>
                <engineVersion>MSSQL 15.0.4355.3 Enterprise Edition</engineVersion>
                <createDate>2024-07-01T11:34:11+0900</createDate>
                <dbCollation>Korean_Wansung_CI_AS</dbCollation>
                <cloudMssqlServerInstanceList>
                    <cloudMssqlServerInstance>
                        <cloudMssqlServerName>m-2528****-001</cloudMssqlServerName>
                        <cloudMssqlServerRole>
                            <code>M</code>
                            <codeName>Principal</codeName>
                        </cloudMssqlServerRole>
                        <cloudMssqlServerInstanceStatusName>creating</cloudMssqlServerInstanceStatusName>
                        <cloudMssqlServerInstanceStatus>
                            <code>PEND</code>
                            <codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
                        </cloudMssqlServerInstanceStatus>
                        <cloudMssqlServerInstanceOperation>
                            <code>CREAT</code>
                            <codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
                        </cloudMssqlServerInstanceOperation>
                        <regionCode>KR</regionCode>
                        <zoneCode>KR-1</zoneCode>
                        <vpcNo>59***</vpcNo>
                        <subnetNo>140***</subnetNo>
                        <dataStorageSize>107374182400</dataStorageSize>
                        <cpuCount>2</cpuCount>
                        <memorySize>4294967296</memorySize>
                        <isPublicSubnet>true</isPublicSubnet>
                        <cloudMssqlProductCode>SVR.VMSSL.HICPU.C002.M004.NET.HDD.B100.G002</cloudMssqlProductCode>
                        <createDate>2024-07-01T11:34:11+0900</createDate>
                        <dataStorageType>
                            <code>SSD</code>
                            <codeName>SSD</codeName>
                        </dataStorageType>
                    </cloudMssqlServerInstance>
                    <cloudMssqlServerInstance>
                        <cloudMssqlServerName>m-2528****-002</cloudMssqlServerName>
                        <cloudMssqlServerRole>
                            <code>H</code>
                            <codeName>Mirror</codeName>
                        </cloudMssqlServerRole>
                        <cloudMssqlServerInstanceStatusName>creating</cloudMssqlServerInstanceStatusName>
                        <cloudMssqlServerInstanceStatus>
                            <code>PEND</code>
                            <codeName>CLOUD DATABASE(VPC) Server Pending State</codeName>
                        </cloudMssqlServerInstanceStatus>
                        <cloudMssqlServerInstanceOperation>
                            <code>CREAT</code>
                            <codeName>CLOUD DATABASE(VPC) Server Create OP</codeName>
                        </cloudMssqlServerInstanceOperation>
                        <regionCode>KR</regionCode>
                        <zoneCode>KR-2</zoneCode>
                        <vpcNo>59***</vpcNo>
                        <subnetNo>158***</subnetNo>
                        <dataStorageSize>107374182400</dataStorageSize>
                        <cpuCount>2</cpuCount>
                        <memorySize>4294967296</memorySize>
                        <isPublicSubnet>true</isPublicSubnet>
                        <cloudMssqlProductCode>SVR.VMSSL.HICPU.C002.M004.NET.HDD.B100.G002</cloudMssqlProductCode>
                        <createDate>2024-07-01T11:34:11+0900</createDate>
                        <dataStorageType>
                            <code>SSD</code>
                            <codeName>SSD</codeName>
                        </dataStorageType>
                    </cloudMssqlServerInstance>
                </cloudMssqlServerInstanceList>
            </cloudMssqlInstance>
        </cloudMssqlInstanceList>
    </createCloudMssqlInstanceResponse>