Retrieves the details of the rule that is used to block at-risk images.
Try it now
Test
RAM authorization
|
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 |
| MaliciousImage |
boolean |
Indicates whether the rule supports malicious Internet images. Valid values:
|
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 |
| 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:
|
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:
|
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 |
| Name |
string |
The name of the vulnerability. Valid values:
|
System vulnerability |
| MaliciousFile |
object |
The configuration of malicious samples. |
|
| RiskLevel |
array |
The risk levels. |
|
|
string |
The risk level. Valid values:
|
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:
|
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 |
|
| 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 |
| 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 |
| 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 |
| 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.