Querying Number of Resource Shares by Tag
Function
This API is used to query the number of resource shares by tag.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Security-Token |
No |
String |
Security token (session token) for temporary security credentials. This parameter is mandatory when you make an API call using temporary security credentials. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
without_any_tag |
No |
Boolean |
If this parameter is set to true, all resources without tags are queried. |
tags |
No |
Array of TagFilter objects |
A maximum of 20 keys can be queried at a time, and each key can contain a maximum of 20 values. The structure body must be included. The tag key cannot be left blank or be an empty string. Each tag key must be unique, and each tag value for a key must be unique. Resources that contain all keys and one or multiple values listed in tags will be found and returned. If no tag filtering criteria is specified, all data is returned. Array Length: 0 - 20 |
matches |
No |
Array of Match objects |
Matching field used for attaching tags to resource shares. Array Length: 0 - 20 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Total number of records. Minimum: 0 Maximum: 1000000 |
Example Requests
Querying the number of resource shares by tag
POST https://{hostname}/v1/resource-shares/resource-instances/count { "without_any_tag" : true, "tags" : [ { "key" : "string", "values" : [ "string" ] } ], "matches" : [ { "key" : "string", "value" : "string" } ] }
Example Responses
Status code: 200
Request succeeded.
{ "total_count" : 100 }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot