To help you easily understand how to use NAVER CLOUD PLATFORM’s various services and their APIs, two different types of documentation are provided: [Manuals] and [API References].

CloudDB API overview

NAVER CLOUD PLATFORM is a cloud service built with NAVER's latest computing technology and operational know-how. NAVER CLOUD PLATFORM provides a set of application programming interfaces (APIs) which allows you to use some solution products among its various product categories. NAVER CLOUD PLATFORM APIs are RESTful, using HTTP GET and POST methods.

Cloud DB API is available for CloudDB for MSSQL, CloudDB for MySQL, and CloudDB for Redis.

Common

  • {CloudDB_API_URL}
https://ncloud.apigw.ntruss.com/clouddb/v1
  • Request header
Header Description
x-ncp-apigw-timestamp It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
If the time difference with the APIGW server is more than 5 minutes, the request is considered invalid.
x-ncp-apigw-api-key API key issued by API Gateway
x-ncp-iam-access-key API key issued by NCP or access key issued by IAM
x-ncp-apigw-signature-v1 Signature used to encrypt the body of the example with the “secret key” that maps with the “access key.”
The HMAC encryption algorithm is HMAC SHA256.

API References

1. DMS stands for data migration service, which helps you restore on-premises databases to Cloud DB or transfer backup files that have been automatically backed up from Cloud DB to Object Storage. You can use the service with the following operations via API Gateway, after creating a bucket in Object Storage. With this service, even large databases can be transferred to your cloud DB, with just a few minutes of service interruptions.
2. DMS can be restored from the system compatible with Amazon S3 API. You can restore data in the service after storing the Object Storage information to work with.
3. Perform a database restoration after downloading backup files from Object Storage to an internal backup storage. (Database can be restored only with storage systems conforming to IO all requirements of that database.)
4. You can move a backup of all of your data, which are automatically backed up everyday, and of transaction logs to Object Storage.
5. You can move large volumes of files to an internal backup storage or retrieve the status of the restoration command.

CloudDB

createCloudDBInstance

  • API name

    Create an instance

  • action

    createCloudDBInstance
    
  • Description
         Creates a CloudDB instance.
    
  • Request parameters
Parameter Brief Description Type Restrictions Required
cloudDBImageProductCode CloudDB image product code String   No
dbKindCode DB type code String   Yes
collation Character set String Default : (Korean_Wansung_CI_AS) No
cloudDBProductCode CloudDB product code String Default : Minimum specifications No
dataStorageTypeCode Data storage type code String Default : SSD No
isHa Whether to enable high availability Boolean default : true No
cloudDBServerName CloudDB server name String   Conditional
cloudDBServiceName CloudDB service name String   Yes
hostIp Host IP String   Conditional
cloudDBBasicName CloudDB default name String   Conditional
cloudDBUserName CloudDB user name String   Conditional
cloudDBUserPassword CloudDB user password String   Conditional
cloudDBPort CloudDB port Integer   No
cloudDBConfigGroupNo CloudDB configuration group name String default : 0 (mssql_2016_default ) No
isBackup Whether to enable backup Boolean default : false No
backupFileRetentionPeriod Backup file retention period Integer default : 1 day (1-30) No
isAutomaticBackup Whether to enable automatic backup Boolean default : true No
backupTime Backup time String Specify the value in increments or decrements of 15 minutes in HHMM format. 1707 -> 1700 Conditional
regionNo Region name String KR region available only No
zoneNo ZONE number String KR-1 ZONE available only No
responseFormatType Response result format String   No
  • cloudDBImageProductCode

    • Get available values by using the API, getCloudDBImageProductListRequest API.
  • cloudDBProductCode

    • Get required input values by using the API, getCloudDBProductList API.
  • dbKindCode

    • Select among MYSQL, MSSQL, or REDIS.
  • collation

    • Select either Korean_Wansung_CI_AS or SQL_Latin1_General_CP1_CI_AS. Supported by MSSQL only.
  • dataStorageTypeCode

    • Enter either HDD or SSD.
  • isHa

    • Select either REDIS or MSSQL. Not supported by MSSQL.
  • cloudDBServerName

    • For MSSQL, a name is automatically entered. For MYSQL and REDIS, enter it yourself.
  • cloudDBServiceName

    • A user-created cloud database service name.
  • hostIp

    • Supported by MYSQL only. Not supported by MSSQL and REDIS.
  • cloudDBBasicName

    • Supported by MYSQL only.
  • cloudDBUserName

    • Supported by MYSQL and MSSQL. A user ID used to log in to a database.
  • cloudDBUserPassword

    • Supported by MYSQL and MSSQL. A password used to log in to a database.
  • cloudDBPort

    (MSSQL) 1433, (MYSQL) 3306, (REDIS) 6379, It can range from 10000 to 20000, and validation checks are needed. The default port may be vulnerable to an attack.

  • cloudDBConfigGroupNo

    • Get available values by using the API, getCloudDBConfigGroupList API. Supported by MSSQL only. Leave it empty, or enter a user-created configuration group number.
  • isBackup

    • For MYSQL and MSSQL, a fixed true value is given. You can set it for REDIS. If a value for isHA (high availability) is set to true, a choice of true or false is not available.
  • backupFileRetentionPeriod

    • Backup retention period
  • isAutomaticBackup

    • Indicates whether to enable automatic backup (For MSSQL, if the isHa value is set to true, this value must be specified.)
  • backupTime

    • If the isAutomaticFullBackup value is set to false, this value must be specified. Specify the start time of backup in increments or decrements of 15 minutes, for example, 0430.
  • regionNo

    • Get available values by using the Server API, getRegionList.
  • zoneNo

    • Get available values by using the Server API, getZoneList.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/createCloudDBInstance?backupTime=1900&cloudDBPort=11433&cloudDBServiceName=msqa1&cloudDBUserName=msqa&cloudDBUserPassword=%211P%40ssw0rd&dbKindCode=MSSQL
      
    • Response

      <createCloudDBInstanceResponse>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <totalRows>1</totalRows>
         <cloudDBInstanceList>
            <cloudDBInstance>
               <cloudDBInstanceNo>1057304</cloudDBInstanceNo>
               <cloudDBServiceName>msqa1</cloudDBServiceName>
               <dbKindCode>MSSQL</dbKindCode>
               <engineVersion>MSSQL 2016 standard edition</engineVersion>
               <cpuCount>2</cpuCount>
               <memorySize>4294967296</memorySize>
               <dataStorageType>
                  <code>SSD</code>
                  <codeName>SSD</codeName>
               </dataStorageType>
               <licenseCode>SPLA</licenseCode>
               <cloudDBPort>11433</cloudDBPort>
               <isHa>true</isHa>
               <cloudDBInstanceStatusName>creating</cloudDBInstanceStatusName>
               <collation />
               <createDate>2018-11-09T17:20:00+0900</createDate>
               <cloudDBImageProductCode>SPSWMSSQLWINNT01</cloudDBImageProductCode>
               <cloudDBProductCode>SPSVRDBAAS000013</cloudDBProductCode>
               <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
               <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
               <zone>
                  <zoneNo>3</zoneNo>
                  <zoneName>KR-2</zoneName>
                  <zoneCode>KR-2</zoneCode>
                  <zoneDescription>Pyeongchon zone</zoneDescription>
                  <regionNo>1</regionNo>
               </zone>
               <region>
                  <regionNo>1</regionNo>
                  <regionCode>KR</regionCode>
                  <regionName>Korea</regionName>
               </region>
               <cloudDBConfigList />
               <cloudDBConfigGroupList />
               <accessControlGroupList>
                  <accessControlGroup>
                     <accessControlGroupConfigurationNo>67517</accessControlGroupConfigurationNo>
                     <accessControlGroupName>cloud-mssql-mntk</accessControlGroupName>
                     <accessControlGroupDescription>Group for cloud MSSQL service 'msqa1' (automatically created)</accessControlGroupDescription>
                     <isDefault>false</isDefault>
                     <createDate>2018-11-09T17:20:35+0900</createDate>
                  </accessControlGroup>
               </accessControlGroupList>
               <cloudDBServerInstanceList>
                  <cloudDBServerInstance>
                     <cloudDBServerInstanceNo>1057305</cloudDBServerInstanceNo>
                     <cloudDBServerInstanceStatusName>creating</cloudDBServerInstanceStatusName>
                     <cloudDBServerName>m-1057304-001</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>M</code>
                        <codeName>Master</codeName>
                     </cloudDBServerRole>
                     <privateDnsName>mssql-108go.cdb.ntruss.com</privateDnsName>
                     <publicDnsName />
                     <dataStorageSize>0</dataStorageSize>
                     <createDate>2018-11-09T17:20:00+0900</createDate>
                     <uptime>2018-11-09T17:20:00+0900</uptime>
                  </cloudDBServerInstance>
                  <cloudDBServerInstance>
                     <cloudDBServerName>m-1057304-002</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>H</code>
                        <codeName>Hidden Master</codeName>
                     </cloudDBServerRole>
                  </cloudDBServerInstance>
               </cloudDBServerInstanceList>
            </cloudDBInstance>
         </cloudDBInstanceList>
      </createCloudDBInstanceResponse>
      

deleteCloudDBServerInstance

  • API name

    Delete an instance

  • action

    deleteCloudDBServerInstance

  • Description

     Deletes a CloudDB server instance. (This API deletes slave databases, and it is supported by MYSQL only.)
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number String Yes
responseFormatType Response result format String No
  • cloudDBInstanceNo

    • Cloud DB instance number to delete. You need to call the getCloudDBInstanceList API to get the CloudDB instance number to delete.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/deleteCloudDBServerInstance?cloudDBInstanceNo=743149
      
    • Response

      <deleteCloudDBServerInstanceResponse>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <totalRows>1</totalRows>
         <cloudDBInstanceList>
            <cloudDBInstance>
               <cloudDBInstanceNo>653558</cloudDBInstanceNo>
               <cloudDBServiceName>cnctest</cloudDBServiceName>
               <dbKindCode>MYSQL</dbKindCode>
               <engineVersion>MYSQL5.7.19</engineVersion>
               <cpuCount>2</cpuCount>
               <dataStorageType>
                  <code>SSD</code>
                  <codeName>SSD</codeName>
               </dataStorageType>
               <licenseCode>GPL</licenseCode>
               <cloudDBPort>3306</cloudDBPort>
               <isHa>true</isHa>
               <backupTime>12:00</backupTime>
               <backupFileRetentionPeriod>2</backupFileRetentionPeriod>
               <cloudDBInstanceStatusName>running</cloudDBInstanceStatusName>
               <collation />
               <createDate>2018-02-13T11:14:00+0900</createDate>
               <cloudDBImageProductCode>SPSWMYSQLLINUX01</cloudDBImageProductCode>
               <cloudDBProductCode>SPSVRDBAAS000001</cloudDBProductCode>
               <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
               <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
               <zone>
                  <zoneNo>2</zoneNo>
                  <zoneName>KR-1</zoneName>
                  <zoneCode>KR-1</zoneCode>
                  <zoneDescription>Gasan zone</zoneDescription>
                  <regionNo>1</regionNo>
               </zone>
               <region>
                  <regionNo>1</regionNo>
                  <regionCode>KR</regionCode>
                  <regionName>Korea</regionName>
               </region>
               <cloudDBConfigList>
                  <cloudDBConfig>
                     <configName>character_set_server</configName>
                     <configValue>utf8mb4</configValue>
                  </cloudDBConfig>
                  <cloudDBConfig>
                     <configName>event_scheduler</configName>
                     <configValue>OFF</configValue>
                  </cloudDBConfig>
                  <cloudDBConfig>
                     <configName>group_concat_max_len</configName>
                     <configValue>102400</configValue>
                  </cloudDBConfig>
                  <cloudDBConfig>
                     <configName>sql-mode</configName>
                     <configValue>STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION</configValue>
                  </cloudDBConfig>
               </cloudDBConfigList>
               <cloudDBConfigGroupList />
               <accessControlGroupList>
                  <accessControlGroup>
                     <accessControlGroupConfigurationNo>34525</accessControlGroupConfigurationNo>
                     <accessControlGroupName>cloud-db-e0ae</accessControlGroupName>
                     <accessControlGroupDescription>Group for cloud DB service 'cnctest' (automatically created)</accessControlGroupDescription>
                     <isDefault>false</isDefault>
                     <createDate>2018-02-13T11:14:14+0900</createDate>
                  </accessControlGroup>
               </accessControlGroupList>
               <cloudDBServerInstanceList>
                  <cloudDBServerInstance>
                     <cloudDBServerInstanceNo>653559</cloudDBServerInstanceNo>
                     <cloudDBServerInstanceStatusName>running</cloudDBServerInstanceStatusName>
                     <cloudDBServerName>cnctest-001</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>M</code>
                        <codeName>Master</codeName>
                     </cloudDBServerRole>
                     <privateDnsName>db-ju7n.cdb.ntruss.com</privateDnsName>
                     <publicDnsName />
                     <dataStorageSize>0</dataStorageSize>
                     <createDate>2018-02-13T11:14:00+0900</createDate>
                     <uptime>2018-02-13T11:16:00+0900</uptime>
                  </cloudDBServerInstance>
                  <cloudDBServerInstance>
                     <cloudDBServerName>cnctest-002</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>H</code>
                        <codeName>Hidden Master</codeName>
                     </cloudDBServerRole>
                  </cloudDBServerInstance>
                  <cloudDBServerInstance>
                     <cloudDBServerInstanceNo>743149</cloudDBServerInstanceNo>
                     <cloudDBServerInstanceStatusName>deleting</cloudDBServerInstanceStatusName>
                     <cloudDBServerName>cnctest-004</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>S</code>
                        <codeName>Slave</codeName>
                     </cloudDBServerRole>
                     <privateDnsName>db-mlnd.cdb.ntruss.com</privateDnsName>
                     <publicDnsName />
                     <dataStorageSize>0</dataStorageSize>
                     <createDate>2018-04-17T15:48:00+0900</createDate>
                     <uptime>2018-04-17T15:52:00+0900</uptime>
                  </cloudDBServerInstance>
                  <cloudDBServerInstance>
                     <cloudDBServerInstanceNo>814921</cloudDBServerInstanceNo>
                     <cloudDBServerInstanceStatusName>running</cloudDBServerInstanceStatusName>
                     <cloudDBServerName>cnctest-005</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>S</code>
                        <codeName>Slave</codeName>
                     </cloudDBServerRole>
                     <privateDnsName>db-orq9.cdb.ntruss.com</privateDnsName>
                     <publicDnsName />
                     <dataStorageSize>10737418240</dataStorageSize>
                     <usedDataStorageSize>5</usedDataStorageSize>
                     <createDate>2018-06-11T00:50:00+0900</createDate>
                     <uptime>2018-06-11T00:53:00+0900</uptime>
                  </cloudDBServerInstance>
               </cloudDBServerInstanceList>
            </cloudDBInstance>
         </cloudDBInstanceList>
      </deleteCloudDBServerInstanceResponse>
      

getCloudDBInstanceList

  • API name

    Get CloudDB instance information

  • action

    getCloudDBInstanceList

  • Description

     Gets CloudDB instance information. (Information is not outputted if servers do not reside in the ZoneNo.)
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
pageNo Page number integer No
pageSize Page size integer No
dbKindCode DB type code String MYSQL, MSSQL, REDIS Yes
searchFilterName Search filter name String No
searchFilterValue Search filter value String No
regionNo Region number String No
zoneNo zone number String No
responseFormatType Response result format String No
  • pageNo

    • Page number based on the page size if the number of items is large.
  • pageSize

    • Number of items to be shown per page
  • dbKindCode

    • Enter a CloudDB type (MSSQL, MYSQL, or REDIS).
  • searchFilterName

    • Filter name for Cloud DB instances to get.
  • searchFilterValue

    • Filter value for Cloud DB instances to get.
  • regionNo

    • Get available values by using the Server API, getRegionList.
  • zoneNo

    • Get available values by using the Server API, getZoneList.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

       {CloudDB_API_URL}/getCloudDBInstanceList?dbKindCode=MSSQL
      
    • Response

      <getCloudDBInstanceListResponse>
                 <returnCode>0</returnCode>
                 <returnMessage>success</returnMessage>
                 <totalRows>3</totalRows>
             <cloudDBInstanceList>
                <cloudDBInstance>
                   <cloudDBInstanceNo>1057304</cloudDBInstanceNo>
                   <cloudDBServiceName>msqa1</cloudDBServiceName>
                   <dbKindCode>MSSQL</dbKindCode>
                   <engineVersion>MSSQL 2016 standard edition</engineVersion>
                   <cpuCount>2</cpuCount>
                   <dataStorageType>
                      <code>SSD</code>
                      <codeName>SSD</codeName>
                   </dataStorageType>
                   <licenseCode>SPLA</licenseCode>
                   <cloudDBPort>11433</cloudDBPort>
                   <isHa>true</isHa>
                   <cloudDBInstanceStatusName>running</cloudDBInstanceStatusName>
                   <collation>Korean_Wansung_CI_AS</collation>
                   <createDate>2018-11-09T17:20:00+0900</createDate>
                   <cloudDBImageProductCode>SPSWMSSQLWINNT01</cloudDBImageProductCode>
                   <cloudDBProductCode>SPSVRDBAAS000013</cloudDBProductCode>
                   <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
                   <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
                   <zone>
                      <zoneNo>3</zoneNo>
                      <zoneName>KR-2</zoneName>
                      <zoneCode>KR-2</zoneCode>
                      <zoneDescription>Pyeongchon zone</zoneDescription>
                      <regionNo>1</regionNo>
                   </zone>
                   <region>
                      <regionNo>1</regionNo>
                      <regionCode>KR</regionCode>
                      <regionName>Korea</regionName>
                   </region>
                   <cloudDBConfigList />
                   <cloudDBConfigGroupList>
                      <cloudDBConfigGroup>
                         <configGroupNo>0</configGroupNo>
                         <configGroupType>system</configGroupType>
                         <configGroupName>mssql_2016_default</configGroupName>
                      </cloudDBConfigGroup>
                   </cloudDBConfigGroupList>
                   <accessControlGroupList>
                      <accessControlGroup>
                         <accessControlGroupConfigurationNo>67517</accessControlGroupConfigurationNo>
                         <accessControlGroupName>cloud-mssql-mntk</accessControlGroupName>
                         <accessControlGroupDescription>Group for cloud MSSQL service 'msqa1' (automatically created)</accessControlGroupDescription>
                         <isDefault>false</isDefault>
                         <createDate>2018-11-09T17:20:35+0900</createDate>
                      </accessControlGroup>
                   </accessControlGroupList>
                   <cloudDBServerInstanceList>
                      <cloudDBServerInstance>
                         <cloudDBServerInstanceNo>1057305</cloudDBServerInstanceNo>
                         <cloudDBServerInstanceStatusName>running</cloudDBServerInstanceStatusName>
                         <cloudDBServerName>m-1057304-001</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>M</code>
                            <codeName>Master</codeName>
                         </cloudDBServerRole>
                         <privateDnsName>mssql-108go.cdb.ntruss.com</privateDnsName>
                         <publicDnsName />
                         <dataStorageSize>107374182400</dataStorageSize>
                         <usedDataStorageSize>649068544</usedDataStorageSize>
                         <createDate>2018-11-09T17:20:00+0900</createDate>
                         <uptime>2018-11-09T17:28:00+0900</uptime>
                      </cloudDBServerInstance>
                      <cloudDBServerInstance>
                         <cloudDBServerName>m-1057304-002</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>H</code>
                            <codeName>Hidden Master</codeName>
                         </cloudDBServerRole>
                      </cloudDBServerInstance>
                   </cloudDBServerInstanceList>
                </cloudDBInstance>
                <cloudDBInstance>
                   <cloudDBInstanceNo>1057235</cloudDBInstanceNo>
                   <cloudDBServiceName>msqa</cloudDBServiceName>
                   <dbKindCode>MSSQL</dbKindCode>
                   <engineVersion>MSSQL 2016 standard edition</engineVersion>
                   <cpuCount>2</cpuCount>
                   <dataStorageType>
                      <code>SSD</code>
                      <codeName>SSD</codeName>
                   </dataStorageType>
                   <licenseCode>SPLA</licenseCode>
                   <cloudDBPort>11433</cloudDBPort>
                   <isHa>true</isHa>
                   <cloudDBInstanceStatusName>running</cloudDBInstanceStatusName>
                   <collation>Korean_Wansung_CI_AS</collation>
                   <createDate>2018-11-09T17:10:00+0900</createDate>
                   <cloudDBImageProductCode>SPSWMSSQLWINNT01</cloudDBImageProductCode>
                   <cloudDBProductCode>SPSVRDBAAS000013</cloudDBProductCode>
                   <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
                   <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
                   <zone>
                      <zoneNo>3</zoneNo>
                      <zoneName>KR-2</zoneName>
                      <zoneCode>KR-2</zoneCode>
                      <zoneDescription>Pyeongchon zone</zoneDescription>
                      <regionNo>1</regionNo>
                   </zone>
                   <region>
                      <regionNo>1</regionNo>
                      <regionCode>KR</regionCode>
                      <regionName>Korea</regionName>
                   </region>
                   <cloudDBConfigList />
                   <cloudDBConfigGroupList>
                      <cloudDBConfigGroup>
                         <configGroupNo>0</configGroupNo>
                         <configGroupType>system</configGroupType>
                         <configGroupName>mssql_2016_default</configGroupName>
                      </cloudDBConfigGroup>
                   </cloudDBConfigGroupList>
                   <accessControlGroupList>
                      <accessControlGroup>
                         <accessControlGroupConfigurationNo>67514</accessControlGroupConfigurationNo>
                         <accessControlGroupName>cloud-mssql-mnrn</accessControlGroupName>
                         <accessControlGroupDescription>Group for cloud MSSQL service 'msqa' (automatically created)</accessControlGroupDescription>
                         <isDefault>false</isDefault>
                         <createDate>2018-11-09T17:10:26+0900</createDate>
                      </accessControlGroup>
                   </accessControlGroupList>
                   <cloudDBServerInstanceList>
                      <cloudDBServerInstance>
                         <cloudDBServerInstanceNo>1057237</cloudDBServerInstanceNo>
                         <cloudDBServerInstanceStatusName>running</cloudDBServerInstanceStatusName>
                         <cloudDBServerName>m-1057235-001</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>M</code>
                            <codeName>Master</codeName>
                         </cloudDBServerRole>
                         <privateDnsName>mssql-108ej.cdb.ntruss.com</privateDnsName>
                         <publicDnsName />
                         <dataStorageSize>107374182400</dataStorageSize>
                         <usedDataStorageSize>649068544</usedDataStorageSize>
                         <createDate>2018-11-09T17:10:00+0900</createDate>
                         <uptime>2018-11-09T17:17:00+0900</uptime>
                      </cloudDBServerInstance>
                      <cloudDBServerInstance>
                         <cloudDBServerName>m-1057235-002</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>H</code>
                            <codeName>Hidden Master</codeName>
                         </cloudDBServerRole>
                      </cloudDBServerInstance>
                   </cloudDBServerInstanceList>
                </cloudDBInstance>
                <cloudDBInstance>
                   <cloudDBInstanceNo>1010059</cloudDBInstanceNo>
                   <cloudDBServiceName>kimms2</cloudDBServiceName>
                   <dbKindCode>MSSQL</dbKindCode>
                   <engineVersion>MSSQL 2016 standard edition</engineVersion>
                   <cpuCount>2</cpuCount>
                   <dataStorageType>
                      <code>SSD</code>
                      <codeName>SSD</codeName>
                   </dataStorageType>
                   <licenseCode>SPLA</licenseCode>
                   <cloudDBPort>1433</cloudDBPort>
                   <isHa>true</isHa>
                   <cloudDBInstanceStatusName>running</cloudDBInstanceStatusName>
                   <collation>Korean_Wansung_CI_AS</collation>
                   <createDate>2018-10-18T22:19:00+0900</createDate>
                   <cloudDBImageProductCode>SPSWMSSQLWINNT01</cloudDBImageProductCode>
                   <cloudDBProductCode>SPSVRDBAAS000013</cloudDBProductCode>
                   <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
                   <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
                   <zone>
                      <zoneNo>3</zoneNo>
                      <zoneName>KR-2</zoneName>
                      <zoneCode>KR-2</zoneCode>
                      <zoneDescription>Pyeongchon zone</zoneDescription>
                      <regionNo>1</regionNo>
                   </zone>
                   <region>
                      <regionNo>1</regionNo>
                      <regionCode>KR</regionCode>
                      <regionName>Korea</regionName>
                   </region>
                   <cloudDBConfigList />
                   <cloudDBConfigGroupList>
                      <cloudDBConfigGroup>
                         <configGroupNo>0</configGroupNo>
                         <configGroupType>system</configGroupType>
                         <configGroupName>mssql_2016_default</configGroupName>
                      </cloudDBConfigGroup>
                   </cloudDBConfigGroupList>
                   <accessControlGroupList>
                      <accessControlGroup>
                         <accessControlGroupConfigurationNo>64403</accessControlGroupConfigurationNo>
                         <accessControlGroupName>cloud-mssql-lnd7</accessControlGroupName>
                         <accessControlGroupDescription>Group for cloud MSSQL service 'kimms2' (automatically created)</accessControlGroupDescription>
                         <isDefault>false</isDefault>
                         <createDate>2018-10-18T22:19:52+0900</createDate>
                      </accessControlGroup>
                   </accessControlGroupList>
                   <cloudDBServerInstanceList>
                      <cloudDBServerInstance>
                         <cloudDBServerInstanceNo>1010060</cloudDBServerInstanceNo>
                         <cloudDBServerInstanceStatusName>running</cloudDBServerInstanceStatusName>
                         <cloudDBServerName>m-1010059-001</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>M</code>
                            <codeName>Master</codeName>
                         </cloudDBServerRole>
                         <privateDnsName>mssql-uqcb.cdb.ntruss.com</privateDnsName>
                         <publicDnsName />
                         <dataStorageSize>107374182400</dataStorageSize>
                         <usedDataStorageSize>704643072</usedDataStorageSize>
                         <createDate>2018-10-18T22:19:00+0900</createDate>
                         <uptime>2018-10-18T22:28:00+0900</uptime>
                      </cloudDBServerInstance>
                      <cloudDBServerInstance>
                         <cloudDBServerName>m-1010059-002</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>H</code>
                            <codeName>Hidden Master</codeName>
                         </cloudDBServerRole>
                      </cloudDBServerInstance>
                      <cloudDBServerInstance>
                         <cloudDBServerInstanceNo>1014783</cloudDBServerInstanceNo>
                         <cloudDBServerInstanceStatusName>running</cloudDBServerInstanceStatusName>
                         <cloudDBServerName>m-1010059-003</cloudDBServerName>
                         <cloudDBServerRole>
                            <code>S</code>
                            <codeName>Slave</codeName>
                         </cloudDBServerRole>
                         <privateDnsName>mssql-uqcb-r001.cdb.ntruss.com</privateDnsName>
                         <publicDnsName />
                         <dataStorageSize>107374182400</dataStorageSize>
                         <usedDataStorageSize>701497344</usedDataStorageSize>
                         <createDate>2018-10-20T11:11:00+0900</createDate>
                         <uptime>2018-10-20T11:19:00+0900</uptime>
                      </cloudDBServerInstance>
                   </cloudDBServerInstanceList>
                </cloudDBInstance>
             </cloudDBInstanceList>
          </getCloudDBInstanceListResponse>
      

getCloudDBConfigGroupList

  • API name

    Select CloudDB groups

  • action

    getCloudDBConfigGroupList
    
  • Description

     Selects usefulCloudDB groups.
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
dbKindCode DBkind code String MySQL, MSSQL, REDIS Yes
responseFormatType response result format setting String response result format setting No
  • dbKindCode

    • MSSQL MySQL Redis
  • responseFormatType

    • Specify the response format. Select between JSON and XML.
  • Request

     <?xml version="1.0" encoding="UTF-8"?>
    <getCloudDBConfigGroupListResponse>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <cloudDBConfigGroupList>
        <cloudDBConfigGroup>
          <configGroupNo>0</configGroupNo>
          <configGroupType>system</configGroupType>
          <configGroupName>mssql_2016_default</configGroupName>
        </cloudDBConfigGroup>
      </cloudDBConfigGroupList>
    </getCloudDBConfigGroupListResponse>
    

getCloudDBImageProductList

  • API name

    Get product images

  • action

    getCloudDBImageProductList

  • Description

     No progress was made Gets available CloudDB image products.
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
exclusionProductCode Product code to exclude string Min : 1, Max : 20 No
productCode Product code to get string Min : 1, Max : 20 No
dbKindCode DB type code string MYSQL, MSSQL, REDIS Yes
regionNo Region number string No
responseFormatType Response result format String No
  • exclusionProductCode

    • Specify the maximum number of 20 product codes to exclude.
  • productCode

    • Specify the maximum number of 20 product codes to get.
  • dbKindCode

    • Enter a CloudDB type (MSSQL, MYSQL, or REDIS).
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/getCloudDBImageProductList?dbKindCode=MSSQL
      
    • Response

      <getCloudDBImageProductListResponse>
         <requestId>661a3159-6afc-4f7d-ac1f-4b425cb59232</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <productList>
            <product>
               <productCode>SPSWMSSQLWINNT01</productCode>
               <productName>MSSQL 2016 standard edition</productName>
               <productType>
                  <code>WINNT</code>
                  <codeName>Windows NT</codeName>
               </productType>
               <productDescription>Windows Server 2012r2 with MSSQL 2016 standard edition</productDescription>
               <infraResourceType>
                  <code>SW</code>
                  <codeName>Software</codeName>
               </infraResourceType>
               <cpuCount>0</cpuCount>
               <memorySize>0</memorySize>
               <baseBlockStorageSize>53687091200</baseBlockStorageSize>
               <platformType>
                  <code>WND64</code>
                  <codeName>Windows 64 Bit</codeName>
               </platformType>
               <osInformation>Windows Server 2012r2 with MSSQL 2016 standard edition</osInformation>
               <dbKindCode>MSSQL</dbKindCode>
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
         </productList>
         <totalRows>1</totalRows>
      </getCloudDBImageProductListResponse>
      

getCloudDBProductListRequest

  • API name

    Get products

  • action

    getCloudDBProductListRequest

  • Description

     Gets available CloudDB products.
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
exclusionProductCode Product code to exclude string Min : 1, Max : 20 No
cloudDBImageProductCode Image product code to get string Yes
productCode Product code to get string No
regionNo Region number string No
zoneNo Zone number string No
responseFormatType Response result format String No
  • exclusionProductCode
    • Specify the maximum number of 20 product codes to exclude.
  • cloudDBImageProductCode
    • Enter the code value returned by the getCloudDBImageProductList API.
  • productCode
    • A product code.
  • regionNo
    • Get available values by using the Server API, getRegionList.
  • zoneNo

    • Get available values by using the Server API, getZoneList.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/getCloudDBProductListRequest?cloudDBImageProductCode=SPSWMSSQLWINNT01
      
    • Response

      <getCloudDBProductListResponse>
         <requestId>09228255-0e4e-42ce-93ad-3a3d3c80ee74</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <productList>
            <product>
               <productCode>SPSVRDBAAS000013</productCode>
               <productName>vCPU 2EA, Memory 4GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 2EA, Memory 4GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>2</cpuCount>
               <memorySize>4294967296</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000017</productCode>
               <productName>vCPU 2EA, Memory 8GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 2EA, Memory 8GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>2</cpuCount>
               <memorySize>8589934592</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000014</productCode>
               <productName>vCPU 4EA, Memory 8GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 4EA, Memory 8GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>4</cpuCount>
               <memorySize>8589934592</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000018</productCode>
               <productName>vCPU 4EA, Memory 16GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 4EA, Memory 16GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>4</cpuCount>
               <memorySize>17179869184</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000015</productCode>
               <productName>vCPU 8EA, Memory 16GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 8EA, Memory 16GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>8</cpuCount>
               <memorySize>17179869184</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000019</productCode>
               <productName>vCPU 8EA, Memory 32GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 8EA, Memory 32GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>8</cpuCount>
               <memorySize>34359738368</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000016</productCode>
               <productName>vCPU 16EA, Memory 32GB</productName>
               <productType>
                  <code>STAND</code>
                  <codeName>Standard</codeName>
               </productType>
               <productDescription>vCPU 16EA, Memory 32GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>16</cpuCount>
               <memorySize>34359738368</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000029</productCode>
               <productName>vCPU 8EA, Memory 64GB</productName>
               <productType>
                  <code>HIMEM</code>
                  <codeName>High Memory</codeName>
               </productType>
               <productDescription>vCPU 8EA, Memory 64GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>8</cpuCount>
               <memorySize>68719476736</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000030</productCode>
               <productName>vCPU 16EA, Memory 64GB</productName>
               <productType>
                  <code>HIMEM</code>
                  <codeName>High Memory</codeName>
               </productType>
               <productDescription>vCPU 16EA, Memory 64GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>16</cpuCount>
               <memorySize>68719476736</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000031</productCode>
               <productName>vCPU 16EA, Memory 128GB</productName>
               <productType>
                  <code>HIMEM</code>
                  <codeName>High Memory</codeName>
               </productType>
               <productDescription>vCPU 16EA, Memory 128GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>16</cpuCount>
               <memorySize>137438953472</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
            <product>
               <productCode>SPSVRDBAAS000032</productCode>
               <productName>vCPU 24EA, Memory 128GB</productName>
               <productType>
                  <code>HIMEM</code>
                  <codeName>High Memory</codeName>
               </productType>
               <productDescription>vCPU 24EA, Memory 128GB</productDescription>
               <infraResourceType>
                  <code>DBAAS</code>
                  <codeName>Cloud DB</codeName>
               </infraResourceType>
               <cpuCount>24</cpuCount>
               <memorySize>137438953472</memorySize>
               <baseBlockStorageSize>107374182400</baseBlockStorageSize>
               <osInformation />
               <diskType>
                  <code>NET</code>
                  <codeName>Network Storage</codeName>
               </diskType>
               <dbKindCode />
               <addBlockStorageSize>0</addBlockStorageSize>
            </product>
         </productList>
         <totalRows>11</totalRows>
      </getCloudDBProductListResponse>
      

rebootCloudDBServerInstance

  • API name

    Reboot

  • action

    rebootCloudDBServerInstance

  • Description

     Reboots databases or handles failover.
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBServerInstanceNo CloudDb server instance number string Yes
isWithFailover Whether to enable failover bool No
isRebootNow Whether to reboot now bool No
rebootTime Scheduled time to reboot string Conditional
responseFormatType Response result format string No
  • cloudDBServerInstanceNo

    • Enter the value where cloudDBServerRole CodeName is Master, from a list of instances numbers returned by the getCloudDBInstanceList API.
  • isWithFailover

    • Supported by MSSQL only, and the default value is false. An input value is ignored in other CloudDB.
  • isRebootNow

    • Supported by MSSQL only, and the default value is true.
  • rebootTime

    • Supported by MSSQL only. The format example is 2018-05-30T00:00:00+0900, and you can add 5 minutes or more from the current time. If the isRebootNow value is set to false, this value is required.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/rebootCloudDBServerInstance?cloudDBServerInstanceNo=1057305
      
    • Response

      <rebootCloudDBServerInstanceResponse>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <totalRows>1</totalRows>
         <cloudDBInstanceList>
            <cloudDBInstance>
               <cloudDBInstanceNo>1057304</cloudDBInstanceNo>
               <cloudDBServiceName>msqa1</cloudDBServiceName>
               <dbKindCode>MSSQL</dbKindCode>
               <engineVersion>MSSQL 2016 standard edition</engineVersion>
               <cpuCount>2</cpuCount>
               <dataStorageType>
                  <code>SSD</code>
                  <codeName>SSD</codeName>
               </dataStorageType>
               <licenseCode>SPLA</licenseCode>
               <cloudDBPort>11433</cloudDBPort>
               <isHa>true</isHa>
               <cloudDBInstanceStatusName>restarting</cloudDBInstanceStatusName>
               <collation>Korean_Wansung_CI_AS</collation>
               <rebootScheduleTime>2018-11-13T10:51:36+0900</rebootScheduleTime>
               <createDate>2018-11-09T17:20:00+0900</createDate>
               <cloudDBImageProductCode>SPSWMSSQLWINNT01</cloudDBImageProductCode>
               <cloudDBProductCode>SPSVRDBAAS000013</cloudDBProductCode>
               <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
               <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
               <zone>
                  <zoneNo>3</zoneNo>
                  <zoneName>KR-2</zoneName>
                  <zoneCode>KR-2</zoneCode>
                  <zoneDescription>Pyeongchon zone</zoneDescription>
                  <regionNo>1</regionNo>
               </zone>
               <region>
                  <regionNo>1</regionNo>
                  <regionCode>KR</regionCode>
                  <regionName>Korea</regionName>
               </region>
               <cloudDBConfigList />
               <cloudDBConfigGroupList>
                  <cloudDBConfigGroup>
                     <configGroupNo>0</configGroupNo>
                     <configGroupType>system</configGroupType>
                     <configGroupName>mssql_2016_default</configGroupName>
                  </cloudDBConfigGroup>
               </cloudDBConfigGroupList>
               <accessControlGroupList>
                  <accessControlGroup>
                     <accessControlGroupConfigurationNo>67517</accessControlGroupConfigurationNo>
                     <accessControlGroupName>cloud-mssql-mntk</accessControlGroupName>
                     <accessControlGroupDescription>Group for cloud MSSQL service 'msqa1' (automatically created)</accessControlGroupDescription>
                     <isDefault>false</isDefault>
                     <createDate>2018-11-09T17:20:35+0900</createDate>
                  </accessControlGroup>
               </accessControlGroupList>
               <cloudDBServerInstanceList>
                  <cloudDBServerInstance>
                     <cloudDBServerInstanceNo>1057305</cloudDBServerInstanceNo>
                     <cloudDBServerInstanceStatusName>restarting</cloudDBServerInstanceStatusName>
                     <cloudDBServerName>m-1057304-001</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>M</code>
                        <codeName>Master</codeName>
                     </cloudDBServerRole>
                     <privateDnsName>mssql-108go.cdb.ntruss.com</privateDnsName>
                     <publicDnsName />
                     <dataStorageSize>107374182400</dataStorageSize>
                     <usedDataStorageSize>649068544</usedDataStorageSize>
                     <createDate>2018-11-09T17:20:00+0900</createDate>
                     <uptime>2018-11-09T17:28:00+0900</uptime>
                  </cloudDBServerInstance>
                  <cloudDBServerInstance>
                     <cloudDBServerName>m-1057304-002</cloudDBServerName>
                     <cloudDBServerRole>
                        <code>H</code>
                        <codeName>Hidden Master</codeName>
                     </cloudDBServerRole>
                  </cloudDBServerInstance>
               </cloudDBServerInstanceList>
            </cloudDBInstance>
         </cloudDBInstanceList>
      </rebootCloudDBServerInstanceResponse>
      

flushCloudDBInstance

  • API name

    Delete data

  • action

    flushCloudDBInstance

  • Description

    Deletes data from Redis.

  • Request parameters
Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number String REDIS Yes
  • Example
  • Request

    {CloudDB_API_URL}/flushCloudDBInstance?cloudDBInstanceNo=1010270
    
  • Response

    <flushCloudDBInstanceResponse>
       <returnCode>0</returnCode>
       <returnMessage>success</returnMessage>
       <totalRows>1</totalRows>
       <cloudDBInstanceList>
      <cloudDBInstance>
         <cloudDBInstanceNo>1010270</cloudDBInstanceNo>
         <cloudDBServiceName>testab</cloudDBServiceName>
         <dbKindCode>REDIS</dbKindCode>
         <engineVersion>REDIS 4.0.2</engineVersion>
         <cpuCount>4</cpuCount>
         <memorySize>3221225472</memorySize>
         <licenseCode>BSD</licenseCode>
         <cloudDBPort>6379</cloudDBPort>
         <isHa>true</isHa>
         <backupTime>12:30</backupTime>
         <backupFileRetentionPeriod>1</backupFileRetentionPeriod>
         <cloudDBInstanceStatusName>settingup</cloudDBInstanceStatusName>
         <collation />
         <createDate>2018-10-18T23:15:00+0900</createDate>
         <cloudDBImageProductCode>SPSWREDISLINUX01</cloudDBImageProductCode>
         <cloudDBProductCode>SPSVRDBAAS000008</cloudDBProductCode>
         <isCloudDBConfigNeedReboot>false</isCloudDBConfigNeedReboot>
         <isCloudDBNeedReboot>false</isCloudDBNeedReboot>
         <zone>
            <zoneNo>2</zoneNo>
            <zoneName>KR-1</zoneName>
            <zoneCode>KR-1</zoneCode>
            <zoneDescription>Gasan zone</zoneDescription>
            <regionNo>1</regionNo>
         </zone>
         <region>
            <regionNo>1</regionNo>
            <regionCode>KR</regionCode>
            <regionName>Korea</regionName>
         </region>
         <cloudDBConfigList>
            <cloudDBConfig>
               <configName>hash-max-ziplist-entries</configName>
               <configValue>512</configValue>
            </cloudDBConfig>
            <cloudDBConfig>
               <configName>hash-max-ziplist-value</configName>
               <configValue>64</configValue>
            </cloudDBConfig>
            <cloudDBConfig>
               <configName>list-max-ziplist-entries</configName>
               <configValue>512</configValue>
            </cloudDBConfig>
            <cloudDBConfig>
               <configName>list-max-ziplist-value</configName>
               <configValue>64</configValue>
            </cloudDBConfig>
            <cloudDBConfig>
               <configName>maxmemory-policy</configName>
               <configValue>volatile-lru</configValue>
            </cloudDBConfig>
            <cloudDBConfig>
               <configName>zset-max-ziplist-entries</configName>
               <configValue>128</configValue>
            </cloudDBConfig>
            <cloudDBConfig>
               <configName>zset-max-ziplist-value</configName>
               <configValue>64</configValue>
            </cloudDBConfig>
         </cloudDBConfigList>
         <cloudDBConfigGroupList />
         <accessControlGroupList>
            <accessControlGroup>
               <accessControlGroupConfigurationNo>64420</accessControlGroupConfigurationNo>
               <accessControlGroupName>cloud-redis-lnj2</accessControlGroupName>
               <accessControlGroupDescription>Group for cloud Redis service 'testab' (automatically created)</accessControlGroupDescription>
               <isDefault>false</isDefault>
               <createDate>2018-10-18T23:15:50+0900</createDate>
            </accessControlGroup>
         </accessControlGroupList>
         <cloudDBServerInstanceList>
            <cloudDBServerInstance>
               <cloudDBServerInstanceNo>1010271</cloudDBServerInstanceNo>
               <cloudDBServerInstanceStatusName>settingup</cloudDBServerInstanceStatusName>
               <cloudDBServerName>testafe-001</cloudDBServerName>
               <cloudDBServerRole>
                  <code>M</code>
                  <codeName>Master</codeName>
               </cloudDBServerRole>
               <privateDnsName>redis-uqiv.cdb.ntruss.com</privateDnsName>
               <publicDnsName />
               <dataStorageSize>0</dataStorageSize>
               <createDate>2018-10-18T23:15:00+0900</createDate>
               <uptime>2018-10-18T23:18:00+0900</uptime>
            </cloudDBServerInstance>
            <cloudDBServerInstance>
               <cloudDBServerName>testafe-002</cloudDBServerName>
               <cloudDBServerRole>
                  <code>H</code>
                  <codeName>Hidden Master</codeName>
               </cloudDBServerRole>
            </cloudDBServerInstance>
         </cloudDBServerInstanceList>
      </cloudDBInstance>
       </cloudDBInstanceList>
      </flushCloudDBInstanceResponse>
    

getCloudDBConfigGroupList

  • API name

    Get configuration groups

  • action

    getCloudDBConfigGroupList

  • Description

     Gets a list of available Cloud DB config groups.
    
  • Request parameters

Parameter Brief Description Type Restrictions Data Type
dbKindCode DB type code String MYSQL, MSSQL, REDIS Yes
responseFormatType Response result format String No
  • dbKindCode

    • Select among MYSQL, MSSQL, or REDIS.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/getCloudDBConfigGroupList?dbKindCode=MSSQL
      
    • Response

      <getCloudDBConfigGroupListResponse>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <totalRows>2</totalRows>
         <cloudDBConfigGroupList>
            <cloudDBConfigGroup>
               <configGroupNo>0</configGroupNo>
               <configGroupType>system</configGroupType>
               <configGroupName>mssql_2016_default</configGroupName>
            </cloudDBConfigGroup>
            <cloudDBConfigGroup>
               <configGroupNo>19</configGroupNo>
               <configGroupType>user</configGroupType>
               <configGroupName>ldhtest</configGroupName>
            </cloudDBConfigGroup>
         </cloudDBConfigGroupList>
      </getCloudDBConfigGroupListResponse>
      

DMS

setObjectStorageInfo

  • API name

    Store configuration of DMS Object Storage

  • action

    setObjectStorageInfo

  • Description

    Sets Object Storage information. (This must be set for file uploads and downloads, and can be restored from Ncloud or Amazon S3 compatible API Object Storage or Archive Storage.) Currently, DMS is supported only in MSSQL.

  • Request parameters

Parameter Brief Description Type Restrictions Required
objectStorageAccessKey s3 api access key String Yes
objectStorageSecretKey s3 api secret key String Yes
endpoint Access URL String Yes
bucketName Folder name String Yes
responseFormatType Response result format String No
  • objectStorageAccessKey

    • An access key compatible with the A3 API. For NAVER CLOUD PLATFORM’s Object Storage, go to My Page > Manage Account > Manage Auth Key in the portal to get an access key.
  • objectStorageSecretKey

    • A secret key compatible with the S3 API. For NAVER CLOUD PLATFORM’s Object Storage, you can get a secret key, next to your access key.
  • endpoint

  • bucketName

    • A bucket name of Object Storage used in DMS. In Windows, the equivalent of a bucket is a drive (e.g., C:), and every bucket name is unique across all existing bucket names in Object Storage. Specify the name of a bucket, which you can create in NAVER CLOUD PLATFORM’s Object Storage console.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/setObjectStorageInfo?objectStorageAccessKey=1vC3VPgZ1X6e4nqSd0TK&objectStorageSecretKey=PGgM0dXAGOXlavgKVbXeqTpzWBLlqqRSgYA701K6&endpoint=https%3A%2F%2Fkr.objectstorage.ncloud.com&bucketName=kimmsobj
      
    • Response

      <setObjectStorageInfoResponse>
         <requestId>899ef374-bea9-4806-9fef-fdd97e3fb7d6</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
      </setObjectStorageInfoResponse>
      

downloadDmsFile

  • API name

    Download from Object Storage to an internal backup storage

  • action

    downloadDmsFile

  • Description

    Downloads backup files from the Amazon S3 compatible storage to the internal backup storage, using the information that is stored with setObjectStorageInfo. The backup files can be used to restore your database only after they are transferred to the internal backup storage. Use getDmsOperation to get the download progress, with the requestNo you can get from the response.

  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number string Yes
fileName File name string Yes
responseFormatType Response result format string No
  • cloudDBInstanceNo

    • A CloudDB instance number. You can get an available value from the instance list. For example, if MSSQL’s DB server name is “m-1010059-001,” cloudDBInstanceNo is 010059.
  • fileName

    • Enter the name of a file to download. A file associated with this name is located in an S3 Object Storage bucket. You can specify the file name including the folder name, like “subfolder/BackupFile.Bak.” Otherwise, just specify the file name.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Input

      {CloudDB_API_URL}/downloadDmsFile?cloudDBInstanceNo=1010059&fileName=filename.full
      
    • Output

      <downloadDmsFileResponse>
         <requestId>57a350ef-bbb0-4ff6-8e08-5de3ad7795d5</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <requestNo>781996</requestNo>
      </downloadDmsFileResponse>
      

uploadDmsFile

  • API name

    Upload from an internal backup storage to Object Storage

  • action

    uploadDmsFile

  • Description

    Uploads backups, which are automatically performed by a running database, to Object Storage. (The directory for internet recovery referenced by downloadDmsFile is physically different from the backup directory referenced by uploadDmsFile, for reliability reasons.)

  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number string Yes
fileName File name string Yes
responseFormatType Response result format string No
  • cloudDBInstanceNo

    • Enter a CloudDB instance number.
  • fileName

    • Enter a file name returned by the getBackupList API.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/uploadDmsFile?cloudDBInstanceNo=1010059&fileName=newRestoreDb_20181019_160029.full
      
    • Response

      <uploadDmsFileResponse>
         <requestId>38b59004-e63e-43de-ba55-fdfa02ff716d</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <requestNo>782184</requestNo>
      </uploadDmsFileResponse>
      

getObjectStorageBackupList

  • API name

    Files in an internal backup storage (users)

  • action

    getObjectStorageBackupList

  • Description

    Gets a list of backup files transferred from Object Storage to the internal backup storage. Only the backup files transferred to the internal backup storage can be used to restore databases. The files in the internal backup storage will be completely deleted 15 days after being transferred, and cannot be deleted manually by users. (If you download a file with the same name from Object Storage to the internal backup storage, the existing file is replaced with the new one.) Get a list to check if the on-premises databases, Object Storage and the internal backup storage are the same in size.

  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number string Yes
folderName Folder name string Yes
responseFormatType Response result format string No
  • cloudDBInstanceNo

    • Enter a CloudDB instance number.
  • folderName

    • Enter a folder name. If you leave it empty or enter a slash (/) instead of a folder name, a root folder of an internal backup storage is retrieved, which is the root of your bucket.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/getObjectStorageBackupList?cloudDBInstanceNo=1010059&folderName=/
      
    • Response

      <getObjectStorageBackupListResponse>
         <requestId>6a232815-2f74-4e19-8324-ac2f951bbd43</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <totalRows>1</totalRows>
         <dmsFileList>
            <dmsFile>
               <fileLength>2906624</fileLength>
               <lastWriteTime>2018-11-10T17:03:53+0900</lastWriteTime>
               <fileName>CloudControl.full</fileName>
            </dmsFile>
         </dmsFileList>
      </getObjectStorageBackupListResponse>
      

getBackupList

  • API name

    Files in an internal backup storage (automatic backup)

  • action

    getBackupList

  • Description

     Gets a list of automatic backups.
    
  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number String Yes
databaseName Database name String No
type Backup type code String No
responseFormatType Response result format String No
  • cloudDBInstanceNo

    • Enter an CloudDB instance number.
  • databaseName

    • Enter a database name.
  • type

    • D(Database), L (TrasactionLog)
  • Example

    • Request

      {CloudDB_API_URL}/getBackupList?cloudDBInstanceNo=1057304
      
    • Response

      <getBackupListResponse>
         <requestId>6f416c7f-dd74-42fc-b067-02553147e8da</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <totalRows>2</totalRows>
         <backupFileList>
            <backupFile>
               <hostName>m-1057304-001</hostName>
               <fileName>msdb_20181109_173443.full</fileName>
               <databaseName>msdb</databaseName>
               <firstLsn>137000000047600037</firstLsn>
               <lastLsn>137000000050000001</lastLsn>
               <backupType>
                  <code>D</code>
                  <codeName>Database Log</codeName>
               </backupType>
               <backupStartTime>2018-11-09T17:34:44+0900</backupStartTime>
               <backupEndTime>2018-11-09T17:34:44+0900</backupEndTime>
            </backupFile>
            <backupFile>
               <hostName>m-1057304-001</hostName>
               <fileName>msdb_20181110_000108.full</fileName>
               <databaseName>msdb</databaseName>
               <firstLsn>137000000080600017</firstLsn>
               <lastLsn>137000000081500001</lastLsn>
               <backupType>
                  <code>D</code>
                  <codeName>Database Log</codeName>
               </backupType>
               <backupStartTime>2018-11-10T00:03:10+0900</backupStartTime>
               <backupEndTime>2018-11-10T00:03:10+0900</backupEndTime>
            </backupFile>
         </backupFileList>
      </getBackupListResponse>
      

restoreDmsDatabase

  • API name

    Restore database

  • action

    restoreDmsDatabase

  • Description

    Restores databases with the backup files in the internal backup storage. Make sure isRecovery is correctly set, as there is no restore database [userdb] with recovery API. Use getDmsOperation to get the restoration progress, with the requestNo you can get from the response.

  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number String Yes
fileName File name String Yes
isRecovery Whether to enable recovery Boolean Yes
newDatabaseName New database name String Yes
responseFormatType Response result format String No
  • cloudDBInstanceNo

    • Enter a CloudDB instance number.
  • fileName

    • Enter a file name. If the file is uploaded to a folder in Object Storage’s bucket, specify the file name in the form of subfolder/filename.
  • isRecovery

    • Select restoration mode between recovery and norecovery. Set this parameter to 1 if you do not need to restore log backups any more, and 0 if you need to restore additional logs with restoreDmdLog.
  • newDatabaseName

    • Enter the name of a new database to restore. It must be unique over the database instances to restore.
  • Example

    • Request

      {CloudDB_API_URL}/restoreDmsDatabase?cloudDBInstanceNo=1010059&fileName=d1.full&isRecovery=0
      
    • Response

      <restoreDmsDatabaseResponse>
         <requestId>e7ed561c-50de-4772-8791-c6b9bf5dbe10</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <requestNo>782352</requestNo>
      </restoreDmsDatabaseResponse>
      

restoreDmsTransactionLog

  • API name

    Restore DMS transaction logs

  • action

    restoreDmsTransactionLog

  • Description

    Restores DMS transaction logs.

  • Request parameters

Parameter Brief Description Type Restrictions Required
cloudDBInstanceNo CloudDB instance number String Yes
fileName File name String Yes
isRecovery Whether to enable recovery Boolean Yes
newDatabaseName New database name String Yes
stopTime stopat time value String No
responseFormatType Response result format String No
  • cloudDBInstanceNo

    • Enter a CloudDB instance number.
  • fileName

    • Enter a file name.
  • isRecovery

    • Select restoration mode between recovery and norecovery. Enter 1 if you restore the last transaction log backups.
  • newDatabaseName

    • Enter the name of a new database to restore.
  • stopTime

    • Enter time to restore (stopat). Specify the value in yyyy-MM-dd'T'HH:mm:ssZ format. If it is null, transaction logs are restored to the latest point. Example: 2018-11-10T10:10:10+0900
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/restoreDmsTransactionLog?cloudDBInstanceNo=1010059&fileName=d1.log&isRecovery=1
      
    • Response

      <restoreDmsTransactionLogResponse>
         <requestId>55589c37-ba91-42fb-9e8f-fd43b38c603d</requestId>
         <returnCode>0</returnCode>
         <returnMessage>success</returnMessage>
         <requestNo>782402</requestNo>
      </restoreDmsTransactionLogResponse>
      

getDmsOperation

  • API name

    Get the of DMS execution

  • action

    getDmsOperation

  • Description

    Gets the status of DMS execution. See the codeName in the response.

  • Request parameters

Parameter Brief Description Type Restrictions Required
requestNo Asynchronous execution code string Yes
responseFormatType Response result format string No
  • requestNo

    • You can get a requestNo after executing a command. It is used to get the status of executing the command.
  • responseFormatType

    • Specify the response format. Select between xml and json.
  • Example

    • Request

      {CloudDB_API_URL}/getDmsOperation?requestNo=782063
      
    • Response

      <getDmsOperationResponse>
           <requestId>e358ae1d-f4e4-4c03-8cb9-ac145da595a4</requestId>
           <returnCode>0</returnCode>
           <returnMessage>success</returnMessage>
           <status>
              <code>COMP</code>
              <codeName>completed</codeName>
           </status>
      </getDmsOperationResponse>
      

Example

PostExample

  • Outputs a list of zones in a region (see the Server API)

      public async void PostExample()
      {
        Config config = Config.Instance;
        var postParams = new List<KeyValuePair<string, string>>();
        postParams.Add(new KeyValuePair<string, string>("responseFormatType", "json"));
        postParams.Add(new KeyValuePair<string, string>("regionNo", "1"));
        postParams.Add(new KeyValuePair<string, string>("responseFormatType", "json"));
        AsyncCall asyncCall = new AsyncCall();
        Task<string> result = asyncCall.WebApiCall(config.ncpUrl, GetPostType.POST, "/server/v1/getZoneList", postParams);
        string json = await result;
        Console.WriteLine("* PostResult *");
        Console.WriteLine(json);
      }
    

GetExample

  • Outputs a list of MSSQL configuration groups (see the CloudDB API)

      public async void GetExample()
      {
          Config config = Config.Instance;
          AsyncCall asyncCall = new AsyncCall();
          Task<string> result = asyncCall.WebApiCall(config.ncpUrl, GetPostType.GET, "/clouddb/v1/getCloudDBConfigGroupList?dbKindCode=MSSQL&responseFormatType=json", "");
          string json = await result;
          Console.WriteLine("* GetResult *");
          Console.WriteLine(json);
      }
    

ConsoleApplicationFullExample

  • Replace accessKey, secureKey, and apiKey in the code example with your API authentication key information and then run it.

  • The difference between the request v1 and the request v2 in Action is that apiKey is included. The following example shows the request v1.

      using System;
      using System.Collections.Generic;
      using System.Threading.Tasks;
      using System.Text;
      using System.Net.Http;
      using System.Threading;
      using System.Security.Cryptography;
    
      namespace ApiExample
      {
          enum GetPostType { POST, GET };
          public class Config
          {
              private static readonly Lazy<Config> lazy =
                  new Lazy<Config>(() => new Config(), LazyThreadSafetyMode.ExecutionAndPublication);
    
              public static Config Instance { get { return lazy.Value; } }
    
              public string accessKey
              {
                  get { return "11vC3VPgZ1X6e4nqSd0TK1"; }
              }
              public string secureKey
              {
                  get { return "1PGgM0dXAGOXlavgKVbXeqTpzWBLlqqRSgYA701K61"; }
              }
              public string apiKey
              {
                  get { return "1r68YnlrFNpdaOYMiL2BLljsmv92YCGw01usfbkiS1"; }
              }
    
              public string ncpUrl
              {
                  get { return @"https://ncloud.apigw.ntruss.com"; }
              }
          }
    
          class Program
          {
              static void Main(string[] args)
              {
                  Program p = new Program();
                  p.PostExample();
                  p.GetExample();
                  Console.ReadKey();
              }
    
              public async void PostExample()
              {
                  Config config = Config.Instance;
                  var postParams = new List<KeyValuePair<string, string>>();
                  postParams.Add(new KeyValuePair<string, string>("responseFormatType", "json"));
                  postParams.Add(new KeyValuePair<string, string>("regionNo", "1"));
                  postParams.Add(new KeyValuePair<string, string>("responseFormatType", "json"));
                  AsyncCall asyncCall = new AsyncCall();
                  Task<string> result = asyncCall.WebApiCall(config.ncpUrl, GetPostType.POST, "/server/v1/getZoneList", postParams);
                  string json = await result;
                  Console.WriteLine("* PostResult *");
                  Console.WriteLine(json);
              }
    
              public async void GetExample()
              {
                  Config config = Config.Instance;
                  AsyncCall asyncCall = new AsyncCall();
                  Task<string> result = asyncCall.WebApiCall(config.ncpUrl, GetPostType.GET, "/clouddb/v1/getCloudDBConfigGroupList?dbKindCode=MSSQL&responseFormatType=json", "");
                  string json = await result;
                  Console.WriteLine("* GetResult *");
                  Console.WriteLine(json);
              }
          }
    
          class AsyncCall
          {
    
              public async Task<string> WebApiCall(string url, GetPostType calltype, string action)
              {
                  return await WebApiCall(url, calltype, action, "");
              }
    
              public async Task<string> WebApiCall(string ncpUrl, GetPostType calltype, string action, List<KeyValuePair<string, string>> parameters)
              {
                  Config config = Config.Instance;
                  string accessKey = config.accessKey;
                  string secureKey = config.secureKey;
                  string apiKey = config.apiKey;
                  string responseString = string.Empty;
                  try
                  {
    
                      using (HttpClient client = new HttpClient())
                      {
                          client.Timeout = TimeSpan.FromMilliseconds(5000);
                          string timestamp = string.Empty;
                          string sig = Auth.Instance.makeSignature(calltype, action, ref timestamp, accessKey, secureKey, apiKey);
                          string url = ncpUrl + action;
    
                          client.DefaultRequestHeaders.Add("x-ncp-apigw-timestamp", timestamp);
                          client.DefaultRequestHeaders.Add("x-ncp-apigw-api-key", apiKey);
                          client.DefaultRequestHeaders.Add("x-ncp-iam-access-key", accessKey);
                          client.DefaultRequestHeaders.Add("x-ncp-apigw-signature-v1", sig);
    
                          if (calltype == GetPostType.POST)
                          {
                              var content = new FormUrlEncodedContent(parameters);
                              var response = await client.PostAsync(url, content);
                              responseString = await response.Content.ReadAsStringAsync();
                          }
                          else
                          {
                              var response = await client.GetAsync(url);
                              responseString = await response.Content.ReadAsStringAsync();
                          }
                      }
                  }
                  catch (Exception ex)
                  {
                      Console.WriteLine("{0}, {1}", ex.Message, ex.StackTrace);
                  }
                  return responseString;
              }
    
              public async Task<string> WebApiCall(string ncpUrl, GetPostType calltype, string action, string parameters)
              {
                  Config config = Config.Instance;
                  string accessKey = config.accessKey;
                  string secureKey = config.secureKey;
                  string apiKey = config.apiKey;
                  string responseString = string.Empty;
                  try
                  {
                      using (HttpClient client = new HttpClient())
                      {
                          client.Timeout = TimeSpan.FromMilliseconds(5000);
                          string timestamp = string.Empty;
                          string sig = Auth.Instance.makeSignature(calltype, action, ref timestamp, accessKey, secureKey, apiKey);
                          string url = ncpUrl + action;
                          client.DefaultRequestHeaders.Add("x-ncp-apigw-timestamp", timestamp);
                          client.DefaultRequestHeaders.Add("x-ncp-apigw-api-key", apiKey);
                          client.DefaultRequestHeaders.Add("x-ncp-iam-access-key", accessKey);
                          client.DefaultRequestHeaders.Add("x-ncp-apigw-signature-v1", sig);
                          if (calltype == GetPostType.POST)
                          {
                              var content = new StringContent(parameters, Encoding.UTF8, "application/json");
                              var response = await client.PostAsync(url, content);
                              responseString = await response.Content.ReadAsStringAsync();
                          }
                          else
                          {
                              var response = await client.GetAsync(url);
                              responseString = await response.Content.ReadAsStringAsync();
                          }
                      }
                  }
                  catch (Exception ex)
                  {
                      Console.WriteLine("{0}, {1}", ex.Message, ex.StackTrace);
                  }
                  return responseString;
              }
          }
    
          class Auth
          {
              private static readonly Lazy<Auth> lazy =
                  new Lazy<Auth>(() => new Auth(), LazyThreadSafetyMode.ExecutionAndPublication);
              Config config;
              public static Auth Instance { get { return lazy.Value; } }
              Auth()
              {
                  config = Config.Instance;
              }
              public string makeSignature(GetPostType calltype, string action, ref string stringtimestamp, string accessKey, string secureKey, string apiKey)
              {
                  if (string.IsNullOrEmpty(action))
                      return "parameter error";
                  long timestamp = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds;
                  string space = " ";
                  string newLine = "\n";
                  string method = calltype == GetPostType.POST ? "POST" : "GET";
                  string url = action;
                  stringtimestamp = timestamp.ToString();
                  string message = new StringBuilder()
                          .Append(method)
                          .Append(space)
                          .Append(url)
                          .Append(newLine)
                          .Append(stringtimestamp)
                          .Append(newLine)
                          .Append(apiKey)
                          .Append(newLine)
                          .Append(accessKey)
                          .ToString();
                  byte[] secretKey = Encoding.UTF8.GetBytes(secureKey);
                  HMACSHA256 hmac = new HMACSHA256(secretKey);
                  hmac.Initialize();
                  byte[] bytes = Encoding.UTF8.GetBytes(message);
                  byte[] rawHmac = hmac.ComputeHash(bytes);
                  return Convert.ToBase64String(rawHmac);
              }
          }
      }
    

SampleAppDownload

に対する検索結果は~件です。 ""

    に対する検索結果がありません。 ""

    処理中...