Cloud Config checks the validity of resources based on rules. You can create rules to evaluate resources as needed.
- Log on to the Cloud Config console.
- In the left-side navigation pane, click Rules.
- On the Rules page, click Create Rule.
- In the Basic Settings step of the Create Rule wizard, set Execution Method, set relevant parameters, and then click Next.
- If you set Execution Method to Managed Rule, you can select one from more than 40 managed rules provided by Cloud Config and specify the rule name.
- If you set Execution Method to Function Compute, specify the rule name and select the Alibaba Cloud Resource Name (ARN) of a function.
You must create a rule function in Function Compute before using the function to create a rule. For more information about how to create a function, see Create a function.
- If you set Execution Method to Visual Editor, you only need to specify the rule name.
- In the Scheduling Settings step of the Create Rule wizard, set relevant parameters and click Next.
- If you set Execution Method to Managed Rule, you can only specify the values for the input parameters of the rule.
- If you set Execution Method to Function Compute or Visual Editor, specify the trigger type, select the resource types to be monitored, set input parameters
of the rule, and then specify the values for the input parameters.
Set the key and value for an input parameter by following the logic of the associated rule function. Note that the key must be the same as the name of the input parameter of the rule function and the attribute name of the resource.
- In the Correction Settings step of the Create Rule wizard, set Correction Method to Disable Correction and click Submit.
- View the rule creation result.
In the Complete step of the Create Rule wizard, you can view the rule creation result.
- Click View Details. On the page that appears, you can view the basic information of the current rule, correction details, trigger of the rule, and compliance results of resources evaluated by the rule.
- Click Return to Rule List. On the Rules page that appears, you can view the rule, the status of which is Active.