All Products
Search
Document Center

Security Center:PublicPreCheckImageScanTask

Last Updated:Apr 28, 2023

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.

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 keyAssociation operation
yundun-sas:PublicPreCheckImageScanTaskWrite
  • SecurityCenter
    acs:yundun-sas:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SourceIpstringNo

The source IP address of the request.

192.168.XX.XX
RegistryTypesstringNo

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

  • acr
  • harbor
  • quay
acr
RegionIdsstringNo

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

cn-hangzhou
InstanceIdsstringNo

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

i-uf6j8vq9l4r5ntht****
RepoNamespacesstringNo

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

hanghai-namespace
RepoIdsstringNo

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

crr-vridcl4****
RepoNamesstringNo

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

centos
DigestsstringNo

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

6a5e103187b31a94592a47a5858617f7****
TagsstringNo

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

0.2

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

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

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

The data returned if the call is successful.

ScanImageCountinteger

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

3
NeedAuthCountinteger

The number of images to scan in the task.

6

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
500ServerErrorServerError

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

Change history

Change timeSummary of changesOperation
2022-08-01The internal configurations of the API operation change but you can still call the operation.
Change itemChange content
The internal configurations of the API operation change but you can still call the operation.
2022-08-01The internal configurations of the API operation change but you can still call the operation.
Change itemChange content
The internal configurations of the API operation change but you can still call the operation.
2022-01-13Add Operation