All Products
Search
Document Center

Security Center:GetOpaStrategyDetailNew

Last Updated:Feb 20, 2024

Queries the details of the rule that is used to block at-risk images.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
StrategyIdlongNo

The rule ID.

Note You can call the ListOpaClusterStrategyNew operation to query the rule ID.
1349

Response parameters

ParameterTypeDescriptionExample
object

PlainResult

Dataobject

The returned data.

StrategyIdlong

The rule ID.

1005
StrategyTemplateIdlong

The ID of the rule template.

1204
ClusterIdstring

The cluster ID.

c8ca91e0907d94efaba7fb0827eb9****
StrategyNamestring

The rule name.

test001
Descriptionstring

The description.

Custom defense configuration
ClusterNamestring

The cluster name.

test
UnScanedImageboolean

Indicates whether the rule supports unscanned images. Valid values:

  • true
  • false
true
MaliciousImageboolean

Indicates whether the rule supports malicious Internet images. Valid values:

  • true
  • false
true
ImageNamearray

The image names.

string

The image name.

opa-test
Labelarray

The image tags.

string

The image tag.

app.kubernetes.io/instance:devops
RuleActioninteger

The action that is performed when the rule is hit. Valid values:

  • 1: trigger alerts
  • 2: block
  • 3: allow
1
WhiteListarray

The image tags that are added to the whitelist.

string

The image tag that is added to the whitelist.

test-tag
AlarmDetailobject

The rule configuration.

Baselineobject

The baseline check configuration.

RiskLevelarray

The risk levels.

string

The risk level. Valid values:

  • high
  • medium
  • low
low
Itemobject []

The information about the baseline check item.

Idstring

The ID of the baseline check item.

ak_leak
Namestring

The name of the baseline check item.

Access Key plaintext storage
Vulobject

The vulnerability configuration.

RiskLevelarray

The risk levels.

string

The risk level. Valid values:

  • high
  • medium
  • low
medium
Itemobject []

The information about the vulnerability.

Idstring

The vulnerability ID.

AVD-2023-1680169
Namestring

The vulnerability name.

ezOffice evoInterfaceServlet Info Leak
RiskClassobject []

Risk type of vulnerability.

Idstring

The ID of the vulnerability types. Valid values:

  • cve: system vulnerability
  • app: application vulnerability
cve
Namestring

The name of the vulnerability. Valid values:

  • system vulnerability
  • application vulnerability
system vulnerability
MaliciousFileobject

The configuration of malicious samples.

RiskLevelarray

The risk levels.

string

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemobject []

The information about the malicious sample.

Idstring

The ID of the malicious sample.

1811
Namestring

The name of the malicious sample.

abnormal binary file
SensitiveFileobject

The configuration of sensitive file.

RiskLevelarray

The risk levels.

string

The risk level. Valid values:

  • high
  • medium
  • low
low
Itemobject []

The configuration of sensitive file.

Idstring

The ID of the sensitive files.

Note You can call the GetSensitiveDefineRuleConfig operation to query the ID of the malicious sample.
key
Namestring

The name of the sensitive files.

Note You can call the GetSensitiveDefineRuleConfig operation to query the ID of the malicious sample.
name
BuildRiskobject

The configuration of image build risk.

RiskLevelarray

The risk levels.

string

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemobject []

The configuration of image build risk.

Idstring

The ID of the image build risk.

Note You can call the ListImageBuildRiskItem operation to query the ID of the malicious sample.
key
Namestring

The name of the image build risk.

Note You can call the ListImageBuildRiskItem operation to query the ID of the malicious sample.
name
Scopesobject []

The application scope.

ClusterIdstring

The cluster ID.

c1fdb5fd8d**7163
AllNamespaceinteger

Indicates whether all namespaces are included. Valid values:

  • 1: All namespaces are included.
  • 0: Not all namespaces are included.
1
NamespaceListarray

The namespaces.

string

The namespace.

namespace1
AckPolicyInstanceIdstring

The ID of the cluster node to which the rule is applied.

ack-0
Langstring

The language of the content within the request and response. Default value: zh. Valid values:

  • zh: Chinese
  • en: English
zh
CurrentPageinteger

The page number. Default value: 1. Pages start from page 1.

4
PageSizeinteger

The number of entries per page.

20
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Codestring

The status code returned. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. You can identify the cause of the failure based on the status code.

200
Messagestring

The returned message.

success
RequestIdstring

The request ID.

E819FD71-D240-5E54-AA7F-20FED2ECBEB6
HttpStatusCodeinteger

The HTTP status code that is returned.

200

Examples

Sample success responses

JSONformat

{
  "Data": {
    "StrategyId": 1005,
    "StrategyTemplateId": 1204,
    "ClusterId": "c8ca91e0907d94efaba7fb0827eb9****",
    "StrategyName": "test001",
    "Description": "Custom defense configuration",
    "ClusterName": "test",
    "UnScanedImage": true,
    "MaliciousImage": true,
    "ImageName": [
      "opa-test"
    ],
    "Label": [
      "app.kubernetes.io/instance:devops"
    ],
    "RuleAction": 1,
    "WhiteList": [
      "test-tag"
    ],
    "AlarmDetail": {
      "Baseline": {
        "RiskLevel": [
          "low"
        ],
        "Item": [
          {
            "Id": "ak_leak",
            "Name": "Access Key plaintext storage"
          }
        ]
      },
      "Vul": {
        "RiskLevel": [
          "medium"
        ],
        "Item": [
          {
            "Id": "AVD-2023-1680169",
            "Name": "ezOffice evoInterfaceServlet Info Leak"
          }
        ],
        "RiskClass": [
          {
            "Id": "cve",
            "Name": "system vulnerability"
          }
        ]
      },
      "MaliciousFile": {
        "RiskLevel": [
          "high"
        ],
        "Item": [
          {
            "Id": "1811",
            "Name": "abnormal binary file\n"
          }
        ]
      },
      "SensitiveFile": {
        "RiskLevel": [
          "low"
        ],
        "Item": [
          {
            "Id": "key",
            "Name": "name"
          }
        ]
      },
      "BuildRisk": {
        "RiskLevel": [
          "high"
        ],
        "Item": [
          {
            "Id": "key",
            "Name": "name"
          }
        ]
      }
    },
    "Scopes": [
      {
        "ClusterId": "c1fdb5fd8d**7163",
        "AllNamespace": 1,
        "NamespaceList": [
          "namespace1"
        ],
        "AckPolicyInstanceId": "ack-0"
      }
    ],
    "Lang": "zh",
    "CurrentPage": 4,
    "PageSize": 20
  },
  "Success": true,
  "Code": "200",
  "Message": "success",
  "RequestId": "E819FD71-D240-5E54-AA7F-20FED2ECBEB6",
  "HttpStatusCode": 200
}

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
2023-12-22The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.