Template Management
CDN allows you to customize templates for quick domain configuration. You can define function settings in one template and apply it to multiple domain names.
Scenarios
This function is useful when you want to use the same rule for multiple domain names, for example, the same referer validation rule for five domain names.
Constraints
- Templates can include HTTP header, cache rule, redirect from origin, smart compression, range requests, referer validation, IP ACL, User-Agent ACL, and usage cap settings.
- The system automatically creates a cache rule whose type is All files and priority is 1 for a template, unless you have set one All files rule when creating the template. The priority of other rules cannot be 1.
Creating a Template
-
Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- In the navigation pane, choose Domains.
- Click the Templates tab.
- In the Templates area, click Create. The Create Template page is displayed.
Figure 1 Creating a template
- Enter the template name and description, and select the configuration items to be contained in the template.
- Configure rules for the selected configuration items and click OK.
- After a template is created, you can click buttons in the Operation column of the template list to edit or delete the template, or apply the template to domain names.
Applying a Template to Domain Names
You can apply a created template to domain names. This will overwrite their original configuration with that in the template.
- In the template list, click Apply to Domains in the Operation column of a template.
- In the displayed dialog box, select target domain names and click
to add them to the right area.
- Select up to 50 domain names at a time.
- Click OK.
Checking Template Application Records
In the Application Records area, you can view the following information of a template application record:
- Domain names to which the template is applied: Click View Domains in the Operation column to view the target domain names and whether the application is successful.
- Whether the template is used: In the Status column, view the number of domain names that the template is used, fails to be used, or is being configured.
- Template configuration: Click Template Snapshot in the Operation column to view the configuration items contained in the template when the template is used.

Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot