Querying Policy Usage
Function
This API is used to query policy usage.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{cloudProjectId}/rule-sets/{ruleSetId}/related/query
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cloudProjectId |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
ruleSetId |
Yes |
String |
Definition: Policy ID, which is the unique identifier of a policy. Obtain the policy ID by calling the API for querying policies. data.id indicates the policy ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
project_count |
Long |
Definition: Number of projects. Value range: N/A |
pipeline_count |
Long |
Definition: Number of pipelines. Value range: N/A |
Example Requests
GET https://{endpoint}/v2/83575118c90d4875be6ff167cd25424a/rule-sets/63963e542f0945a3b6243c01aa2fc0c0/related/query
Example Responses
Status code: 200
Response body for querying policy usage.
{ "project_count" : 0, "pipeline_count" : 0 }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for querying policy usage. |
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