You can create a rule to evaluate your resource compliance. When creating a rule, you can select a built-in policy or custom policy, specify a monitoring scope, and specify the trigger type. Evaluation results are provided for you to check compliance data.
This section describes how to add predefined rules.
To evaluate resources with rules, you need to enable the resource recorder. Resource evaluation is subject to the following rules:
For details about how to enable and configure the resource recorder, see Configuring the Resource Recorder.
Parameter |
Description |
---|---|
Policy Type |
Select Built-in policy. Built-in policies are provided by Config. You can select a built-in policy to quickly add a rule. You can also search for a built-in policy by policy name or tag. |
Rule Name |
By default, the rule name is consistent with the predefined policy name. Rule names must be unique. A rule name can contain digits, letters, underscores (_), and hyphens (-) and cannot exceed 64 characters. |
Description |
By default, the rule description is the same as the selected predefined policy description. You can also customize the rule description. A rule description can contain any types of characters and cannot exceed 512 characters. |
Parameter |
Description |
---|---|
Trigger Type |
Specifies the conditions under which rules are triggered. Possible values are:
|
Filter Type |
Specifies the resources to be evaluated. Possible types are:
This parameter is mandatory only when Trigger Type is set to Configuration change. |
Resource Scope |
If you set Filter Type to Specific resources, you need to specify a resource scope.
You only need to configure this parameter when Trigger Type is set to Configuration change and Filter Type is set to Specific resources. |
(Optional) Filter Scope |
After you enable Filter Scope, you can filter resources by resource ID or tag. You can specify a specific resource for compliance evaluation. This parameter is optional for a rule whose trigger type is configuration change. |
Execute Every |
Indicates how often a rule is triggered. Available options: 1 hour, 3 hours, 6 hours, 12 hours, 24 hours. This parameter is mandatory only when Trigger Type is set to Periodic execution. |
Configure Rule Parameters |
Parameters of a built-in policy. For example, if you select the required-tag-check policy, you need to specify a tag, so that resources that do not have the tag will be determined as noncompliant. Some default policies, such as volumes-encrypted-check, do not require Configure Rule Parameters. |
After you add a rule, the first evaluation is automatically triggered immediately.