All Products
Search
Document Center

Security Center:UpdateOssScanConfig

Last Updated:Aug 28, 2026

Updates the OSS file scan policy configuration for the malicious file detection feature.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-sas:UpdateOssScanConfig

update

*OssScanConfig

acs:yundun-sas:*:{#accountId}:ossscanconfig/{#ConfigId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Enable

integer

No

Specifies whether to enable the policy. Valid values:

  • 1: Enabled.

  • 0: Disabled.

0

ScanDayList

array

No

The scan days. The number indicates the day of the week.

integer

No

The scan days. The number indicates the day of the week.

1

BucketNameList

array

No

The list of bucket names.

string

No

The bucket name.

hz-new02****

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.

.asp

StartTime

string

No

The scan start time in the HH:mm:ss format.

00:00:00

EndTime

string

No

The scan stop time in the HH:mm:ss format.

00:00:01

Id

string

No

The scan policy ID.

1141****

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

Name

string

No

The scan policy name.

testStrategy

AllKeyPrefix

boolean

No

Specifies whether to match all file prefixes.

true

DecompressMaxLayer

integer

No

The maximum number of decompression layers when multiple levels of nested compressed files exist. Minimum value: 1. Maximum value: 5. When the maximum number of decompression layers is exceeded, the decompression operation ends immediately. The detection of files that have already been decompressed is not affected.

1

DecompressMaxFileCount

integer

No

The maximum number of files to decompress. Minimum value: 1. Maximum value: 1000. When the maximum number of decompressed files is exceeded, the decompression operation ends immediately. The detection 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:

  • OSS: OSS-managed encryption.

  • KMS: KMS.

KMS

LastModifiedStartTime

integer

No

Specifies that only files whose last modification time is after the specified timestamp are scanned. Unit: milliseconds.

1724301769834

RealTimeIncr

boolean

No

Specifies whether to enable real-time incremental detection. When this parameter is set to true, the ScanDayList, StartTime, and EndTime parameters do not take effect.

true

AutoAdd

integer

No

The business source. Valid values:

  • OSS: OSS

  • NAS: NAS

OSS

No

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID generated by Alibaba Cloud for this request. You can use this ID to troubleshoot issues.

FFA14F61-4E2F-54C7-9276-81C60BAC****

Examples

Success response

JSON format

{
  "RequestId": "FFA14F61-4E2F-54C7-9276-81C60BAC****"
}

Error codes

HTTP status code

Error code

Error message

Description

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.