tencent cloud

文档反馈

UpdateBaselineStrategy

最后更新时间:2024-12-06 15:41:20

1. API Description

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

This API is used to update the policy information based on baseline policy IDs.

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: UpdateBaselineStrategy.
Version Yes String Common Params. The value used for this API: 2018-02-28.
Region No String Common Params. This parameter is not required.
StrategyId Yes Integer Policy ID
StrategyName Yes String Policy name
ScanCycle Yes Integer Detection period
ScanAt Yes String Time when routine detection scans are triggered.
CategoryIds.N Yes Array of String Array of baseline IDs selected under this policy
IsGlobal Yes Integer Whether all servers are scanned: 1: yes; 0 :no. If the value is 1, all Professional Edition hosts are scanned.
MachineType Yes String CVM type:
cvm: Tencent Cloud Virtual Machine
bm: bare metal
ecm: edge computing host
lh: Tencent Cloud Lighthouse
other: hybrid cloud machine
RegionCode Yes String Host region ap-guangzhou
Quuids.N Yes Array of String Host ID array

3. Output Parameters

Parameter Name Type Description
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 Updating Baseline Policy Information

This example shows you how to update policy information based on the baseline policy ID.

Input Example

https://cwp.intl.tencentcloudapi.com/?Action=UpdateBaselineStrategy
&StrategyName="test"
&ScanCycle=1
&ScanAt="00:00:00"
&CategoryIds.0=1
&IsGlobal=1
&MachineType="CVM"
&RegionCode="ab-bj"
&Quuids.0="123"
&StrategyId=1
&<Common request parameters>

Output Example

{
    "Response": {
        "RequestId": "935e27b1-d675-4509-80bf-96fbf0764237"
    }
}

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.NoProfessionHost No Pro Edition host.
InternalError Internal error
InvalidParameter Incorrect parameter.
InvalidParameter.IllegalRequest Invalid request.
InvalidParameter.MissingParameter Missing parameter.
InvalidParameter.ParsingError Incorrect parameter parsing.
InvalidParameterValue Invalid parameter value.
MissingParameter Missing parameter error.