Creates a policy for detecting malicious Object Storage Service (OSS) objects by using the SDK for malicious file detection feature.
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:CreateOssScanConfig | create | *OssScanConfig acs:yundun-sas:*:{#accountId}:ossscanconfig/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Enable | integer | No | Specifies whether to enable the policy. Valid values:
| 1 |
ScanDayList | array | No | The days on which the scan is executed in a week. | |
integer | No | The day on which the scan is executed in a week. | 1 | |
BucketNameList | array | No | The names of buckets. | |
string | No | The name of the bucket. | cccarvato-oss**** | |
KeySuffixList | array | No | The suffixes of the files to scan. | |
string | No | The suffix of the file to scan. | .asp | |
StartTime | string | No | The time when the scan starts. The time must be in the HH:mm:ss format. | 00:00:00 |
EndTime | string | No | The time when the scan ends. The time must be in the HH:mm:ss format. | 01:01:00 |
Name | string | No | The policy name. | runtime |
KeyPrefixList | array | No | The prefixes of the objects. | |
string | No | The prefix of the object. | /root | |
AllKeyPrefix | boolean | No | Specifies whether to match the prefixes of all objects. | true |
DecompressMaxLayer | integer | No | The maximum number of decompression levels when multi-level packages are decompressed. Valid values: 1 to 5. If the maximum number of decompression levels is reached, the decompression operation immediately ends and the detection of extracted objects is not affected. | 1 |
DecompressMaxFileCount | integer | No | The maximum number of objects that can be extracted during decompression. Valid values: 1 to 1000. If the maximum number of objects that can be extracted is reached, the decompression operation immediately ends and the detection of extracted objects is not affected. | 100 |
DecryptionList | array | No | The decryption methods. | |
string | No | The decryption method. Valid values:
| KMS | |
LastModifiedStartTime | long | No | The timestamp when the object was last modified. The time must be later than the timestamp that you specify. Unit: milliseconds. | 1724301769834 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "5DFD6277-CC36-57F7-ACE6-F5952123****",
"Id": 0
}
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 |
---|---|---|
2024-07-23 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-04-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-12-07 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |