All Products
Search
Document Center

Security Center:CreateBinarySecurityPolicy

Last Updated:Jan 20, 2026

Creates a binary security policy.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
SourceIpstringNo

The source IP address.

59.82.XXX.XXX
NamestringNo

The name of the policy.

mv-test
RemarkstringNo

The description.

remark test
PolicystringYes

The content of the policy. Specify a value in the JSON format. You can specify the following keys:

  • policyMode: the type of the policy. Default value: requireAttestor.
  • requiredAttestors: the required witnesses.
{\"PolicyMode\":\"requireAttestor\",\"RequiredAttestors\":[\"test-xcs-04-12-heyuan\"]}
ClustersstringYes

The information about the cluster.

[{\"ClusterId\":\"cc12429dbb8f644f690b0623fb52b4737\",\"Namespaces\":[\"default\"]},{\"ClusterId\":\"c9f5b93a8da8f4341b774d79fdbcedb3c\",\"Namespaces\":[\"default\"]}]
StatusstringNo

The status of the policy. Valid values:

  • enable
  • disable
enable

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

89AD16CC-97EE-50F3-9B12-9E28E5C8****

Examples

Sample success responses

JSONformat

{
  "RequestId": "89AD16CC-97EE-50F3-9B12-9E28E5C8****"
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history