flushCloudDBInstance
    • PDF

    flushCloudDBInstance

    • PDF

    Article Summary

    Overview

    It is the Redis Data Flush API.

    Request

    Request header

    HeaderDescription
    x-ncp-apigw-timestampIt is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid.
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-apigw-api-keyAPI key issued by API Gateway (not used in the API v2)
    x-ncp-apigw-api-key:{API Gateway API Key}
    x-ncp-iam-access-keyAccess Key ID issued from the NAVER Cloud Platform portal.
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with your Access Key ID and Secret Key.
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeSet the request body content type to application/json.
    Content-Type: application/json

    Request body

    Field names in the request body are case sensitive.

    ParameterRequiredTypeLimitationsDescription
    cloudDBInstanceNoYStringCloudDB instance number
    responseFormatTypeNStringResponse format
    • cloudDBInstanceNo
      • Instance number of the created Redis server.
    • responseFormatType
      • Response format. Select between xml and json.

    Response

    FieldTypeDescriptionNote
    returnCodeIntegerResponse code
    returnMessageStringResponse message
    totalRowsIntegerNumber of response result rows
    cloudDBInstanceList[]StringCreated Cloud DB instance information

    Examples

    Request example

    curl 
    -X POST "https://ncloud.apigw.ntruss.com/clouddb/v2/flushCloudDBInstance" -H "accept: application/json" 
    -H "Content-Type: application/x-www-form-urlencoded" 
    -H "x-ncp-apigw-api-key: 25bpuog9sz" 
    -H "x-ncp-iam-access-key: Y0Z9EG0lKoeWAQCSHRtM" 
    -H "x-ncp-apigw-timestamp: 1546221796556" 
    -H "x-ncp-apigw-signature-v2: 5dTxKRpMotjN64uUixKVT2Vd4HuQsjIN1QihCxcYE8A=" 
    -d "cloudDBInstanceNo=882689&responseFormatType=json"
    
    https://ncloud.apigw.ntruss.com/clouddb/v2/flushCloudDBInstance
    

    Request sample

    • Redis Data Flush
    {
      "cloudDBInstanceNo": "882689",
      "responseFormatType": "json"
    }
    

    Response example

    connection: keep-alive 
    content-type: application/json;charset=UTF-8 
    date: Mon, 24 Dec 2018 08:59:40 GMT 
    server: nginx 
    transfer-encoding: chunked 
    x-ncp-trace-id: 6acpi6di6apj536ob5cksjcor2 
    
    
    {
      "flushCloudDBInstanceResponse": {
        "returnCode": "0",
        "returnMessage": "success",
        "totalRows": 1,
        "cloudDBInstanceList": [
          {
            "cloudDBInstanceNo": "882689",
            "cloudDBServiceName": "test",
            "dbKindCode": "REDIS",
            "engineVersion": "REDIS 4.0.2",
            "cpuCount": 4,
            "memorySize": 3221225472,
            "licenseCode": "BSD",
            "cloudDBPort": 6379,
            "isHa": true,
            "backupTime": "00:45",
            "backupFileRetentionPeriod": 1,
            "cloudDBInstanceStatusName": "settingup",
            "collation": "",
            "createDate": "2018-12-28T17:28:00+0900",
            "cloudDBImageProductCode": "SPSWREDISLINUX01",
            "cloudDBProductCode": "SPSVRDBAAS000008",
            "isCloudDBConfigNeedReboot": false,
            "isCloudDBNeedReboot": false,
            "zone": {
              "zoneNo": "2",
              "zoneName": "KR-1",
              "zoneCode": "KR-1",
              "zoneDescription": "Gasan zone",
              "regionNo": "1"
            },
            "region": {
              "regionNo": "1",
              "regionCode": "KR",
              "regionName": "Korea"
            },
            "cloudDBConfigList": [],
            "cloudDBConfigGroupList": [],
            "accessControlGroupList": [
              {
                "accessControlGroupConfigurationNo": "23953",
                "accessControlGroupName": "cloud-redis-ix35",
                "accessControlGroupDescription": "Group for cloud Redis service 'test' (automatically created)",
                "isDefault": false,
                "createDate": "2018-12-28T17:28:17+0900"
              }
            ],
            "cloudDBServerInstanceList": [
              {
                "cloudDBServerInstanceNo": "882690",
                "cloudDBServerInstanceStatusName": "settingup",
                "cloudDBServerName": "test123-001",
                "cloudDBServerRole": {
                  "code": "M",
                  "codeName": "Master"
                },
                "privateDnsName": "redis-qu02.beta-cdb.ntruss.com",
                "publicDnsName": "",
                "dataStorageSize": 0,
                "usedDataStorageSize": 0,
                "createDate": "2018-12-28T17:28:00+0900",
                "uptime": "2018-12-28T17:30:00+0900"
              },
              {
                "cloudDBServerName": "test123-002",
                "cloudDBServerRole": {
                  "code": "H",
                  "codeName": "Hidden Master"
                }
              }
            ]
          }
        ]
      }
    }
    

    Error codes

    If a Cloud DB API request is invalid or an error occurs while processing the request, the API returns an HTTP status code representing success or failure with a detailed message in JSON.

    There are two types of error codes: “common error code” of the Cloud DB API and “API Gateway error code.”

    Error codeResponse messageDescription
    200Ok
    500Server Error

    Was this article helpful?

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