All Products
Search
Document Center

Security Center:UpdateOpaStrategyNew

Last Updated:Feb 20, 2024

Updates the blocking rule for 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.
1003
StrategyTemplateIdlongNo

The ID of the rule template.

Note You can call the GetOpaStrategyTemplateSummary operation to query the ID of the rule template.
109
ClusterIdstringNo

The cluster ID.

Note This parameter is deprecated. You can use the Scopes parameter to specify a scope in which cluster parameters take effect.
c870ec78ecbcb41d2a35c679823ef****
StrategyNamestringNo

The rule name.

test
DescriptionstringNo

The rule description.

4566
ClusterNamestringNo

The cluster name.

Note This parameter is deprecated.
docker-law
UnScanedImagebooleanNo

Specifies whether the rule supports unscanned images. Valid values:

  • true
  • false
true
MaliciousImagebooleanNo

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

  • true
  • false
true
ImageNamearrayNo

The image names.

stringNo

The image name.

Note You can call the GetOpaClusterImageList operation to query the image name.
muximux:latest
LabelarrayNo

The image tags.

stringNo

The image tag.

Note You can call the GetOpaClusterLabelList operation to query the image tag.
alertmanager:main
RuleActionintegerNo

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

  • 1: alert
  • 2: block
  • 3: allow
1
WhiteListarrayNo

The whitelists.

stringNo

The name of the image that is added to the whitelist.

repo-016
AlarmDetailobjectNo

The rule configuration.

BaselineobjectNo

The baseline check configuration.

RiskLevelarrayNo

The risk levels.

stringNo

The risk level. Valid values:

  • high
  • medium
  • low
medium
Itemobject []No

The baseline check configuration.

IdstringNo

The ID of the baseline check item.

Note You can call the GetOpaClusterBaseLineList operation to query the ID of the baseline check item.
hc.image.checklist.identify.hc_exploit_couchdb_linux.item
NamestringNo

The name of the baseline check item.

Note You can call the GetOpaClusterBaseLineList operation to query the name of the baseline check item.
passwd
VulobjectNo

The vulnerability configuration.

RiskLevelarrayNo

The risk levels.

stringNo

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemobject []No

The information about the vulnerability.

IdstringNo

The vulnerability ID.

Note You can call the DescribeVulListPage operation to query the vulnerability ID.
CVE-2023-36034
NamestringNo

The vulnerability name.

Note You can call the DescribeVulListPage operation to query the vulnerability name.
oval:com.redhat.rhsa:def:20227002
RiskClassobject []No

Risk type of vulnerability.

IdstringNo

The ID of the vulnerability types. Valid values:

  • cve: system vulnerability
  • app: application vulnerability
cve
NamestringNo

The name of the vulnerability. Valid values:

  • system vulnerability
  • application vulnerability
system vulnerability
MaliciousFileobjectNo

The configuration of malicious samples.

RiskLevelarrayNo

The risk levels.

stringNo

The risk level. Valid values:

  • high
  • medium
  • low
medium
Itemobject []No

The configuration of malicious samples.

IdstringNo

The ID of the malicious sample.

Note You can call the DescribeMatchedMaliciousNames operation to query the ID of the malicious sample.
65201
NamestringNo

The name of the malicious sample.

Note You can call the DescribeMatchedMaliciousNames operation to query the name of the malicious sample.
abnormal binary file
SensitiveFileobjectNo

The configuration of sensitive file.

RiskLevelarrayNo

The risk levels.

stringNo

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemobject []No

The configuration of sensitive file.

IdstringNo

The ID of the sensitive files.

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

The name of the sensitive files.

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

The configuration of image build risk.

RiskLevelarrayNo

The risk levels.

stringNo

The risk level. Valid values:

  • high
  • medium
  • low
high
Itemobject []No

The configuration of image build risk.

IdstringNo

The ID of the image build risk.

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

The name of the image build risk.

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

The application scope.

ClusterIdstringNo

The cluster ID.

Note You can call the DescribeGroupedContainerInstances operation to query the cluster ID.
cdcb56a931c**
AllNamespaceintegerNo

Specifies whether all namespaces are included. Valid values:

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

The namespaces.

Note This parameter is valid only when the AllNamespace parameter is set to 0.
stringNo

The namespaces.

m1
AckPolicyInstanceIdstringNo

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

Note You can call the GetOpaStrategyDetailNew operation to query the ID of the cluster node to which the rule is applied.
ack-1

Response parameters

ParameterTypeDescriptionExample
object

BaseResult

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.

F75B5FF5-DCB2-59CE-8978-08510707A9E6
HttpStatusCodeinteger

The HTTP status code.

200
Dataarray

The IDs of the clusters that failed to be updated.

string

The ID of the cluster that failed to be updated.

['c8d**7614df1bf']

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "Code": "200",
  "Message": "success",
  "RequestId": "F75B5FF5-DCB2-59CE-8978-08510707A9E6",
  "HttpStatusCode": 200,
  "Data": [
    "['c8d**7614df1bf']"
  ]
}

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 changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 500