Executes evaluation rules to evaluate resources.
Debugging
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:
- For mandatory resource types, indicate with a prefix of * .
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
config:EvaluatePreConfigRules | list | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceEvaluateItems | array<object> | Yes | The resources that you want to evaluate. | |
object | Yes | |||
ResourceLogicalId | string | No | The logical ID of the resource. | ResourceLogicId-test |
ResourceType | string | No | The type of the resource. | ACS::ECS::Instance |
Rules | array<object> | No | The evaluation rules. | |
object | No | |||
Identifier | string | No | The identifier of the evaluation rule. For more information about how to obtain the identifier of an evaluation rule, see ListManagedRules . | ecs-instance-deletion-protection-enabled |
InputParameters | string | No | The input parameters of the evaluation rule. | {} |
ResourceProperties | string | No | The properties of the resource. | { "ImageId": "ubuntu_18_04_64_20G_alibase_20190624.vhd", "SecurityGroupId": "sg-bp15ed6xe1yxeycg****", "HostName": "LocalHostName", "RegionId": "cn-hangzhou" } |
EnableManagedRules | boolean | No | Specifies whether to enable the managed rule. Valid values:
After you create an evaluation rule, a managed rule that has the same settings as the evaluation rule is created. After you create a resource, the managed rule can be used to continuously check the compliance of the resource.
| false |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "129ECF1C-7897-1131-BD0F-4B588AC05400",
"ResourceEvaluations": [
{
"ResourceLogicalId": "ResourceLogicId-test",
"ResourceType": "ACS::ECS::Instance",
"Rules": [
{
"Identifier": "ecs-instance-deletion-protection-enabled",
"ComplianceType": "NON_COMPLIANT",
"Annotation": "{\\\"configuration\\\":\\\"false\\\",\\\"desiredValue\\\":\\\"True\\\",\\\"operator\\\":\\\"StringEquals\\\",\\\"property\\\":\\\"$.DeletionProtection\\\"}",
"HelpUrl": "https://example.aliyundoc.com"
}
]
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
Change time | Summary of changes | Operation |
---|---|---|
2023-06-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |