- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Public Zones
- Private Zones
- Record Sets
- PTR Records
- Intelligent Resolution
- Resolver
- Permissions Management
- Using CTS to Collect DNS Key Operations
- Access Logging
- Quota Adjustment
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- APIs
- Examples
- Permissions Policies and Supported Actions
- Appendix
- SDK Reference
-
FAQs
-
DNS Overview
- Will I Be Billed for the DNS Service?
- How Many Zones, PTR Records, and Record Sets Can I Create?
- What Are Huawei Cloud DNS Servers?
- What Are Huawei Cloud Private DNS Server Addresses?
- What Are the Differences Between Public and Private Domain Names?
- Does DNS Support IPv6?
- Does DNS Support Explicit Forwarding and Implicit Forwarding?
- Does DNS Support Dynamic Domain Name Resolution?
- Does DNS Support Wildcard Entries?
- What Is TTL?
- How Many Domain Name Levels Does DNS Support?
- How Are Zones Queried to Resolve a Domain Name?
- What Are the Priorities of Resolution Lines?
- Why Was the Email Address Format Changed in the SOA Record?
- What Is CAA?
- Why Should I Set Priority For an MX Record Set?
- Can DNS Point a Domain Name to a Specific Port?
- Invalid Domain Resolution
- Website Access Failures
-
Public Zones
- Why Is a Message Indicating Conflict with an Existing Record Set Displayed When I Add a Record Set?
- How Do I Handle the Conflict Between CNAME and MX Record Sets?
- How Do I Add Record Sets to Subdomains?
- Which IP Address Is Returned for the Domain Name If There Are Multiple IP Addresses in a Record Set?
- Can I Modify a Zone?
- Can DNS Translate a Domain Name to IP Addresses of On-premises Servers or Third-Party Servers?
- How Can Multiple Domain Names Be Linked to the Same Website?
- Configuring Weighted Routing
- Can DNS Resolve a Domain Name that Has Not Been Licensed?
- Does DNS Support Dynamic Domain Name Resolution?
- How Do I Change the DNS Servers of a Domain Name?
- How Do I Handle Inaccurate Scheduling Caused by the CNAME Record Set Cache in the Default Lines?
-
Private Zones
- Why Is a Message Indicating Conflict with an Existing Record Set Displayed When I Add a Record Set?
- How Do I Change Default DNS Servers of an ECS to Huawei Cloud Private DNS Servers?
- How Can I Access an ECS Using Its Host Name?
- How Can I Map the Private IP Address of an ECS to a Domain Name?
- How Can I Use a Private Domain Name to Route Internet Traffic?
- Can I Use Private Domain Names Across Regions?
- Do I Need to Register Private Domain Names?
- Will a Deleted VPC Be Automatically Disassociated from the Private Zone?
- Are Private DNS Server Addresses the Same for All Users?
- What Are the Restrictions on Concurrent Private DNS Queries?
- Reverse Resolution
- Domain Transfer
-
DNS Overview
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Overview
- Getting Started
- Private Zone
- Record Set
- PTR Record
- Permissions Management
- Key Operations Recorded by CTS
- Quota Adjustment
- FAQs
- Change History
- API Reference (ME-Abu Dhabi Region)
-
User Guide (Paris Region)
- Overview
- Getting Started
- Public Zones
- Private Zones
- Record Sets
- PTR Records
- Intelligent Resolution
- Permissions Management
- Key Operations Recorded by CTS
- Quota Adjustment
-
FAQ
-
DNS Overview
- Will I Be Billed for the DNS Service?
- How Many Zones, PTR Records, and Record Sets Can I Create?
- What Are DNS Servers?
- What Are the Differences Between Public and Private Domain Names?
- Does DNS Support IPv6?
- Does DNS Support Explicit and Implicit URLs?
- Does DNS Support Dynamic Domain Name Resolution?
- Does DNS Support Wildcard Entries?
- What Is TTL?
- How Many Domain Name Levels Does DNS Support?
- How Are Zones Queried to Resolve a Domain Name?
- Why Was the Email Address Format Changed in the SOA Record?
- What Is CAA?
- Why Should I Set Priority For an MX Record Set?
- Can DNS Point a Domain Name to a Specific Port?
-
Public Zones
- How Do I Add Record Sets to Subdomains?
- Which IP Address Is Returned for the Domain Name If There Are Multiple IP Addresses in a Record Set?
- What Can I Do If There Is Message Indicating that the Public Zone Already Exists?
- Can I Modify a Zone?
- How Can Multiple Domain Names Be Linked to the Same Website?
- Configuring Weighted Routing
-
Private Zones
- How Can I Map the Private IP Address of an ECS to a Domain Name?
- Can I Use Private Domain Names Across Regions?
- Do I Need to Register Private Domain Names?
- Will a Deleted VPC Be Automatically Disassociated from the Private Zone?
- Are Private DNS Server Addresses the Same for All Users?
- What Are the Restrictions on Concurrent Private DNS Requests?
- Reverse Resolution
-
DNS Overview
- Change History
- API Reference (Paris Region)
-
User Guide (Kuala Lumpur Region)
- Overview
- Getting Started
- Private Zone
- Record Set
- Permissions Management
- Key Operations Recorded by CTS
- Quota Adjustment
-
FAQs
-
DNS Overview
- Will I Be Billed for the DNS Service?
- How Many Zones and Record Sets Can I Create?
- What Are the Private DNS Servers Provided by the DNS Service?
- Does DNS Support Wildcard Entries?
- How Are Zones Queried to Resolve a Domain Name?
- Why Was the Email Address Format Changed in the SOA Record?
- Can DNS Point a Domain Name to a Specific Port?
- Private Zones
-
DNS Overview
- Change History
- API Reference (Kuala Lumpur Region)
- User Guide (Ankara Region)
- API Reference (Ankara Region)
-
User Guide (ME-Abu Dhabi Region)
- Glossary
- General Reference
Copied.
Creating Custom Policies
You can create custom policies to supplement system-defined policies and implement more refined access control.
You can create custom policies in either of the following two ways:
- Visual editor: Select cloud services, actions, resources, and request conditions without the need to know policy syntax.
- JSON: Edit JSON policies from scratch or based on an existing policy.
The following describes how to create a custom policy that allows users to modify DNS zones in the visual editor and JSON view.
Some examples of common custom DNS policies are provided.
Creating a Custom Policy in the Visual Editor
- Log in to the management console.
- On the management console, hover over the username in the upper right corner, and choose Identity and Access Management from the drop-down list.
- In the left navigation pane, choose Permissions.
- Click Create Custom Policy.
The Create Custom Policy page is displayed.
- Enter a policy name.
- Select a scope in which the policy will take effect based on the type of services to be set in this policy.
- Global services: Select this option if the services to which the policy is related are available for all regions once deployed. When creating custom policies for globally deployed services, specify the scope as Global services. Custom policies of this scope must be attached to user groups in the Global service region.
- Project-level services: Select this option if the services to which the policy is related are deployed in specific regions. When creating custom policies for regionally deployed services, specify the scope as Project-level services. Custom policies of this scope must be attached to user groups in specific regions except the Global service region.
Select Project-level services here.
NOTE:
A custom policy can contain actions of multiple services that are all globally available or all deployed only in specific projects. To define permissions required for accessing both globally available and project-specific services, create two custom policies and specify the scope respectively as Global services and Project-level services.
- Select Visual editor.
- In the Policy Content area, configure a custom policy.
- Select Allow or Deny.
- Select Cloud service.
NOTE:
Only one cloud service can be selected for each permission block. To configure permissions for multiple cloud services, click Add Permissions or switch to the Creating a Custom Policy in the JSON View.
- Select actions.
- (Optional) Select a resource type. For example, if you select Specific, you can click Specify resource path to specify the resource to be authorized.
- (Optional) Add request conditions by specifying condition keys, operators, and values.
Table 1 Criterion Name
Description
Condition Key
A key in the Condition element of a statement. There are global and service-level condition keys.
- Global-level condition key: The prefix is g:, which applies to all operations, as shown in Table 2.
- Project-level condition key: The prefix is the abbreviation of a service, for example, dns:. This key applies only to the operations of the corresponding service.
Operator
Used together with a condition key to form a complete condition statement.
Value
Used together with a condition key and an operator that requires a keyword, to form a complete condition statement.
Table 2 Global request condition Global condition keys
Type
Description
g:CurrentTime
Time
Time when an authentication request is received. The time is in ISO 8601 format, for example, 2012-11-11T23:59:59Z.
g:DomainName
String
Account name
g:MFAPresent
Boolean
Whether to use multi-factor authentication (MFA) to obtain a token
g:MFAAge
Value
Validity period of the token obtained through MFA. This condition must be used together with g:MFAPresent.
g:ProjectName
String
Project name
g:ServiceName
String
Service name
g:UserId
String
IAM user ID
g:UserName
String
IAM username
- (Optional) Switch to the JSON view. Then you can modify the policy content in the JSON structure.
NOTE:
If the JSON structure is wrong after modification, check the content, or click Reset to cancel the modification
- (Optional) To add another permission block for the policy, click Add Permissions. Alternatively, click the plus (+) icon on the right of an existing permission block to clone its permissions.
- (Optional) Describe the policy.
- Click OK. The custom policy is created.
- Assign the policy to a user group so that users in the group can inherit the permissions of the policy by referring to Creating a User and Granting DNS Permissions.
Creating a Custom Policy in the JSON View
- Log in to the management console.
- On the management console, hover over the username in the upper right corner, and choose Identity and Access Management from the drop-down list.
- In the left navigation pane, choose Permissions.
- Click Create Custom Policy.
The Create Custom Policy page is displayed.
- Enter a policy name.
- Select a scope in which the policy will take effect based on the type of services to be set in this policy.
- Global services: Select this option if the services to which the policy is related are available for all regions once deployed. When creating custom policies for globally deployed services, specify the scope as Global services. Custom policies of this scope must be attached to user groups in the Global service region.
- Project-level services: Select this option if the services to which the policy is related are deployed in specific regions. When creating custom policies for regionally deployed services, specify the scope as Project-level services. Custom policies of this scope must be attached to user groups in specific regions except the Global service region.
Select Project-level services here.
NOTE:
A custom policy can contain actions of multiple services that are all globally available or all deployed only in specific projects. To define permissions required for accessing both globally available and project-specific services, create two custom policies and specify the scope respectively as Global services and Project-level services.
- Select JSON.
- (Optional) Click Select Existing Policy, and select a policy to use it as template, such as DNS FullAccess.
- Click OK.
- Modify the statements in the template.
- Effect: Enter Allow or Deny.
- Action: Enter the actions listed in the DNS API actions table, for example, dns:zone:create.
NOTE:
The Version value of a custom policy must be 1.1.
- (Optional) Describe the policy.
- Click OK. If the policy list is displayed, the policy is created successfully. If a message indicating incorrect policy content is displayed, modify the policy.
- Assign the policy to a user group so that users in the group can inherit the permissions of the policy by referring to Creating a User and Granting DNS Permissions.
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