All Products
Search
Document Center

Security Center:GetInterceptionRuleDetail

Last Updated:Feb 20, 2024

Queries the details of a microsegmentation defense rule.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sas:GetInterceptionRuleDetailRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The ID of the container cluster.

Note You can call the DescribeGroupedContainerInstances operation to query the IDs of container clusters.
c7f60fdabc84xxx
RuleIdstringYes

The ID of the rule.

Note You can call the ListInterceptionRulePage operation to query the IDs of rules.
500002

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

9FBC6E47-7508-xxx
InterceptionRuleDetailobject

The details of the rule.

RuleTypestring

The type of the rule. Valid values:

  • suggest: a suggestion rule
  • customize: a custom rule
customize
RuleSwitchinteger

The status of the defense rule. Valid values:

  • 1: The rule is enabled.
  • 0: The rule is disabled.
1
RuleIdlong

The ID of the rule.

467
RuleNamestring

The name of the rule.

dmz-frontend-accept
SrcTargetobject

The source network object.

AppNamestring

The name of the application.

console
RuleTypestring

The type of the rule.

customize
TargetIdinteger

The ID of the network object.

300635
TargetNamestring

The name of the object.

dmz
Namespacestring

The namespace to which the network object belongs.

default
TargetTypestring

The type of the network object.

IMAGE
ImageListarray

The images of the network object.

string

An array that consists of images.

arms-prom-operator:v0.1
TagListarray

The labels specified for the network object.

string

The labels specified for the network object.

service:be-v1
DstTargetobject

The destination network object.

AppNamestring

The name of the application.

console
RuleTypestring

The type of the rule.

customize
TargetIdinteger

The ID of the network object.

200014
TargetNamestring

The name of the object.

demo4-be1
Namespacestring

The namespace to which the network object belongs.

kube-system
TargetTypestring

The type of the network object.

IMAGE
Portsarray

An array that consists of the port range of the destination network object.

string

The port range of the destination network object.

80/8080
ImageListarray

An array that consists of the name of the image specified for the network object.

string

The name of the image specified for the network object.

bj_storage:nginx1
TagListarray

An array that consists of the labels specified for the network object.

string

The labels specified for the network object.

chart:ack-arms-prometheus-1.1.0
InterceptTypelong

The interception mode. Valid values:

  • 0: monitor
  • 1: block
  • 2: alert
  • 3: allow
1
OrderIndexlong

The priority of the rule. Valid values: 1 to 1000. A smaller value indicates a higher priority.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "9FBC6E47-7508-xxx",
  "InterceptionRuleDetail": {
    "RuleType": "customize",
    "RuleSwitch": 1,
    "RuleId": 467,
    "RuleName": "dmz-frontend-accept",
    "SrcTarget": {
      "AppName": "console",
      "RuleType": "customize",
      "TargetId": 300635,
      "TargetName": "dmz",
      "Namespace": "default",
      "TargetType": "IMAGE",
      "ImageList": [
        "arms-prom-operator:v0.1"
      ],
      "TagList": [
        "service:be-v1"
      ]
    },
    "DstTarget": {
      "AppName": "console",
      "RuleType": "customize",
      "TargetId": 200014,
      "TargetName": "demo4-be1",
      "Namespace": "kube-system",
      "TargetType": "IMAGE",
      "Ports": [
        "80/8080"
      ],
      "ImageList": [
        "bj_storage:nginx1"
      ],
      "TagList": [
        "chart:ack-arms-prometheus-1.1.0"
      ]
    },
    "InterceptType": 1,
    "OrderIndex": 1
  }
}

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.