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.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-sas:PublicPreCheckImageScanTask | none | *All Resources * |
| 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 |
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 parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "F9353221-40F4-5F98-B73C-2803DC804033",
"Data": {
"ScanImageCount": 3,
"NeedAuthCount": 6
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-08-01 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-08-01 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-01-13 | Add Operation | View Change Details |