All Products
Search
Document Center

Security Center:ModifyStrategy

Last Updated:Nov 25, 2024

Modifies a baseline check policy.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sas:ModifyStrategyupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SourceIpstringNo

The source IP address of the request.

192.168.X.X
CycleDaysstringYes

The new interval of the baseline check. Valid values:

  • 1: every 2 days
  • 3: every 4 days
  • 7: every 8 days
  • 30: every 31 days
1
NamestringYes

The new name of the baseline check policy.

testStrategy
CycleStartTimestringNo

The new time range during which the baseline check starts. Valid values:

  • 0: The baseline check starts within the time range from 00:00 to 06:00.
  • 6: The baseline check starts within the time range from 06:00 to 12:00.
  • 12: The baseline check starts within the time range from 12:00 to 18:00.
  • 18: The baseline check starts within the time range from 18:00 to 24:00.
Note This parameter is deprecated.
18
RiskSubTypeNamestringYes

The subtype of the baselines. You can call the DescribeRiskType operation to query the subtypes of baselines.

hc_exploit_redis
IdstringNo

The ID of the baseline check policy.

245
RiskCustomParamsstringNo

The custom configurations of the baseline. The value of this parameter is in the JSON format and contains the following fields:

  • typeName: the name of the baseline.

  • checkDetails: the details of the baseline. The value is in the JSON format.

    • checkId: the ID of the check item.

    • rules: the rule configurations. The value is in the JSON format.

      • ruleId: the ID of the rule.

      • paramList: the list of parameters in the rule. The value is in the JSON format.

        • paramName: the name of the parameter.
        • value: the value of the parameter.
[{"typeName":"hc_centos_6_custom","checkDetails":[{"checkId":4,"rules":[{"ruleId":"pass_min_days_login_defs.must.cus","paramList":[{"paramName":"range_val","value":"7"}]}]}]}]
CustomTypestringYes

The type of the baseline check policy. Valid values:

  • custom: a custom baseline check policy
  • common: a standard baseline check policy
common
TargetTypestringYes

The method that is used to apply the baseline check policy. Valid values:

  • groupId: asset groups
  • uuid: assets
groupId
StartTimestringYes

The time when the baseline check based on the baseline check policy starts. Specify the time in the hh:mm:ss format.

00:01:00
EndTimestringYes

The time when the baseline check based on the baseline check policy ends. Specify the time in the hh:mm:ss format.

05:00:00

Response parameters

ParameterTypeDescriptionExample
object

The result of modifying the baseline check policy.

HttpStatusCodeinteger

The HTTP status code returned.

200
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

8EFA2BD9-00CD-5D69-B6B0-4EE83EAF072E
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
Resultobject

The result returned.

StrategyIdinteger

The ID of the baseline check policy.

8164239

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "RequestId": "8EFA2BD9-00CD-5D69-B6B0-4EE83EAF072E",
  "Success": true,
  "Result": {
    "StrategyId": 8164239
  }
}

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-08-10The internal configuration of the API is changed, but the call is not affectedView Change Details