Help Center/ Elastic Volume Service/ API Reference/ API/ Disk Management/ Unsubscribing from Yearly/Monthly EVS Disks
Updated on 2024-02-27 GMT+08:00

Unsubscribing from Yearly/Monthly EVS Disks

Function

This API is used to unsubscribe from yearly/monthly EVS disks. It has the following constraints:

  • It cannot be used to unsubscribe from system disks and bootable disks. They must be unsubscribed from together with their servers.
  • A maximum of 60 disks can be unsubscribed from at the same time using this API.

Calling Method

For details, see Calling APIs.

URI

POST /v2/{project_id}/cloudvolumes/unsubscribe

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

The user token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

volume_ids

Yes

Array of strings

The IDs of the disks to be unsubscribed from.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of UnsubscribeVolumeResponseBody objects

The request is responded.

Table 5 UnsubscribeVolumeResponseBody

Parameter

Type

Description

results

Array of UnsubscribeVolume objects

The unsubscription result.

Table 6 UnsubscribeVolume

Parameter

Type

Description

volume_id

String

The disk ID.

order_id

String

The unsubscription order ID. This field does not appear if the disk is unsubscribed from because it is expired.

result

String

The unsubscription result. The value can be SUCCESS or FAIL.

fail_reason

String

The returned failure cause if result is FAIL. This field does not appear if result is SUCCESS.

Example Requests

Unsubscribing from yearly/monthly disks whose IDs are 8739ca48-1b86-46aa-9059-38623ee1346c and fc7d594d-e78f-49a8-ab6e-90ee6b560cb0

POST /v2/{project_id}/cloudvolumes/unsubscribe

{
  "volume_ids" : [ "fc7d594d-e78f-49a8-ab6e-90ee6b560cb0", "8739ca48-1b86-46aa-9059-38623ee1346c" ]
}

Example Responses

Status code: 202

The request is responded.

{
  "results" : [ {
    "volume_id" : "8739ca48-1b86-46aa-9059-38623ee1346c",
    "order_id" : "CS23021116385NAOR",
    "result" : "SUCCESS"
  }, {
    "volume_id" : "fc7d594d-e78f-49a8-ab6e-90ee6b560cb0",
    "result" : "FAIL",
    "fail_reason" : "INTERNAL ERROR, please contact customer service"
  } ]
}

Status Codes

Status Code

Description

202

The request is responded.

Error Codes

See Error Codes.