Switching the Status of a Policy
Function
This API is used to switch the status of a policy.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{cloudProjectId}/rule-sets/{ruleSetId}/switch
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cloudProjectId |
Yes |
String |
Project ID. |
ruleSetId |
Yes |
String |
Policy ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_valid |
Yes |
Boolean |
Whether it is valid, true: valid; false: not valid. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
Boolean |
Status. |
rule_set_id |
String |
Policy ID. |
Example Requests
PUT https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/rule-sets/2f4a244eff3442f0befd6df80a1eabec/switch { "is_valid" : true }
Example Responses
Status code: 200
Response body for switching the policy status.
{ "status" : true, "rule_set_id" : "2f4a244eff3442f0befd6df80a1eabec" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for switching the policy status. |
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