Modifies the defense rule against container escapes.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language of the content within the request and response. Default value: zh. Valid values:
| zh |
RuleId | integer | Yes | The ID of the rule. | 100012 |
Mode | integer | No | The action mode of the rule. Valid values:
| 1 |
RuleName | string | No | The name of the rule. | test |
SelectedPolicy | array | No | The rule items. | |
string | No | The rule item. | ssh_user_publickey_config | |
RuleType | integer | No | The type of the rule. Valid values:
| 0 |
WhiteImages | array | No | The images that are added to the whitelist. | |
string | No | The image that is added to the whitelist. | centos |
Response parameters
Examples
Sample success responses
JSON
format
{
"Data": {
"RuleId": 600640,
"RuleName": "test555",
"SwitchId": "USER-CONTAINER-RULE-SWITCH-TYPE_xxx"
},
"RequestId": "D03DD0FD-6041-5107-AC00-383E28F1****"
}
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.