Creates a bucket scan task.
Operation description
Before calling this operation to create an OSS bucket malicious file scan task, complete the following prerequisites in order:
The OSS malicious file detection feature is activated for the Security Center instance.
The service-linked role AliyunServiceRoleForSas is created.
The OSS bucket to be scanned is created.
The RefreshOssBucketScanInfo operation is called to synchronize the OSS bucket information to Security Center.
After completing the preceding steps, you can call this operation to create a scan task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-sas:CreateOssBucketScanTask |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BucketNameList |
array |
Yes |
The list of bucket names. The specified buckets must already exist in OSS and must have been synchronized to Security Center by calling the RefreshOssBucketScanInfo operation. You can call the ListOssBucket operation to obtain the list of managed buckets. |
|
|
string |
No |
The bucket name. |
hz-yqq-standard**** |
|
| ExcludeKeySuffixList |
array |
No |
The list of file suffixes to exclude from scanning. |
|
|
string |
No |
The file suffix to exclude from scanning. |
.jsp |
|
| ScanMode |
integer |
Yes |
The scan mode. Valid values:
|
1 |
| KeySuffixList |
array |
No |
The list of file suffixes. |
|
|
string |
No |
Specifies that the key of the file to be scanned must end with the specified suffix. |
.jsp |
|
| KeyPrefixList |
array |
No |
The prefix list of files. |
|
|
string |
No |
Specifies that the key of the file to be scanned must start with the specified KeyPrefix. The value cannot start with a forward slash (/). |
/root |
|
| AllKeyPrefix |
boolean |
No |
Specifies whether to match all prefixes. If this parameter is set to true, the KeyPrefixList parameter does not take effect. |
true |
| DecompressMaxLayer |
integer |
No |
The maximum number of decompression layers when multiple levels of nested compressed files exist. The minimum value is 1 and the maximum value is 5. When the maximum number of decompression layers is exceeded, the decompression operation stops immediately. The scanning of files that have already been decompressed is not affected. |
1 |
| DecompressMaxFileCount |
integer |
No |
The maximum number of files to decompress. The minimum value is 1 and the maximum value is 1000. When the maximum number of decompressed files is exceeded, the decompression operation stops immediately. The scanning of files that have already been decompressed is not affected. |
100 |
| DecryptionList |
array |
No |
The list of decryption types. |
|
|
string |
No |
The decryption type. Valid values:
|
KMS |
|
| LastModifiedStartTime |
integer |
No |
Specifies that only files whose last modification time is after the specified timestamp are scanned. Unit: milliseconds. |
1724301769834 |
| Source |
string |
No |
The business source. Valid values:
|
OSS |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is a unique identifier generated by Alibaba Cloud for this request. You can use it to troubleshoot issues. |
BBD75EC2-2F4F-5A7B-AA53-18724DC8**** |
Examples
Success response
JSON format
{
"RequestId": "BBD75EC2-2F4F-5A7B-AA53-18724DC8****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ApiAuthExhausted | No auth count or auth count has been exhausted. | You have not purchased a quota, or the purchased quota is used up. |
| 400 | TaskIsProcessing | Task Is Processing. | Task is processing. |
| 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.