This API is used to query the number of EVS disks by tag.
None
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
tags |
Array of objects |
No |
Specifies the key-value pairs of the tag. For details, see Parameters in the tags field. The tags field cannot be left empty. One tag list can contain a maximum of 10 keys. Tag keys in a tag list must be unique. When multiple keys are specified in a tag list, only the disks having all specified keys are queried. NOTE:
If multiple tag lists are specified in the request, only the disks that meet the requirements of the last tag list are queried. |
action |
String |
Yes |
Specifies the operation identifier. Specifying count queries the number of disks by tag. |
matches |
Array of objects |
No |
Specifies the query criteria that the resource supports. For details, see Parameters in the match field. The matches field cannot be left empty. Tag keys in the list must be unique. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
key |
String |
Yes |
Specifies the tag key.
|
values |
Array of objects |
Yes |
Specifies the tag value.
One value list can contain a maximum of 10 values. Tag values in a value list must be unique. If the value list is left empty, any tag value can be matched. When multiple values are specified in a value list and the key requirements are met, disks that have any of the specified values are queried. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
key |
String |
Yes |
Specifies the tag key. The value is of the enumerated type. The value can be as follows:
|
value |
String |
Yes |
Specifies the tag value.
|
{ "action": "count", "tags": [ { "key": "key1", "values": [ "value1", "value2" ] } ], "matches": [ { "key": "resource_name", "value": "resource1" }, { "key": "service_type", "value": "EVS" } ] }
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Specifies the total number of disks that meet the query criteria. |
error |
Object |
Specifies the error message returned when an error occurs. For details, see Parameters in the error field. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
The error message returned if an error occurs. |
code |
String |
The error code returned if an error occurs. For details about the error code, see Error Codes. |
{ "total_count": 1000 }
or
{ "error": { "message": "XXXX", "code": "XXX" } }
In the preceding example, error indicates a general error, for example, badRequest or itemNotFound. An example is provided as follows:
{ "computeFault": { "message": "The server has either erred or is incapable of performing the requested operation.", "code": 500 } }
For details, see Error Codes.