Updating a Policy
Function
This API is used to update a policy.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{cloudProjectId}/rule-sets/{ruleSetId}/update
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cloudProjectId |
Yes |
String |
Project ID. |
ruleSetId |
Yes |
String |
Policy ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Policy name. |
rules |
Yes |
Array of rules objects |
Rule. |
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/842cacd3424a470eb410300b537fa756/update { "name" : "New policy-20240625194201", "rules" : [ { "id" : "df6f4de49cf14d738ce34ec63e5039ff", "is_valid" : true } ] }
Example Responses
Status code: 200
Response body for updating a policy.
{ "status" : true, "rule_set_id" : "842cacd3424a470eb410300b537fa756" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for updating a policy. |
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