Creates an image scan task.
Operation description
Before you call the PublicCreateImageScanTask operation, we recommend that you call the PublicPreCheckImageScanTask operation to query the number of images to scan and the quota for container image scan to be consumed by the image scan task. Make sure that the remaining quota for container image scan is sufficient. This prevents the task from being stopped due to an insufficient quota.
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:PublicCreateImageScanTask | 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 (,). | 6a5e103187b31a94592a47a5858617f7a6c |
Tags | string | No | The tag that is added to the image. Separate multiple tags with commas (,). | 0.2 |
Response parameters
Regions supported by container image scan
Region | City | Region ID |
---|---|---|
China (Hangzhou) | Hangzhou | cn-hangzhou |
China (Shanghai) | Shanghai | cn-shanghai |
China (Shenzhen) | Shenzhen | cn-shenzhen |
China (Qingdao) | Qingdao | cn-qingdao |
China (Beijing) | Beijing | cn-beijing |
China (Zhangjiakou) | Zhangjiakou | cn-zhangjiakou |
China (Hohhot) | Hohhot | cn-huhehaote |
China (Hong Kong) | Hong Kong | cn-hongkong |
Japan (Tokyo) | Tokyo | ap-northeast-1 |
Indonesia (Jakarta) | Jakarta | ap-southeast-5 |
US (Silicon Valley) | Silicon Valley | us-west-1 |
US (Virginia) | Virginia | us-east-1 |
Germany (Frankfurt) | Frankfurt | eu-central-1 |
UK (London) | London | eu-west-1 |
Examples
Sample success responses
JSON
format
{
"RequestId": "F9353221-40F4-5F98-B73C-2803DC804033",
"Data": {
"TaskId": "a410bb3e68c217a3368bc0238c66886d",
"TotalCount": 5,
"FinishCount": 5,
"CollectTime": 1644286364150,
"ExecTime": 1644286364150,
"Status": "SUCCESS",
"Progress": 100,
"Result": "SUCCESS",
"CanCreate": true
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | BeyondQuata | Please check the scan quota | Check the quota of the assets that can be scanned. |
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 |
---|---|---|
2024-10-08 | The Error code has changed | View Change Details |
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 |