Querying the List of Global Connection Bandwidths in an Account
Function
This API is used to query the list of global connection bandwidths in an account.
URI
POST /v3/gcb/resource-instances/filter
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Number of records to be queried. |
offset |
No |
Integer |
Index offset. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
request_id |
No |
String |
Request ID. |
without_any_tag |
No |
Boolean |
If this parameter is set to true, all resources without tags are queried. In this case, the tags, tags_any, not_tags, and not_tags_any fields are not required. |
tags |
No |
Array of QueryTag objects |
The instances to be queried contain tags listed in tags. Each instance to be queried contains a maximum of 20 keys. Each tag key has a maximum of 10 tag values. The tag value corresponding to each tag key can be an empty array but the structure cannot be missing. Each tag key and each value of the same tag key must be unique. The response returns resources containing all tags in this list. Keys in this list are in the AND relationship and values in each key-value structure are in the OR relationship. If no searching condition is specified, full data is returned. |
tags_any |
No |
Array of QueryTag objects |
The instances to be queried contain any tag listed in tags_any. Each instance to be queried contains a maximum of 20 keys. Each tag key has a maximum of 10 tag values. The tag value corresponding to each tag key can be an empty array but the structure cannot be missing. Each tag key and each value of the same tag key must be unique. The response returns resources containing any tag in this list. Keys in this list are in the OR relationship and values in each key-value structure are also in the OR relationship. If no searching condition is specified, full data is returned. |
not_tags |
No |
Array of QueryTag objects |
The instances to be queried do not contain any tag listed in not_tags. Each instance to be queried contains a maximum of 20 keys. Each tag key has a maximum of 10 tag values. The tag value corresponding to each tag key can be an empty array but the structure cannot be missing. Keys must be unique and values of a key must be unique. The response returns resources containing no tags in this list. Keys in this list are in the AND relationship and values in each key-value structure are in the OR relationship. If no searching condition is specified, full data is returned. |
not_tags_any |
No |
Array of QueryTag objects |
The instances to be queried do not contain all tags listed in not_tags_any. Each instance to be queried contains a maximum of 20 keys. Each tag key has a maximum of 10 tag values. The tag value corresponding to each tag key can be an empty array but the structure cannot be missing. Keys must be unique and values of a key must be unique. The response returns resources containing no tag in this list. Keys in this list are in the OR relationship and values in each key-value structure are also in the OR relationship. If no filtering criteria is specified, full data is returned. |
matches |
No |
Array of TmsMatch objects |
Whether to match the tags: The tag key must be set to resource_name. If there is a tag value, fuzzy matching is used. If the tag value is an empty string, exact matching is used. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
resources |
Array of TmsResource objects |
Resource list. |
total_count |
Integer |
Total records. |
request_id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
resource_id |
String |
Resource ID. |
tags |
Array of Tag objects |
Tag list. If there is no tag added for the instance, an empty array is returned. |
resource_name |
String |
Resource name. This parameter is an empty string by default if there is no resource name. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key. The key can contain a maximum of 128 Unicode characters, including letters, digits, hyphens (-), and underscores (_). |
value |
String |
Tag value. The value can contain a maximum of 255 Unicode characters, including letters, digits, hyphens (-), underscores (_), and periods (.). |
Example Requests
Querying the list of global connection bandwidths in an account
POST https://{cc_endpoint}/v3/gcb/resource-instances/filter { "matches" : [ { "key" : "resource_name", "value" : "resource1" } ], "not_tags" : [ { "key" : "key1", "values" : [ "value1", "value2" ] } ], "tags" : [ { "key" : "key1", "values" : [ "value1", "value2" ] } ], "tags_any" : [ { "key" : "key1", "values" : [ "value1", "value2" ] } ], "not_tags_any" : [ { "key" : "key1", "values" : [ "value1", "value2" ] } ] }
Example Responses
Status code: 200
The list of global connection bandwidths in an account has been queried.
{ "resources" : [ { "resource_id" : "cb9d7ead-834a-4275-93e1-217f79df9dc1", "resource_name" : "test", "tags" : [ { "key" : "key1", "value" : "value1" } ] } ], "request_id" : "e3371202-7e85-4c16-bb4b-4e3c092734f7", "total_count" : 1 }
Status Codes
Status Code |
Description |
---|---|
200 |
The list of global connection bandwidths in an account has been queried. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.