Cloud Config checks the validity of resources based on rules. You can create rules to evaluate resources as needed.

Background information

Before creating a rule, you can learn about the rule definition and principles. For more information, see Rule definition and principles.

Procedure

  1. Log on to the Cloud Config console.
  2. In the left-side navigation pane, click Rules.
  3. On the Rules page, click Create Rule.
  4. In the Basic Settings step of the Create Rule wizard, set Execution Method, set relevant parameters, and then click Next.
    Basic Settings step
    • 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.
  5. In the Scheduling Settings step of the Create Rule wizard, set relevant parameters and click Next.
    Scheduling Settings step
    • 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.

  6. In the Correction Settings step of the Create Rule wizard, set Correction Method to Disable Correction and click Submit.

    You can bind a correction template to the current rule. For more information, see Set automatic correction or Set manual correction.

    Set Correction Method to Disable Correction
  7. 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.