Updated on 2026-09-10 GMT+08:00

Querying Instances

Function

This API is used to query the instance list.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1/cnad/packages

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It 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.

Content-Type

Yes

String

Content-Type

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

total

Integer

Total

items

Array of PackageResponse objects

Data

Table 3 PackageResponse

Parameter

Type

Description

package_id

String

Instance ID.

package_name

String

Instance name

region_id

String

Region to which the resource belongs.

protection_type

Integer

Protection type.

instance_type

String

Instance type. cnad_pro: CNAD Unlimited Protection Basic Edition; cnad_ip: CNAD Standard Edition; cnad_full_high: CNAD Unlimited Protection Advanced Edition; cnad_v2: CNAD Native Protection 2.0; cnad_vic: CNAD Pay-per-Use Edition

resource_id

String

Resource ID.

count_down_code

String

Countdown information.

count_down_infos

String

Countdown information.

count_down_tips

String

Countdown information.

order_id

String

Order ID.

subscription_id

String

Renewal ID

ip_num

Integer

Number of IP addresses

ip_num_now

Integer

Current IP addresses

protection_num_now

Integer

Current protection times

protection_num

Integer

Protection times. 9999 indicates unlimited protection times.

basic_bandwidth

Integer

Baseline bandwidth.

elastic_bandwidth

Integer

Elastic bandwidth.

service_bandwidth

Integer

Service bandwidth.

clean_bandwidth

Integer

Origin bandwidth

policy_num

Integer

Number of policy templates.

is_old

Boolean

Whether the instance is an old instance (old instances cannot be upgraded). If this parameter is not transferred, the value is no by default.

new_flag

Boolean

Product ID. The value is true for newly purchased products.

create_time

Long

Creation time.

Example Requests

None

Example Responses

Status code: 200

{
  "items" : [ {
    "package_id" : "0c613ff9-2b63-4aa2-9333-e03541fe0d9a",
    "package_name" : "name",
    "region_id" : "cn-north4",
    "protection_type" : 0,
    "instance_type" : "cnad_pro",
    "resource_id" : "0c613ff9-2b63-4aa2-9333-e03541fe0d9a",
    "count_down_code" : "hws_countdown_period_using",
    "count_down_infos" : {
      "status" : 2,
      "nextOperationPolicy" : 0,
      "nextOperationRemainingDay" : 10
    },
    "count_down_tips" : {
      "effTime" : "2022-10-09T10:00:17Z",
      "expTime" : "2022-12-09T15:59:59Z"
    },
    "order_id" : "CS2211020327RKFEA",
    "subscription_id" : "0c613ff9-2b63-4aa2-9333-e03541fe0d9a",
    "ip_num" : 100,
    "ip_num_now" : 100,
    "protection_num_now" : 1,
    "protection_num" : 9999,
    "basic_bandwidth" : 10,
    "elastic_bandwidth" : 200,
    "service_bandwidth" : 100,
    "clean_bandwidth" : 100,
    "policy_num" : 1,
    "is_old" : false,
    "new_flag" : true,
    "create_time" : 1665309611045
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.