Creates a container firewall blocking rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-sas:CreateInterceptionRule |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The ID of the container cluster to query. Note
You can call the DescribeGroupedContainerInstances operation to obtain this parameter. This parameter must be from an ACK cluster. You can call the DescribeClustersV1 operation of Container Service for Kubernetes (ACK) to query existing clusters, or call the CreateCluster operation to create a cluster, and then call the DescribeGroupedContainerInstances operation of Security Center to obtain the ID of a managed cluster. |
c35xxxa416 |
| RuleName |
string |
Yes |
The name of the rule. |
test-rule-1 |
| RuleSwitch |
integer |
Yes |
Specifies whether to enable the rule. Valid values:
|
0 |
| SrcTarget |
object |
No |
The source object. The metric description is as follows:
|
{"targetId":301940} |
| DstTargetList |
object |
No |
The list of destination objects. The metric descriptions are as follows:
|
[ { "targetId": 600036, "ports": [ "1/65535" ] } ] |
| RuleType |
string |
No |
The type of the rule. Valid values:
|
customize |
| ClusterName |
string |
Yes |
The name of the cluster. |
sas-test-cnnf |
| OrderIndex |
integer |
Yes |
The priority of the rule. Valid values: 1 to 1000. A smaller value indicates a higher priority. |
1 |
| InterceptType |
integer |
Yes |
The interception mode. Valid values:
|
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is a unique identifier generated by Alibaba Cloud for the request. You can use this ID to troubleshoot issues. |
A01810A0-xxx5E2676 |
Examples
Success response
JSON format
{
"RequestId": "A01810A0-xxx5E2676"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | ServerError | ServerError | |
| 403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.