Creates a binary security policy.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| SourceIp | string | No | The source IP address. | 59.82.XXX.XXX |
| Name | string | No | The name of the policy. | mv-test |
| Remark | string | No | The description. | remark test |
| Policy | string | Yes | The content of the policy. Specify a value in the JSON format. You can specify the following keys:
| {\"PolicyMode\":\"requireAttestor\",\"RequiredAttestors\":[\"test-xcs-04-12-heyuan\"]} |
| Clusters | string | Yes | The information about the cluster. | [{\"ClusterId\":\"cc12429dbb8f644f690b0623fb52b4737\",\"Namespaces\":[\"default\"]},{\"ClusterId\":\"c9f5b93a8da8f4341b774d79fdbcedb3c\",\"Namespaces\":[\"default\"]}] |
| Status | string | No | The status of the policy. Valid values:
| enable |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "89AD16CC-97EE-50F3-9B12-9E28E5C8****"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
| 500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
No change history
