Changing a Governance Policy
Function
This API is used to change a governance policy.
URI
PUT /v3/{project_id}/govern/governance/{kind}/{policy_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Unique ID of a tenant's sub-project. The value contains 1 to 64 characters. |
kind |
Yes |
String |
Governance policy kind. |
policy_id |
Yes |
String |
Governance policy ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Enter application/json;charset=UTF-8. |
X-Auth-Token |
Yes |
String |
User token. |
x-engine-id |
Yes |
String |
Instance ID of an exclusive microservice engine. |
X-Enterprise-Project-ID |
Yes |
String |
Enterprise project ID. |
x-environment |
No |
String |
Environment. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Governance policy name. |
selector |
No |
GovSelector object |
Governance policy delivery scope. |
spec |
No |
Object |
Governance policy definition content. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
String |
Result message. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Example Requests
PUT https://{endpoint}/v3/{project_id}/govern/governance/{kind}/{policy_id} { "name" : "string", "selector" : { "environment" : "string", "app" : "string", "service" : "string" }, "spec" : { } }
Example Responses
Status code: 200
OK
{ "result" : "string" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
Error Codes
See CSE 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