All Products
Search
Document Center

Security Center:PublicPreCheckImageScanTask

Last Updated:Aug 28, 2026

Queries the number of images to scan in an image scan task and the quota for container image scan to be consumed by the task.

Operation description

You can call the PublicPreCheckImageScanTask operation to estimate the quota for container image scan to be consumed by the task. This ensures that you know the quota to be consumed before you perform the task. If the remaining quota for container image scan is less than the quota to be consumed by the task, you must purchase a sufficient quota. This prevents the task from being stopped due to an insufficient quota.

If you do not specify the optional parameters when you call this operation, the total number of protected images and the quota for container image scan to be consumed by scanning all the protected images are queried. If you specify the optional parameters, the number of images that meet the specified conditions and the quota for container image scan to be consumed by scanning the images are queried.

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:PublicPreCheckImageScanTask

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp

string

No

The source IP address of the request.

192.168.XX.XX

RegistryTypes

string

No

The type of the image repository. Separate multiple types with commas (,). Valid values:

  • acr

  • harbor

  • quay

acr

RegionIds

string

No

The region ID of the image. Separate multiple IDs with commas (,).

cn-hangzhou

InstanceIds

string

No

The ID of the Container Registry instance in which the image repository is created. Separate multiple IDs with commas (,).

i-uf6j8vq9l4r5ntht****

RepoNamespaces

string

No

The namespace to which the image repository belongs. Separate multiple namespaces with commas (,).

hanghai-namespace

RepoIds

string

No

The ID of the image repository. Separate multiple IDs with commas (,).

crr-vridcl4****

RepoNames

string

No

The name of the image repository. Separate multiple names with commas (,).

centos

Digests

string

No

The SHA-256 value of the image digest. Separate multiple SHA-256 values with commas (,).

6a5e103187b31a94592a47a5858617f7****

Tags

string

No

The tag that is added to the image. Separate multiple tags with commas (,).

0.2

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request, which is used to locate and troubleshoot issues.

F9353221-40F4-5F98-B73C-2803DC804033

Data

object

The data returned if the call is successful.

ScanImageCount

integer

The quota for container image scan to be consumed by the task.

3

NeedAuthCount

integer

The number of images to scan in the task.

6

Examples

Success response

JSON format

{
  "RequestId": "F9353221-40F4-5F98-B73C-2803DC804033",
  "Data": {
    "ScanImageCount": 3,
    "NeedAuthCount": 6
  }
}

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.