When the managed rules provided by Cloud Config cannot meet your demands, you can use Visual Editor to create a custom rule without coding. Visual Editor reads the parameters of resources. Then, you can describe the rule logic by selecting input parameters, logical operators, and parameter values.
- Cloud Config automatically creates a rule function in Function Compute based on the configured logic.
- The rule function is managed by Cloud Config, so you do not need to care about the operation of the function and related costs.
- When your custom rule is triggered, Cloud Config runs the corresponding rule function and displays the evaluation result.
- 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 Created By to Visual Editor, set the name and risk level of the rule, and then click Next.
- In the Scheduling Settings step of the Create Rule wizard, set the Trigger Type parameter, select the type of resources to be linked
to the rule, add and set one or more input parameters as required, and then click
Note Different resources have different parameters and parameter values. You can learn the specific meanings of parameters and possible parameter values based on the API of each service.
- After you select a resource type, the rule monitors all resources of the specified type in your account. A rule can be linked to only one resource type. For example, you can select the ACS::ActionTrail::Trail resource type.
- You can set input parameters as required. For example, you can set Key to Tracking Status, Relation to Equals To, and Value to Enable to make sure that tracking is enabled in ActionTrail.
- 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 about 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, you can view the rule, the status of which is Active.