Inheriting a Policy
Function
This API is used to inherit a policy.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{cloudProjectId}/rule-sets/inherit
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
cloudProjectId |
Yes |
String |
Project ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Policy name. |
|
parent_id |
Yes |
String |
Parent policy ID. |
|
cloud_project_id |
Yes |
String |
Project ID. |
|
rules |
No |
Array of strings |
Rule. |
|
is_valid |
Yes |
Boolean |
Enable or not. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
Boolean |
Definition: Whether the update is successful. Value range:
|
|
rule_set_id |
String |
Definition: Policy ID. Value range: The value consists of 32 characters, including digits and letters. |
Example Requests
POST https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/rule-sets/inherit
{
"name" : "New policy -20240625194116-copy-98528",
"parent_id" : "62e21804566e4e18bc8106f6c961aefd",
"cloud_project_id" : "2d09f712e9504b61b034cc8f40e475a8",
"rules" : [ ],
"is_valid" : true
}
Example Responses
Status code: 200
Response body for inheriting a policy.
{
"status" : true,
"rule_set_id" : "2f4a244eff3442f0befd6df80a1eabec"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response body for inheriting 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