All Products
Search
Document Center

Security Center:GetOpaStrategyDetailNew

Last Updated:Nov 13, 2024

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:GetOpaStrategyDetailNewget
  • All Resources
    *
    none
none

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 data returned.

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.

ImageNamestring

The image name.

opa-test
Labelarray

The image tags.

Labelstring

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.

WhiteListstring

The image tag that is added to the whitelist.

test-tag
AlarmDetailobject

The rule configuration.

Baselineobject

The baseline check configuration.

RiskLevelarray

The risk levels.

RiskLevelstring

The risk level. Valid values:

  • high
  • medium
  • low
low
Itemarray<object>

The information about the baseline check item.

Itemobject
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.

RiskLevelstring

The risk level. Valid values:

  • high
  • medium
  • low
medium
Itemarray<object>

The information about the vulnerability.

Itemobject
Idstring

The ID of the vulnerability.

AVD-2023-1680169
Namestring

The name of the vulnerability.

ezOffice evoInterfaceServlet Info Leak
RiskClassarray<object>

Risk type of vulnerability.

classobject
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.

RiskLevelstring

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemarray<object>

The information about the malicious sample.

Itemobject
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.

RiskLevelstring

The risk level. Valid values:

  • high
  • medium
  • low
low
Itemarray<object>

The configuration of sensitive file.

Itemobject
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.

RiskLevelstring

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemarray<object>

The configuration of image build risk.

Itemobject
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
Scopesarray<object>

The application scope.

Scopeobject
ClusterIdstring

The cluster ID.

c1fdb5fd8d**7163
AllNamespaceinteger

Indicates whether all namespaces are included. Valid values:

  • 1: yes
  • 0: no
1
NamespaceListarray

The namespaces.

NamespaceListstring

The namespace.

namespace1
AckPolicyInstanceIdstring

The rule instance ID of the cluster.

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 changedView Change Details