All Products
Search
Document Center

Container Registry:ListScanRule

Last Updated:Dec 17, 2025

Lists the scan rules.

Operation description

Lists the scan rules.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
cr:ListScanRuleget
*ScanRule
acs:cr:{#regionId}:{#accountId}:instance/{#instanceId}/scanrule/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringNo

The instance ID.

cri-upoulewerx*****
PageNointegerNo

The page number.

1
PageSizeintegerNo

The number of entries per page.

30
ScanTypestringNo

The type of the vulnerability. Valid values:

  • VUL: Products Cloud Security Scanner.
  • SBOM: Product Content Analysis.

Default value: VUL

SBOM

Response parameters

ParameterTypeDescriptionExample
object

The response struct.

RequestIdstring

Request Id

2CB62B5E-605B-5A23-9110-728B8207A25C
Codestring

The HTTP status code

success
PageNointeger

The page number.

1
IsSuccessboolean

Indicates whether the request is successful.

True
PageSizeinteger

The number of entries per page.

30
TotalCountinteger

The total number of entries returned.

1
ScanRulesarray<object>

The list of scan rules.

ScanRulesobject

The list of scan rules.

ScanRuleIdstring

The scan rule id.

crscnr-2sdveqjhpzd****
RuleNamestring

The rule name.

cicd-prod
ScanScopestring

The scan scope.

REPO
TriggerTypestring

The trigger type.

AUTO
Namespacesarray

The list of namespaces.

Namespacesstring

The list of namespaces.

platform
RepoNamesarray

The repository name.

RepoNamesstring

The repository name.

cloud-function-agent
RepoTagFilterPatternstring

The tag that triggers the scan matches the regular expression.

.*
CreateTimelong

The creation time.

1702361810000
UpdateTimelong

The update time.

1764122725000
ScanTypestring

The scan type. Valid values:

  • VUL: Products Cloud Security Scanner
  • SBOM: Product Content Analysis
SBOM

Examples

Sample success responses

JSONformat

{
  "RequestId": "2CB62B5E-605B-5A23-9110-728B8207A25C",
  "Code": "success",
  "PageNo": 1,
  "IsSuccess": true,
  "PageSize": 30,
  "TotalCount": 1,
  "ScanRules": [
    {
      "ScanRuleId": "crscnr-2sdveqjhpzd****",
      "RuleName": "cicd-prod",
      "ScanScope": "REPO",
      "TriggerType": "AUTO",
      "Namespaces": [
        "platform"
      ],
      "RepoNames": [
        "cloud-function-agent"
      ],
      "RepoTagFilterPattern": ".*",
      "CreateTime": 1702361810000,
      "UpdateTime": 1764122725000,
      "ScanType": "SBOM"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-11-28Add OperationView Change Details