All Products
Search
Document Center

Security Center:CreateOssScanConfig

Last Updated:Feb 20, 2024

Creates a scan policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
EnableintegerNo

Specifies whether to enable the policy. Valid values:

  • 1: yes
  • 0: no
1
ScanDayListarrayNo

The days on which the scan is executed in a week.

integerNo

The day on which the scan is executed in a week.

1
BucketNameListarrayNo

The names of buckets.

stringNo

The name of the bucket.

cccarvato-oss****
KeySuffixListarrayNo

The suffixes of the files to scan.

stringNo

The suffix of the file to scan.

.asp
StartTimestringNo

The time when the scan starts. The time must be in the HH:mm:ss format.

00:00:00
EndTimestringNo

The time when the scan ends. The time must be in the HH:mm:ss format.

01:01:00
NamestringNo

The name of the policy.

runtime
KeyPrefixListarrayNo

The prefixes of the object that you want to check.

stringNo

The prefix of the object that you want to check.

/root
AllKeyPrefixbooleanNo

Whether to match all prefixes.

true

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

5DFD6277-CC36-57F7-ACE6-F5952123****
Idlong

The ID of the policy.

210****

Examples

Sample success responses

JSONformat

{
  "RequestId": "5DFD6277-CC36-57F7-ACE6-F5952123****",
  "Id": 0
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-07The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Name
    Added Input Parameters: KeyPrefixList
    Added Input Parameters: AllKeyPrefix
Output ParametersThe response structure of the API has changed.