tencent cloud

APIs

ModifyCosAuditObjectSampleRate

下载
聚焦模式
字号
最后更新时间: 2026-10-15 09:21:23

1. API Description

Domain name for API request: csip.intl.tencentcloudapi.com.

Set the sampling rate for object storage scan.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyCosAuditObjectSampleRate.
Version Yes String Common Params. The value used for this API: 2022-11-21.
Region No String Common Params. This parameter is not required.
BucketIdSet.N No Array of Integer

Bucket asset id set

SampleRateSet.N No Array of Float

Sampling rate collection

TargetAppId No Integer

appid; required when passing DefaultSampleRate; selectable when only modifying existing buckets

DefaultSampleRate No Float

Modify the default value of the newly-added bucket for TargetAppId when passed in; do not modify the default value when not passed in

Value range: [0.001, 1]

3. Output Parameters

Parameter Name Type Description
DefaultSampleRateUpdated Boolean

Whether the default sampling rate was actually submitted this time

DefaultSampleRate Float

When DefaultSampleRateUpdated=true, the value after modification is returned

UpdatedBucketCount Integer

Number of existing buckets successfully submitted this time

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Modifying COS Audit Sampling Rate

Input Example

POST / HTTP/1.1
Host: csip.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyCosAuditObjectSampleRate
<Common request parameters>

{
    "BucketIdSet": [
        1346438
    ],
    "SampleRateSet": [
        0.5
    ],
    "TargetAppId": 260209268,
    "DefaultSampleRate": 0.01
}

Output Example

{
    "Response": {
        "DefaultSampleRate": 0.01,
        "DefaultSampleRateUpdated": true,
        "RequestId": "466d34ac-169a-4b5e-b194-9541b0871a66",
        "UpdatedBucketCount": 1
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
InvalidParameter Parameter error.
InvalidParameterValue Parameter value error.
OperationDenied Operation denied.
ResourceInUse The resource is occupied.
ResourceNotFound The resource does not exist.
ResourceUnavailable Resources are unavailable.
ResourcesSoldOut Resources are sold out.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter error.
UnsupportedOperation The operation is not supported.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈