All Products
Search
Document Center

Security Center:GetOpaStrategyDetailNew

Last Updated:Mar 25, 2026

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-sas:GetOpaStrategyDetailNew

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

StrategyId

integer

No

The rule ID.

Note

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

1349

Response elements

Element

Type

Description

Example

object

PlainResult

Data

object

The data returned.

StrategyId

integer

The rule ID.

1005

StrategyTemplateId

integer

The ID of the rule template.

1204

ClusterId

string

The cluster ID.

c8ca91e0907d94efaba7fb0827eb9****

StrategyName

string

The rule name.

test001

Description

string

The description.

Custom defense configuration

ClusterName

string

The cluster name.

test

UnScanedImage

boolean

Indicates whether the rule supports unscanned images. Valid values:

  • true

  • false

true

MaliciousImage

boolean

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

  • true

  • false

true

ImageName

array

The image names.

string

The image name.

opa-test

Label

array

The image tags.

string

The image tag.

app.kubernetes.io/instance:devops

RuleAction

integer

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

  • 1: trigger alerts

  • 2: block

  • 3: allow

1

WhiteList

array

The image tags that are added to the whitelist.

string

The image tag that is added to the whitelist.

test-tag

AlarmDetail

object

The rule configuration.

Baseline

object

The baseline check configuration.

RiskLevel

array

The risk levels.

string

The risk level. Valid values:

  • high

  • medium

  • low

low

Item

array<object>

The information about the baseline check item.

object

Id

string

The ID of the baseline check item.

ak_leak

Name

string

The name of the baseline check item.

Access Key plaintext storage

Vul

object

The vulnerability configuration.

RiskLevel

array

The risk levels.

string

The risk level. Valid values:

  • high

  • medium

  • low

medium

Item

array<object>

The information about the vulnerability.

object

Id

string

The ID of the vulnerability.

AVD-2023-1680169

Name

string

The name of the vulnerability.

ezOffice evoInterfaceServlet Info Leak

RiskClass

array<object>

Risk type of vulnerability.

object

Id

string

The ID of the vulnerability types. Valid values:

  • cve: system vulnerability

  • app: application vulnerability

cve

Name

string

The name of the vulnerability. Valid values:

  • system vulnerability

  • application vulnerability

System vulnerability

MaliciousFile

object

The configuration of malicious samples.

RiskLevel

array

The risk levels.

string

The risk level. Valid values:

  • high

  • medium

  • low

high

Item

array<object>

The information about the malicious sample.

object

Id

string

The ID of the malicious sample.

1811

Name

string

The name of the malicious sample.

abnormal binary file

SensitiveFile

object

The configuration of sensitive file.

RiskLevel

array

The risk levels.

string

The risk level. Valid values:

  • high

  • medium

  • low

low

Item

array<object>

The configuration of sensitive file.

object

Id

string

The ID of the sensitive files.

Note

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

key

Name

string

The name of the sensitive files.

Note

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

name

BuildRisk

object

The configuration of image build risk.

RiskLevel

array

The risk levels.

string

The risk level. Valid values:

  • high

  • medium

  • low

high

Item

array<object>

The configuration of image build risk.

object

Id

string

The ID of the image build risk.

Note

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

key

Name

string

The name of the image build risk.

Note

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

name

Scopes

array<object>

The application scope.

object

ClusterId

string

The cluster ID.

c1fdb5fd8d**7163

AllNamespace

integer

Indicates whether all namespaces are included. Valid values:

  • 1: yes

  • 0: no

1

NamespaceList

array

The namespaces.

string

The namespace.

namespace1

AckPolicyInstanceId

string

The rule instance ID of the cluster.

ack-0

Lang

string

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

  • zh: Chinese

  • en: English

zh

CurrentPage

integer

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

4

PageSize

integer

The number of entries per page.

20

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Code

string

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

Message

string

The returned message.

success

RequestId

string

The request ID.

E819FD71-D240-5E54-AA7F-20FED2ECBEB6

HttpStatusCode

integer

The HTTP status code that is returned.

200

Examples

Success response

JSON format

{
  "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 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.