This document describes how to view, update, and delete data domains and subdomains using the Google Cloud console and the REST API.
Before you begin
Before managing data domains, ensure that you have the required roles and APIs enabled.
Enable APIs
Enable the Dataplex API.
Roles required to enable APIs
To enable APIs, you need the serviceusage.services.enable permission. If you
created the project, then you likely already have this permission through the
Owner role (roles/owner). Otherwise, you can get this permission through the
Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).
Learn how to grant roles.
Required roles
To get the permissions that you need to manage data domains, ask your administrator to grant you the following IAM roles on the project:
-
Update data domains and resource bindings:
Dataplex Data Domain Configuration Editor (
roles/dataplex.dataDomainEditor) -
View the configuration of the data domain and bindings:
Dataplex Data Domain Configuration Viewer (
roles/dataplex.dataDomainViewer)
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
View data domains and subdomains
View data domains and subdomains in a specific project.
Console
View all data domains
In the Google Cloud console, go to the Data domains page.
The table lists the created domains. Click the Expand arrow next to the data domain name to view the nested subdomains.
View data domain and subdomain details
In the Google Cloud console, go to the Data domains page.
Click the name of the domain or subdomain you want to view.
The Domain Details page displays the following tabs:
- Overview: Provides an overview of the domain and the list of required and optional aspects.
- Resources: Lists resources included in this domain. The list displays only folders, projects, and resources directly included in the domain.
REST
View data domains and subdomains
To view data domains, use the projects.locations.dataDomains.list method:
Before using any of the request data, make the following replacements:
PROJECT_ID: the ID of your Google Cloud project.LOCATION_ID: the region of your project. For example,us-central1.
HTTP method and URL:
GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/dataDomains
To send your request, expand one of these options:
You should receive a successful status code (2xx) and an empty response.
View data subdomains
To view data subdomains, use the
projects.locations.dataDomains.listSubdomains method:
Before using any of the request data, make the following replacements:
PROJECT_ID: the ID of your Google Cloud project.LOCATION_ID: the region where the parent data domain exists. For example,us-central1.DOMAIN_ID: the unique identifier of the parent data domain.
HTTP method and URL:
GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/dataDomains/DOMAIN_ID/subdomains
To send your request, expand one of these options:
You should receive a successful status code (2xx) and an empty response.
Use the filter parameter to list subdomains belonging to a specific parent domain:
Before using any of the request data, make the following replacements:
PROJECT_ID: the ID of your Google Cloud project.LOCATION_ID: the region where the parent data domain exists. For example,us-central1.PARENT_DOMAIN_ID: the unique identifier of the parent data domain.
HTTP method and URL:
GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/dataDomains?filter=parent_data_domain="projects/PROJECT_ID/locations/LOCATION_ID/dataDomains/PARENT_DOMAIN_ID"
To send your request, expand one of these options:
You should receive a successful status code (2xx) and an empty response.
View data domain details
To get domain or subdomain details, use the
projects.locations.dataDomains.get method:
Before using any of the request data, make the following replacements:
PROJECT_ID: the ID of your Google Cloud project.LOCATION_ID: the region where the data domain exists. For example,us-central1.DOMAIN_ID: the unique identifier of the data domain or subdomain.
HTTP method and URL:
GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/dataDomains/DOMAIN_ID
To send your request, expand one of these options:
You should receive a successful status code (2xx) and an empty response.
Update a data domain or subdomain
You can update the display name, description, and labels of a domain. You can't change the domain ID or location after you create the domain.
Console
In the Google Cloud console, go to the Data domains page.
Click the domain or subdomain name to go to the details page.
In the top bar, click Edit.
Update the Display name or Description.
Click Save.
REST
To update a data domain, use the projects.locations.dataDomains.patch method:
Before using any of the request data, make the following replacements:
PROJECT_ID: the ID of your Google Cloud project.LOCATION_ID: the region where the data domain exists. For example,us-central1.DOMAIN_ID: the unique identifier of the data domain or subdomain.
HTTP method and URL:
PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/dataDomains/DOMAIN_ID?updateMask=description,labels
Request JSON body:
{
"description": "Updated description for the domain",
"labels": {
"status": "active"
}
}
To send your request, expand one of these options:
You should receive a successful status code (2xx) and an empty response.
Delete a data domain or subdomain
You can only delete an empty data domain. You must delete all subdomains and remove all resource bindings associated with the domain before attempting to delete the domain itself. If the domain is not empty, the deletion request fails with an error.
Console
In the Google Cloud console, go to the Data domains page.
Click the domain or subdomain name to go to the details page.
In the top bar, click Delete.
Confirm the deletion by typing the data domain or subdomain name.
Click Delete.
REST
To delete a data domain, use the projects.locations.dataDomains.delete method:
Before using any of the request data, make the following replacements:
PROJECT_ID: the ID of your Google Cloud project.LOCATION_ID: the region where the data domain exists. For example,us-central1.DOMAIN_ID: the unique identifier of the data domain or subdomain.
HTTP method and URL:
DELETE https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/dataDomains/DOMAIN_ID
To send your request, expand one of these options:
You should receive a successful status code (2xx) and an empty response.
What's next
- Learn more about data domains.
- Learn more about resource binding and inclusion.
- Learn how to create data domains.
- Learn how to use data domains.