Query the configurations of baseline check policies.

You can call this operation to query the configurations of baseline check policies.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK example code.

Request Parameters

Parameter Type Required Example Description
Action String Yes DescribeStratety

The operation that you want to perform.

Set the value to DescribeStratety.

Lang String No zh

The language type.

SourceIp String No 127.0.0.1

The source IP address.

StrategyIds String No 1,2,3

The IDs of policies to query. Separate multiple IDs with commas (,).

Response parameters

Parameter Type Example Description
RequestId String 16B9826C-B99F-4F8A-8048-EA81D6D3DE8B

The ID of the request.

Strategies

The list of policies.

ConfigTargets

The associated group.

Flag String add

The associated identifier.

Target String 3259405

The ID of the associated group.

TargetType String groupId

The type of the associated group.

CycleDays Integer 1

The cycle of the baseline check.

Valid values:

- 1 days

- 3 days

- 7 days

- 30 days

CycleStartTime Integer 6

The time when the baseline check started. Valid values: 00:00, 06:00, 12:00, and 18:00.

EcsCount Integer 5

The number of servers on which baseline checks are executed by using the specified baseline check policy.

ExecStatus Integer 1

The execution status of the baseline check. Valid values:

  • 1: The baseline check has not started yet.
  • 2: The baseline check is being executed.
Id Integer 212635

The ID of the policy.

Name String Test

The name of the policy.

PassRate Integer 80

The pass rate in the most recent check.

ProcessRate Integer 80

The progress of the baseline check.

RiskCount Integer 5

The number of selected check items.

Type Integer 1

The type of baseline check policies. Valid values:

  • 1: indicates the default policy.
  • 2: indicates the custom policy.

Examples

Sample requests


http(s)://[Endpoint]/? Action=DescribeStratety
? Lang=zh
&SourceIp=127.0.0.1
&StrategyIds=1,2,3
&<Common request parameters>

Sample success responses

XML format

<DescribeStratety>
  <RequestId>ACAFE09B-3346-433B-BDA8-369AB3D9B4F9</RequestId>
  <Strategies>
    <CycleStartTime>6</CycleStartTime>
    <EcsCount>0</EcsCount>
    <Type>2</Type>
    <ExecStatus>1</ExecStatus>
    <ProcessRate>0</ProcessRate>
    <CycleDays>3</CycleDays>
    <Id>15161</Id>
    <ConfigTargets>
      <Target>4361221</Target>
      <TargetType>groupId</TargetType>
      <Flag>add</Flag>
    </ConfigTargets>
    <RiskCount>1</RiskCount>
    <Name>test</Name>
  </Strategies>
  <Strategies>
    <CycleStartTime>0</CycleStartTime>
    <EcsCount>17</EcsCount>
    <PassRate>81</PassRate>
    <Type>1</Type>
    <ExecStatus>1</ExecStatus>
    <ProcessRate>0</ProcessRate>
    <CycleDays>1</CycleDays>
    <Id>20</Id>
    <ConfigTargets>
      <Target>281801</Target>
      <TargetType>groupId</TargetType>
      <Flag>del</Flag>
    </ConfigTargets>
    <ConfigTargets>
      <Target>4790960</Target>
      <TargetType>groupId</TargetType>
      <Flag>del</Flag>
    </ConfigTargets>
    <RiskCount>13</RiskCount>
    <Name>Default policy</Name>
  </Strategies>
</DescribeStratety>

JSON format

{
	"RequestId":"ACAFE09B-3346-433B-BDA8-369AB3D9B4F9",
	"Strategies":[
		{
			"Name":"test",
			"RiskCount":1,
			"CycleDays":3,
			"Type":2,
			"CycleStartTime":6,
			"ConfigTargets":[
				{
					"Flag":"add",
					"Target":"4361221",
					"TargetType":"groupId"
				}
			],
			"ProcessRate":0,
			"Id":15161,
			"ExecStatus":1,
			"EcsCount":0
		},
		{
			"Name": "Default policy",
			"RiskCount":13,
			"PassRate":81,
			"CycleDays":1,
			"Type":1,
			"CycleStartTime":0,
			"ConfigTargets":[
				{
					"Flag":"del",
					"Target":"281801",
					"TargetType":"groupId"
				},
				{
					"Flag":"del",
					"Target":"4790960",
					"TargetType":"groupId"
				}
			],
			"ProcessRate":0,
			"Id":20,
			"ExecStatus":1,
			"EcsCount":17
		}
	]
}

Error codes

For more information about error codes, visit API Error Center.