• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API Calling
  5. Examples
  6. Deleting a DB Instance (v1)

Deleting a DB Instance (v1)

Flow Chart

Figure 1 Process of deleting a DB instance
  1. Call List Database Instance to obtain the instance ID ($instanceId) of a tenant database.
  2. Call Delete Database Instance. $instanceId obtained in 1 is used in the request URL.

API Calling

  1. Query the DB instance list.
    curl -H "Content-Type: application/json" "X-Auth-Token: $X-Subject-Token" "X-Language: en-us"$SERVER_URL/v1/{project_id}/instances

    Example response:

    {
        "instance": {
            "id": "b0468a4a-5790-4a4f-8442-9030e52369e6",
            "status": "ACTIVE",
            "name": "tenant-instance-1232213",
            "created": "2016-06-22T17:47:44+0800",
            "hostname": "172.16.4.208",
            "type": "master",
            "region": "eu-de",
            "updated": "2016-06-22T17:47:44+0800",
            "availabilityZone": "eu-de-01",
            "vpc": "f7513b5d-5c48-4332-8f47-a3c29c2613e7",
            "nics": {
                "subnetId": "4a7d3555-6410-4338-8859-2be61d51662a"
            },
            "securityGroup": {
                "id": "bb62ffb9-a37a-4821-92b9-f9e0712e389f"
            },
            "flavor": {
                "id": "bf07a6d4-844a-4023-a776-fc5c5fb71fb4"
            },
            "volume": {
                "type": "ULTRAHIGH",
                "size": 100,
            },
            "backupStrategy": {
                "startTime": "01:00:00",
                "keepDays": 3
            }
        }
    }
  2. Delete the DB instance.
    curl -X DELETE $SERVER_URL/v1/{project_id}/instances/{instanceId} -H "Content-Type: application/json" "X-Auth-Token: $X-Subject-Token" "X-Language: en-us"

    Example response:

    {
       "extendparam": {
          "jobs": [ 
             {
                 "id":"ff8080815a88d52c015a8a0db2250003"
             } 
          ]
       }
    }