Google Cloud offers Identity and Access Management (IAM), which lets you give more granular access to specific Google Cloud resources and prevents unwanted access to other resources. This page describes the Cloud DNS API roles. For a detailed description of IAM, see the Identity and Access Management documentation.
IAM lets you adopt the security principle of least privilege so that you grant only the necessary access to your resources.
IAM lets you control who has what permissions to which
resources by setting IAM policies. IAM policies grant
specific roles to a user, giving the user certain permissions. For example, a
particular user might need to create and modify Domain Name System (DNS) record
resources. You would then give that user (who) the /roles/dns.admin
role, which
has the dns.changes.create
and dns.resourceRecordSets.create
permissions
(what) so that they can create and update resource record sets (which). On the
other hand, a support department may only need to view existing resource
record sets, so they would get a /roles/dns.reader
role.
Permissions and roles
Every Cloud DNS API method requires the caller to have the necessary IAM permissions. Permissions are assigned by granting roles to a user, group, or service account. In addition to the basic roles Owner, Editor, and Viewer, you can grant Cloud DNS API roles to the users of your project.
Permissions
The following table lists the permissions that the caller must have to call each method.
Method | Required permission(s) |
---|---|
dns.changes.create
for creating a resource record set. |
dns.changes.create and dns.resourceRecordSets.create
on the project containing the record set. |
dns.changes.create
for updating a resource record set. |
dns.changes.create and dns.resourceRecordSets.update
on the project containing the record set. |
dns.changes.create
for deleting a resource record set. |
dns.changes.create and dns.resourceRecordSets.delete
on the project containing the record set. |
dns.changes.get |
dns.changes.get for the project containing the managed zone. |
dns.changes.list |
dns.changes.list for the project containing the managed zone. |
dns.dnsKeys.get |
dns.dnsKeys.get for the project containing the managed zone. |
dns.dnsKeys.list |
dns.dnsKeys.list for the project containing the managed zone. |
dns.managedZoneOperations.get |
dns.managedZoneOperations.get for the project containing the managed zone. |
dns.managedZoneOperations.list |
dns.managedZoneOperations.list for the project containing the managed zone. |
dns.managedZones.create |
dns.managedZones.create for the project containing the
managed zone.If creating a private zone, you also need
|
dns.managedZones.delete |
dns.managedZones.delete for the project containing the managed zone. |
dns.managedZones.get |
dns.managedZones.get for the project containing the managed zone. |
dns.managedZones.list |
dns.managedZones.list for the project containing the
managed zone. |
dns.managedZones.update |
dns.managedZones.update for the project containing the
managed zone.If creating a private zone, you also need
|
dns.policies.create |
dns.policies.create for the project containing the policy.
If the policy is created on a VPC network, you also need
|
dns.policies.delete |
dns.policies.delete for the project containing the policy. |
dns.policies.get |
dns.policies.get for the project containing the policy. |
dns.policies.list |
dns.policies.list for the project containing the policy. |
dns.policies.update |
dns.policies.update for the project containing the policy.
If the policy is updated to be on a VPC network, you also
need |
dns.policies.patch |
dns.policies.patch for the project containing the policy. |
dns.projects.get |
dns.projects.get for the project. |
dns.resourceRecordSets.list |
dns.resourceRecordSets.list for the project containing the
managed zone. |
Roles
The following table lists the Cloud DNS API IAM roles with a corresponding list of all the permissions that each role includes. Every permission is applicable to a particular resource type.
You can also use basic roles to make DNS changes.
Role | Title | Description | Permissions | Lowest resource |
---|---|---|---|---|
roles/ |
DNS Administrator | Provides read-write access to all Cloud DNS resources. |
|
Project |
roles/ |
DNS Peer | Access to target networks with DNS peering zones |
|
|
roles/ |
DNS Reader | Provides read-only access to all Cloud DNS resources. |
|
Project |
Managing access control
You can use the Google Cloud Console to manage access control for your topics and projects.
To set access controls at the project level, follow these steps.
Console
In the Google Cloud Console, go to the IAM page.
Select your project from the top pull-down menu.
Click Add.
In New members, enter the email address of a new member.
Select the desired role from the drop-down menu.
Click Save.
Verify that the member is listed with the role that you granted.
What's next
- To get started using Cloud DNS, see the Quickstart.
- To find solutions for common issues that you might encounter when using Cloud DNS, see Troubleshooting.