Datenprodukte verwalten

Mit Knowledge Catalog (früher Dataplex Universal Catalog) können Sie vorhandene Datenprodukte aktualisieren, Zugriff darauf gewähren und sie löschen. Sie können Assets, Metadaten und Verträge auf dem neuesten Stand halten, damit Datennutzer vertrauenswürdige Daten finden und verwenden können.

Dieses Dokument richtet sich an Inhaber von Datenprodukten. Weitere Informationen zur Architektur und zu den wichtigsten Konzepten von Datenprodukten finden Sie unter Informationen zu Datenprodukten.

Hinweis

  1. Aktivieren Sie die Knowledge Catalog- und BigQuery APIs, falls sie noch nicht aktiviert sind.

    Erforderliche Rollen zum Aktivieren von APIs

    Zum Aktivieren von APIs benötigen Sie die Berechtigung serviceusage.services.enable. Wenn Sie das Projekt erstellt haben, haben Sie diese Berechtigung wahrscheinlich bereits über die Inhaberrolle (roles/owner). Andernfalls können Sie diese Berechtigung über die Rolle „Service Usage-Administrator“ (roles/serviceusage.serviceUsageAdmin) erhalten. Informationen zum Zuweisen von Rollen

    APIs aktivieren

Erforderliche Rollen

Bitten Sie Ihren Administrator, Ihnen die folgenden IAM-Rollen für das Projekt zuzuweisen, um die Berechtigungen zu erhalten, die Sie zum Verwalten von Datenprodukten benötigen:

Weitere Informationen zum Zuweisen von Rollen finden Sie unter Zugriff auf Projekte, Ordner und Organisationen verwalten.

Diese vordefinierten Rollen enthalten die Berechtigungen, die zum Verwalten von Datenprodukten erforderlich sind. Maximieren Sie den Abschnitt Erforderliche Berechtigungen, um die notwendigen Berechtigungen anzuzeigen:

Erforderliche Berechtigungen

Die folgenden Berechtigungen sind zum Verwalten von Datenprodukten erforderlich:

  • Bearbeiten Sie den Systemaspekttyp overview: dataplex.entryGroups.useOverviewAspect
  • Bearbeiten Sie den Systemaspekttyp refresh cadence: dataplex.entryGroups.useRefreshCadenceAspect
  • Zugriffsanfrage für ein Datenprodukt genehmigen: dataplex.dataProducts.approve

Sie können diese Berechtigungen auch mit benutzerdefinierten Rollen oder anderen vordefinierten Rollen erhalten.

Zugriffssteuerung für BigQuery-Modelle

Der Zugriff auf BigQuery-Modelle innerhalb eines Datenprodukts wird über IAM-Bedingungen verwaltet, die auf die IAM-Richtlinie des übergeordneten Datasets angewendet werden.

Wenn Sie ein BigQuery-Modell löschen und dann mit demselben Namen neu erstellen, stellt Knowledge Catalog die Berechtigungen wieder her, die Google-Gruppen oder Dienstkonten zuvor über das Datenprodukt gewährt wurden.

Berechtigungen festlegen, um das Datenprodukt auffindbar zu machen

Damit potenzielle Nutzer ein Datenprodukt suchen, ansehen und Zugriff darauf anfordern können, müssen Datenproduktinhaber dafür sorgen, dass das Produkt auffindbar ist. Dazu müssen sie die entsprechenden IAM-Rollen für die Datenproduktressource zuweisen:

  • Datenprodukte suchen, ansehen und Zugriff darauf anfordern: Dataplex Data Products Consumer (roles/dataplex.dataProductsConsumer)

  • Datenproduktdefinitionen und ‑metadaten ansehen (Lesezugriff): Dataplex Data Products Viewer (roles/dataplex.dataProductsViewer)

Anfragen für den Zugriff auf Datenprodukte verwalten

Wenn ein Datenproduktnutzer Zugriff anfordert, erhält der Datenproduktinhaber eine E-Mail-Benachrichtigung. Inhaber können diese Anfragen entweder über die Google Cloud Console oder die API prüfen, genehmigen oder ablehnen.

Console

Zugriffsanfragen für ein bestimmtes Datenprodukt prüfen

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, für das Sie Zugriffsanfragen prüfen möchten.

  3. Klicken Sie auf den Tab Verwaltung von Zugriffsanfragen.

  4. Wählen Sie den Antragsteller aus, dessen Anfrage Sie prüfen möchten.

  5. Klicken Sie auf Aktionen und dann auf Genehmigen oder Ablehnen.

  6. Klicken Sie auf Speichern.

Zugriffsanfragen für mehrere Datenprodukte prüfen

  1. Rufen Sie in der Google Cloud Console die Seite Governance-Workflows des Knowledge Catalog auf.

    Zu „Governance-Workflows“

  2. Klicken Sie auf den Tab Ausstehende Genehmigungen.

  3. Optional: Filtern Sie die Liste nach dem Namen des jeweiligen Datenprodukts, um die zugehörigen Anfragen zu isolieren.

  4. Wählen Sie die gewünschte Anfrage aus und klicken Sie auf Genehmigen oder Ablehnen.

  5. Klicken Sie auf Speichern.

Verhalten nach der Genehmigung

  • Nutzeranfragen: Nutzer, die Zugriff für ihre Nutzeridentität angefordert haben, werden automatisch als Mitglieder der Google-Gruppe hinzugefügt, die der Zugriffsgruppe zugeordnet ist.

  • Dienstkontoanfragen: Nutzer, die Zugriff für ein Dienstkonto angefordert haben, erhalten Berechtigungen, um die Identität des Dienstkontos des Datenerstellers zu übernehmen, das der Zugriffsgruppe zugeordnet ist.

Nach der Bearbeitung wird der Status der Anfrage automatisch aktualisiert und der Eintrag wird auf den Tab Genehmigungslog verschoben.

REST

Alle ausstehenden Zugriffsanfragen auflisten

Wenn Sie alle Zugriffsanfragen auflisten möchten, die in einem bestimmten Projekt und an einem bestimmten Standort auf Ihre Überprüfung warten, senden Sie eine GET-Anfrage mit der benutzerdefinierten Sammlungsmethode :listReviewable:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/changeRequests:listReviewable"

Ersetzen Sie Folgendes:

  • PROJECT_ID: die ID Ihres Projekts in Google Cloud

  • LOCATION: die Region, in der das Datenprodukt vorhanden ist (z. B. us-central1)

Zugriffsanfrage genehmigen

Datenproduktinhaber mit der Berechtigung dataplex.dataProducts.approve können eine ausstehende Anfrage genehmigen, indem sie eine POST-Anfrage an die benutzerdefinierte Methode :approve senden:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/changeRequests/CHANGE_REQUEST_ID:approve"

Ersetzen Sie Folgendes:

  • PROJECT_ID: die ID Ihres Projekts in Google Cloud

  • LOCATION: die Region, in der das Datenprodukt vorhanden ist (z. B. us-central1)

  • CHANGE_REQUEST_ID: die eindeutige ID der Zugriffsanfrage, die Sie genehmigen möchten

Im Gegensatz zu Genehmigungen über die Console werden bei der Genehmigung einer Änderungsanfrage über die REST API nicht automatisch Google-Gruppenmitgliedschaften geändert oder die Identitätsübernahme von Dienstkontotokens konfiguriert. Sie müssen die folgenden Schritte zur Zugriffsverwaltung manuell ausführen:

  • Bei Zugriffsanfragen für Nutzeridentitäten: Fügen Sie den Datenproduktnutzer der zugeordneten Google-Gruppe hinzu. Weitere Informationen finden Sie unter Mitgliedschaft zu einer Google-Gruppe hinzufügen.

  • Für Zugriffsanfragen von Dienstkonten: Weisen Sie dem Dienstkonto des Datenproduktnutzers für die Ressource die IAM-Rolle Ersteller von Dienstkonto-Tokens (roles/iam.serviceAccountTokenCreator) zu, indem Sie den folgenden Befehl ausführen:

    gcloud iam service-accounts add-iam-policy-binding PRODUCER_SERVICE_ACCOUNT \
      --member="serviceAccount:CONSUMER_SERVICE_ACCOUNT" \
      --role="roles/iam.serviceAccountTokenCreator"
    

    Ersetzen Sie Folgendes:

    • PRODUCER_SERVICE_ACCOUNT: die vollständig qualifizierte E-Mail-Adresse des Dienstkontos, das der Zugriffsgruppe des Datenprodukts zugeordnet ist

    • CONSUMER_SERVICE_ACCOUNT: die vollständig qualifizierte E-Mail-Adresse des Dienstkontos, das dem Nutzer gehört, der Zugriff anfordert.

Zugriffsanfrage ablehnen

Datenproduktinhaber mit der Berechtigung dataplex.dataProducts.approve können eine ausstehende Anfrage ablehnen, indem sie eine POST-Anfrage an die benutzerdefinierte Methode :reject zusammen mit einer Begründungsnutzlast senden:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d '{
  "comment": "REJECTION_REASON"
}' \
"https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/changeRequests/CHANGE_REQUEST_ID:reject"

Ersetzen Sie Folgendes:

  • PROJECT_ID: die ID Ihres Projekts in Google Cloud

  • LOCATION: die Region, in der das Datenprodukt vorhanden ist (z. B. us-central1)

  • CHANGE_REQUEST_ID: die eindeutige ID der Zugriffsanfrage, die Sie ablehnen möchten

Datenprodukt aktualisieren

Sie können die grundlegenden Details (z. B. Name des Datenprodukts, Beschreibung, Inhaberdetails), Assets, Zugriffsgruppen, Berechtigungen, Verträge, Aspekte und zusätzliche Dokumentation für ein vorhandenes Datenprodukt aktualisieren.

Grundlegende Details eines Datenprodukts aktualisieren

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, das Sie aktualisieren möchten.

  3. Klicken Sie auf Bearbeiten.

  4. Aktualisieren Sie nach Bedarf den Datenproduktnamen, das Datenproduktsymbol, die Beschreibung, die E‑Mail-Adresse des/der Datenproduktinhaber(s), die E‑Mail-Adresse des/der Datenproduktgenehmiger(s) und die Labels.

  5. Klicken Sie auf Speichern.

C#

C#

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für C# in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog C#.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

using Google.Cloud.Dataplex.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedDataProductServiceClientSnippets
{
    /// <summary>Snippet for UpdateDataProduct</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void UpdateDataProductRequestObject()
    {
        // Create client
        DataProductServiceClient dataProductServiceClient = DataProductServiceClient.Create();
        // Initialize request argument(s)
        UpdateDataProductRequest request = new UpdateDataProductRequest
        {
            DataProduct = new DataProduct(),
            UpdateMask = new FieldMask(),
            ValidateOnly = false,
        };
        // Make the request
        Operation<DataProduct, OperationMetadata> response = dataProductServiceClient.UpdateDataProduct(request);

        // Poll until the returned long-running operation is complete
        Operation<DataProduct, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        DataProduct result = completedResponse.Result;

        // Or get the name of the operation
        string operationName = response.Name;
        // This name can be stored, then the long-running operation retrieved later by name
        Operation<DataProduct, OperationMetadata> retrievedResponse = dataProductServiceClient.PollOnceUpdateDataProduct(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            DataProduct retrievedResult = retrievedResponse.Result;
        }
    }
}

Go

Go

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Go in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Go.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewDataProductClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.UpdateDataProductRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#UpdateDataProductRequest.
	}
	op, err := c.UpdateDataProduct(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Java

Java

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Java in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Java.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

import com.google.cloud.dataplex.v1.DataProduct;
import com.google.cloud.dataplex.v1.DataProductServiceClient;
import com.google.cloud.dataplex.v1.UpdateDataProductRequest;
import com.google.protobuf.FieldMask;

public class SyncUpdateDataProduct {

  public static void main(String[] args) throws Exception {
    syncUpdateDataProduct();
  }

  public static void syncUpdateDataProduct() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (DataProductServiceClient dataProductServiceClient = DataProductServiceClient.create()) {
      UpdateDataProductRequest request =
          UpdateDataProductRequest.newBuilder()
              .setDataProduct(DataProduct.newBuilder().build())
              .setUpdateMask(FieldMask.newBuilder().build())
              .setValidateOnly(true)
              .build();
      DataProduct response = dataProductServiceClient.updateDataProductAsync(request).get();
    }
  }
}

Node.js

Node.js

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Node.js in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Node.js.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. The data product to update.
 *  The data product's `name` field is used to identify the data product to
 *  update.
 */
// const dataProduct = {}
/**
 *  Optional. The list of fields to update.
 *  If this is empty or not set, then all the fields will be updated.
 */
// const updateMask = {}
/**
 *  Optional. Validates the request without actually updating the data product.
 *  Default: false.
 */
// const validateOnly = true

// Imports the Dataplex library
const {DataProductServiceClient} = require('@google-cloud/dataplex').v1;

// Instantiates a client
const dataplexClient = new DataProductServiceClient();

async function callUpdateDataProduct() {
  // Construct request
  const request = {
    dataProduct,
  };

  // Run request
  const [operation] = await dataplexClient.updateDataProduct(request);
  const [response] = await operation.promise();
  console.log(response);
}

callUpdateDataProduct();

Python

Python

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Python in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Python.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_update_data_product():
    # Create a client
    client = dataplex_v1.DataProductServiceClient()

    # Initialize request argument(s)
    data_product = dataplex_v1.DataProduct()
    data_product.display_name = "display_name_value"
    data_product.owner_emails = ["owner_emails_value1", "owner_emails_value2"]

    request = dataplex_v1.UpdateDataProductRequest(
        data_product=data_product,
    )

    # Make the request
    operation = client.update_data_product(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)

REST

Verwenden Sie die Methode dataProducts.patch, um die grundlegenden Details eines Datenprodukts zu aktualisieren.

Wenn Sie beispielsweise die Beschreibung eines Datenprodukts aktualisieren möchten, senden Sie die folgende PATCH-Anfrage:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d '{"description": "NEW_DESCRIPTION"}' \
https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/dataProducts/DATA_PRODUCT_ID?update_mask="description"

Ersetzen Sie Folgendes:

  • NEW_DESCRIPTION: eine neue Beschreibung für das Datenprodukt
  • PROJECT_ID: die ID Ihres Projekts in Google Cloud
  • LOCATION: die Region, in der sich das Datenprodukt befindet
  • DATA_PRODUCT_ID: die ID Ihres Datenprodukts

Assets eines Datenprodukts aktualisieren

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, für das Sie Assets aktualisieren möchten.

  3. Klicke auf den Tab Assets.

  4. So fügen Sie ein neues Asset hinzu:

    1. Klicken Sie auf Hinzufügen.

    2. Suchen Sie nach den Assets, die Sie Ihrem Datenprodukt hinzufügen möchten, und wählen Sie sie aus. Die ausgewählten Assets müssen sich in derselben Region wie das Datenprodukt befinden.

      Wenn Sie die erforderlichen Berechtigungen haben, können Sie die Metadaten von Assets aufrufen, indem Sie auf das Asset klicken.

    3. Verwenden Sie Filter, um die Suchergebnisse einzugrenzen.

    4. Nachdem Sie die Assets ausgewählt haben, klicken Sie auf Hinzufügen.

  5. So entfernen Sie ein Asset aus dem Datenprodukt:

    1. Klicken Sie für das Asset, das Sie entfernen möchten, auf > Entfernen.

    2. Klicken Sie zur Bestätigung auf Entfernen.

C#

Neues Daten-Asset zu einem Datenprodukt hinzufügen

C#

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für C# in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog C#.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
    using Google.Cloud.Dataplex.V1;
    using Google.LongRunning;

    public sealed partial class GeneratedDataProductServiceClientSnippets
    {
        /// <summary>Snippet for CreateDataAsset</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public void CreateDataAssetRequestObject()
        {
            // Create client
            DataProductServiceClient dataProductServiceClient = DataProductServiceClient.Create();
            // Initialize request argument(s)
            CreateDataAssetRequest request = new CreateDataAssetRequest
            {
                ParentAsDataProductName = DataProductName.FromProjectLocationDataProduct("[PROJECT]", "[LOCATION]", "[DATA_PRODUCT]"),
                DataAssetId = "",
                DataAsset = new DataAsset(),
                ValidateOnly = false,
            };
            // Make the request
            Operation<DataAsset, OperationMetadata> response = dataProductServiceClient.CreateDataAsset(request);

            // Poll until the returned long-running operation is complete
            Operation<DataAsset, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            DataAsset result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<DataAsset, OperationMetadata> retrievedResponse = dataProductServiceClient.PollOnceCreateDataAsset(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                DataAsset retrievedResult = retrievedResponse.Result;
            }
        }
    }
}

Daten-Asset aus einem Datenprodukt löschen

C#

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für C# in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog C#.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
    using Google.Cloud.Dataplex.V1;
    using Google.LongRunning;
    using Google.Protobuf.WellKnownTypes;

    public sealed partial class GeneratedDataProductServiceClientSnippets
    {
        /// <summary>Snippet for DeleteDataAsset</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public void DeleteDataAssetRequestObject()
        {
            // Create client
            DataProductServiceClient dataProductServiceClient = DataProductServiceClient.Create();
            // Initialize request argument(s)
            DeleteDataAssetRequest request = new DeleteDataAssetRequest
            {
                DataAssetName = DataAssetName.FromProjectLocationDataProductDataAsset("[PROJECT]", "[LOCATION]", "[DATA_PRODUCT]", "[DATA_ASSET]"),
                Etag = "",
                ValidateOnly = false,
            };
            // Make the request
            Operation<Empty, OperationMetadata> response = dataProductServiceClient.DeleteDataAsset(request);

            // Poll until the returned long-running operation is complete
            Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Empty result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<Empty, OperationMetadata> retrievedResponse = dataProductServiceClient.PollOnceDeleteDataAsset(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
        }
    }
}

Go

Neues Daten-Asset zu einem Datenprodukt hinzufügen

Go

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Go in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Go.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go_gapic. DO NOT EDIT.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewDataProductClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.CreateDataAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#CreateDataAssetRequest.
	}
	op, err := c.CreateDataAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Daten-Asset aus einem Datenprodukt löschen

Go

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Go in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Go.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go_gapic. DO NOT EDIT.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewDataProductClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.DeleteDataAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#DeleteDataAssetRequest.
	}
	op, err := c.DeleteDataAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

Java

Neues Daten-Asset zu einem Datenprodukt hinzufügen

Java

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Java in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Java.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/*
 * Copyright 2026 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.dataplex.v1.samples;

import com.google.cloud.dataplex.v1.CreateDataAssetRequest;
import com.google.cloud.dataplex.v1.DataAsset;
import com.google.cloud.dataplex.v1.DataProductName;
import com.google.cloud.dataplex.v1.DataProductServiceClient;

public class SyncCreateDataAsset {

  public static void main(String[] args) throws Exception {
    syncCreateDataAsset();
  }

  public static void syncCreateDataAsset() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (DataProductServiceClient dataProductServiceClient = DataProductServiceClient.create()) {
      CreateDataAssetRequest request =
          CreateDataAssetRequest.newBuilder()
              .setParent(DataProductName.of("[PROJECT]", "[LOCATION]", "[DATA_PRODUCT]").toString())
              .setDataAssetId("dataAssetId2108984609")
              .setDataAsset(DataAsset.newBuilder().build())
              .setValidateOnly(true)
              .build();
      DataAsset response = dataProductServiceClient.createDataAssetAsync(request).get();
    }
  }
}

Daten-Asset aus einem Datenprodukt löschen

Java

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Java in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Java.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/*
 * Copyright 2026 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.dataplex.v1.samples;

import com.google.cloud.dataplex.v1.DataAssetName;
import com.google.cloud.dataplex.v1.DataProductServiceClient;
import com.google.cloud.dataplex.v1.DeleteDataAssetRequest;
import com.google.protobuf.Empty;

public class SyncDeleteDataAsset {

  public static void main(String[] args) throws Exception {
    syncDeleteDataAsset();
  }

  public static void syncDeleteDataAsset() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (DataProductServiceClient dataProductServiceClient = DataProductServiceClient.create()) {
      DeleteDataAssetRequest request =
          DeleteDataAssetRequest.newBuilder()
              .setName(
                  DataAssetName.of("[PROJECT]", "[LOCATION]", "[DATA_PRODUCT]", "[DATA_ASSET]")
                      .toString())
              .setEtag("etag3123477")
              .setValidateOnly(true)
              .build();
      dataProductServiceClient.deleteDataAssetAsync(request).get();
    }
  }
}

Node.js

Neues Daten-Asset zu einem Datenprodukt hinzufügen

Node.js

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Node.js in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Node.js.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(parent, dataAsset) {
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource where this data asset will be created.
   *  Format:
   *  projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}
   */
  // const parent = 'abc123'
  /**
   *  Optional. The ID of the data asset to create.
   *  The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
   *  numbers (0-9), or hyphens, with the first character a letter, the last a
   *  letter or a number, and a 63 character maximum. Characters outside of
   *  ASCII are not permitted.
   *  Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
   *  If not provided, a system generated ID will be used.
   */
  // const dataAssetId = 'abc123'
  /**
   *  Required. The data asset to create.
   */
  // const dataAsset = {}
  /**
   *  Optional. Validates the request without actually creating the data asset.
   *  Defaults to false.
   */
  // const validateOnly = true

  // Imports the Dataplex library
  const {DataProductServiceClient} = require('@google-cloud/dataplex').v1;

  // Instantiates a client
  const dataplexClient = new DataProductServiceClient();

  async function callCreateDataAsset() {
    // Construct request
    const request = {
      parent,
      dataAsset,
    };

    // Run request
    const [operation] = await dataplexClient.createDataAsset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateDataAsset();
}

process.on('unhandledRejection', err => {
  console.error(err.message);
  process.exitCode = 1;
});
main(...process.argv.slice(2));

Daten-Asset aus einem Datenprodukt löschen

Node.js

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Node.js in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Node.js.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(name) {
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the data asset to delete.
   *  Format:
   *  projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. The etag of the data asset.
   *  If this is provided, it must match the server's etag.
   *  If the etag is provided and does not match the server-computed etag,
   *  the request must fail with a ABORTED error code.
   */
  // const etag = 'abc123'
  /**
   *  Optional. Validates the request without actually deleting the data asset.
   *  Defaults to false.
   */
  // const validateOnly = true

  // Imports the Dataplex library
  const {DataProductServiceClient} = require('@google-cloud/dataplex').v1;

  // Instantiates a client
  const dataplexClient = new DataProductServiceClient();

  async function callDeleteDataAsset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await dataplexClient.deleteDataAsset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteDataAsset();
}

process.on('unhandledRejection', err => {
  console.error(err.message);
  process.exitCode = 1;
});
main(...process.argv.slice(2));

Python

Neues Daten-Asset zu einem Datenprodukt hinzufügen

Python

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Python in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Python.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

# -*- coding: utf-8 -*-
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateDataAsset
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
#   python3 -m pip install google-cloud-dataplex


# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_create_data_asset():
    # Create a client
    client = dataplex_v1.DataProductServiceClient()

    # Initialize request argument(s)
    data_asset = dataplex_v1.DataAsset()
    data_asset.resource = "resource_value"

    request = dataplex_v1.CreateDataAssetRequest(
        parent="parent_value",
        data_asset=data_asset,
    )

    # Make the request
    operation = client.create_data_asset(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)


Daten-Asset aus einem Datenprodukt löschen

Python

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Python in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Python.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

# -*- coding: utf-8 -*-
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeleteDataAsset
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
#   python3 -m pip install google-cloud-dataplex


# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_delete_data_asset():
    # Create a client
    client = dataplex_v1.DataProductServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.DeleteDataAssetRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_data_asset(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)


REST

Wenn Sie dem Datenprodukt ein neues Daten-Asset hinzufügen möchten, verwenden Sie die Methode dataAssets.create. Ein Codebeispiel finden Sie unter Optional: Assets hinzufügen.

Wenn Sie ein Daten-Asset aus dem Datenprodukt löschen möchten, verwenden Sie die Methode dataAssets.delete. Senden Sie beispielsweise die folgende DELETE-Anfrage:

curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/dataProducts/DATA_PRODUCT_ID/dataAssets/DATA_ASSET_ID"

Ersetzen Sie Folgendes:

  • PROJECT_ID: die ID Ihres Projekts in Google Cloud
  • LOCATION: die Region, in der Sie das Datenprodukt erstellen möchten
  • DATA_PRODUCT_ID: Eine eindeutige ID für Ihr Datenprodukt
  • DATA_ASSET_ID: die ID des Daten-Assets, das Sie aus dem Datenprodukt entfernen möchten

Zugriffsgruppen und Asset-Berechtigungen aktualisieren

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, für das Sie die Zugriffsgruppen und Berechtigungen aktualisieren möchten.

  3. Klicken Sie auf den Tab Zugriffsgruppen und ‑berechtigungen.

  4. So aktualisieren Sie eine Zugriffsgruppe:

    1. Klicken Sie auf  Bearbeiten.

    2. Aktualisieren Sie den Namen, die Beschreibung, die Kennung und die Standardrolle der Zugriffsgruppe nach Bedarf.

    3. Wenn Sie eine neue Zugriffsgruppe hinzufügen möchten, klicken Sie auf Zugriffsgruppe hinzufügen und gehen Sie so vor:

      1. Geben Sie im Feld Name der Zugriffsgruppe einen Namen für die neue Zugriffsgruppe ein. Beispiel: Analyst.

      2. Geben Sie im Feld Beschreibung der Zugriffsgruppe eine Beschreibung für die Zugriffsgruppe ein.

      3. Geben Sie im Feld Zugriffsgruppen-ID die E-Mail-Adresse einer Google-Gruppe oder eines Dienstkontos oder beides ein, die Sie dieser Zugriffsgruppe zuweisen möchten:

        • Google-Gruppe: Datenproduktnutzer, die Zugriff für sich selbst anfordern, werden als Mitglieder der zugeordneten Google-Gruppe hinzugefügt.

        • Dienstkonto: Datenproduktnutzer, die Zugriff für ihre Dienstkonten anfordern, erhalten die IAM-Rolle Dienstkonto-Token-Ersteller (roles/iam.serviceAccountTokenCreator), um die Identität des Dienstkontos des Datenerstellers zu übernehmen, das der Zugriffsgruppe zugeordnet ist.

      4. Optional: Wählen Sie im Feld Standardrolle eine IAM-Standardrolle aus, die automatisch für alle unterstützten Assets im Datenprodukt gewährt werden soll. Wenn IAM-Rollen bereits direkt bestimmten Assets zugewiesen sind, werden diese direkten Berechtigungen durch das Hinzufügen einer Standardrolle nicht überschrieben.

    4. Klicken Sie auf Hinzufügen.

  5. So entfernen Sie eine Zugriffsgruppe:

    1. Klicken Sie für die Zugriffsgruppe, die Sie entfernen möchten, auf > Entfernen.

    2. Klicken Sie zur Bestätigung auf Entfernen. Wenn Sie eine Zugriffsgruppe entfernen, werden die Standardrolle und alle Asset-spezifischen Berechtigungen für alle Assets im Datenprodukt widerrufen.

  6. Wenn für das ausgewählte Datenprodukt keine Zugriffsgruppen konfiguriert sind, können Sie eine neue Zugriffsgruppe hinzufügen, indem Sie auf Zugriffsgruppe hinzufügen klicken.

  7. So aktualisieren Sie Asset-Berechtigungen:

    1. Klicken Sie für das Asset, dessen Berechtigungen Sie aktualisieren möchten, auf > Berechtigungen.

    2. Aktualisieren Sie die erforderlichen Zugriffsgruppen und IAM-Rollen. Sie können Asset-spezifische Rollen zuweisen, um die Standardrolle einer Zugriffsgruppe zu überschreiben.

    3. Klicken Sie auf Konfigurieren. In der Spalte Berechtigungen der Asset-Tabelle werden die aktualisierten Berechtigungen und ihr Konfigurationsstatus angezeigt:

      • Angewendet: Die IAM-Rolle (Standard oder Asset-spezifisch) ist für die zugrunde liegende Ressource aktiv.
      • Fehlgeschlagen: Die IAM-Rolle konnte nicht auf die zugrunde liegende Ressource angewendet werden. Den genauen Grund für den Fehler finden Sie in Cloud Logging.
      • Nicht unterstützt: Das Anwenden von Berechtigungen wird für den Ressourcentyp dieses Assets nicht unterstützt.

C#

Zugriffsgruppen aktualisieren

C#

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für C# in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog C#.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
    using Google.Cloud.Dataplex.V1;
    using Google.LongRunning;
    using Google.Protobuf.WellKnownTypes;

    public sealed partial class GeneratedDataProductServiceClientSnippets
    {
        /// <summary>Snippet for UpdateDataProduct</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public void UpdateDataProductRequestObject()
        {
            // Create client
            DataProductServiceClient dataProductServiceClient = DataProductServiceClient.Create();
            // Initialize request argument(s)
            UpdateDataProductRequest request = new UpdateDataProductRequest
            {
                DataProduct = new DataProduct(),
                UpdateMask = new FieldMask(),
                ValidateOnly = false,
            };
            // Make the request
            Operation<DataProduct, OperationMetadata> response = dataProductServiceClient.UpdateDataProduct(request);

            // Poll until the returned long-running operation is complete
            Operation<DataProduct, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            DataProduct result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<DataProduct, OperationMetadata> retrievedResponse = dataProductServiceClient.PollOnceUpdateDataProduct(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                DataProduct retrievedResult = retrievedResponse.Result;
            }
        }
    }
}

Asset-Berechtigungen aktualisieren

C#

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für C# in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog C#.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
    using Google.Cloud.Dataplex.V1;
    using Google.LongRunning;
    using Google.Protobuf.WellKnownTypes;

    public sealed partial class GeneratedDataProductServiceClientSnippets
    {
        /// <summary>Snippet for UpdateDataAsset</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public void UpdateDataAssetRequestObject()
        {
            // Create client
            DataProductServiceClient dataProductServiceClient = DataProductServiceClient.Create();
            // Initialize request argument(s)
            UpdateDataAssetRequest request = new UpdateDataAssetRequest
            {
                DataAsset = new DataAsset(),
                UpdateMask = new FieldMask(),
                ValidateOnly = false,
            };
            // Make the request
            Operation<DataAsset, OperationMetadata> response = dataProductServiceClient.UpdateDataAsset(request);

            // Poll until the returned long-running operation is complete
            Operation<DataAsset, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            DataAsset result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<DataAsset, OperationMetadata> retrievedResponse = dataProductServiceClient.PollOnceUpdateDataAsset(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                DataAsset retrievedResult = retrievedResponse.Result;
            }
        }
    }
}

Go

Zugriffsgruppen aktualisieren

Go

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Go in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Go.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go_gapic. DO NOT EDIT.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewDataProductClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.UpdateDataProductRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#UpdateDataProductRequest.
	}
	op, err := c.UpdateDataProduct(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Asset-Berechtigungen aktualisieren

Go

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Go in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Go.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go_gapic. DO NOT EDIT.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewDataProductClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.UpdateDataAssetRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#UpdateDataAssetRequest.
	}
	op, err := c.UpdateDataAsset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Java

Zugriffsgruppen aktualisieren

Java

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Java in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Java.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/*
 * Copyright 2026 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.dataplex.v1.samples;

import com.google.cloud.dataplex.v1.DataProduct;
import com.google.cloud.dataplex.v1.DataProductServiceClient;
import com.google.cloud.dataplex.v1.UpdateDataProductRequest;
import com.google.protobuf.FieldMask;

public class SyncUpdateDataProduct {

  public static void main(String[] args) throws Exception {
    syncUpdateDataProduct();
  }

  public static void syncUpdateDataProduct() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (DataProductServiceClient dataProductServiceClient = DataProductServiceClient.create()) {
      UpdateDataProductRequest request =
          UpdateDataProductRequest.newBuilder()
              .setDataProduct(DataProduct.newBuilder().build())
              .setUpdateMask(FieldMask.newBuilder().build())
              .setValidateOnly(true)
              .build();
      DataProduct response = dataProductServiceClient.updateDataProductAsync(request).get();
    }
  }
}

Asset-Berechtigungen aktualisieren

Java

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Java in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Java.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/*
 * Copyright 2026 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.dataplex.v1.samples;

import com.google.cloud.dataplex.v1.DataAsset;
import com.google.cloud.dataplex.v1.DataProductServiceClient;
import com.google.cloud.dataplex.v1.UpdateDataAssetRequest;
import com.google.protobuf.FieldMask;

public class SyncUpdateDataAsset {

  public static void main(String[] args) throws Exception {
    syncUpdateDataAsset();
  }

  public static void syncUpdateDataAsset() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (DataProductServiceClient dataProductServiceClient = DataProductServiceClient.create()) {
      UpdateDataAssetRequest request =
          UpdateDataAssetRequest.newBuilder()
              .setDataAsset(DataAsset.newBuilder().build())
              .setUpdateMask(FieldMask.newBuilder().build())
              .setValidateOnly(true)
              .build();
      DataAsset response = dataProductServiceClient.updateDataAssetAsync(request).get();
    }
  }
}

Node.js

Zugriffsgruppen aktualisieren

Node.js

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Node.js in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Node.js.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(dataProduct) {
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The data product to update.
   *  The data product's `name` field is used to identify the data product to
   *  update.
   */
  // const dataProduct = {}
  /**
   *  Optional. The list of fields to update.
   *  If this is empty or not set, then all the fields will be updated.
   */
  // const updateMask = {}
  /**
   *  Optional. Validates the request without actually updating the data product.
   *  Default: false.
   */
  // const validateOnly = true

  // Imports the Dataplex library
  const {DataProductServiceClient} = require('@google-cloud/dataplex').v1;

  // Instantiates a client
  const dataplexClient = new DataProductServiceClient();

  async function callUpdateDataProduct() {
    // Construct request
    const request = {
      dataProduct,
    };

    // Run request
    const [operation] = await dataplexClient.updateDataProduct(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateDataProduct();
}

process.on('unhandledRejection', err => {
  console.error(err.message);
  process.exitCode = 1;
});
main(...process.argv.slice(2));

Asset-Berechtigungen aktualisieren

Node.js

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Node.js in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Node.js.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(dataAsset) {
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The data asset to update.
   *  The data asset's `name` field is used to identify the data asset to update.
   */
  // const dataAsset = {}
  /**
   *  Optional. The list of fields to update.
   *  If this is empty or not set, then all the fields will be updated.
   */
  // const updateMask = {}
  /**
   *  Optional. Validates the request without actually updating the data asset.
   *  Defaults to false.
   */
  // const validateOnly = true

  // Imports the Dataplex library
  const {DataProductServiceClient} = require('@google-cloud/dataplex').v1;

  // Instantiates a client
  const dataplexClient = new DataProductServiceClient();

  async function callUpdateDataAsset() {
    // Construct request
    const request = {
      dataAsset,
    };

    // Run request
    const [operation] = await dataplexClient.updateDataAsset(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateDataAsset();
}

process.on('unhandledRejection', err => {
  console.error(err.message);
  process.exitCode = 1;
});
main(...process.argv.slice(2));

Python

Zugriffsgruppen aktualisieren

Python

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Python in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Python.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

# -*- coding: utf-8 -*-
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for UpdateDataProduct
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
#   python3 -m pip install google-cloud-dataplex


# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_update_data_product():
    # Create a client
    client = dataplex_v1.DataProductServiceClient()

    # Initialize request argument(s)
    data_product = dataplex_v1.DataProduct()
    data_product.display_name = "display_name_value"
    data_product.owner_emails = ["owner_emails_value1", "owner_emails_value2"]

    request = dataplex_v1.UpdateDataProductRequest(
        data_product=data_product,
    )

    # Make the request
    operation = client.update_data_product(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)


Asset-Berechtigungen aktualisieren

Python

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Python in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Python.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

# -*- coding: utf-8 -*-
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for UpdateDataAsset
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
#   python3 -m pip install google-cloud-dataplex


# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_update_data_asset():
    # Create a client
    client = dataplex_v1.DataProductServiceClient()

    # Initialize request argument(s)
    data_asset = dataplex_v1.DataAsset()
    data_asset.resource = "resource_value"

    request = dataplex_v1.UpdateDataAssetRequest(
        data_asset=data_asset,
    )

    # Make the request
    operation = client.update_data_asset(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)


REST

Verwenden Sie die Methode dataProducts.patch, um die Zugriffsgruppen zu aktualisieren, die mit einem Datenprodukt verknüpft sind. Ein Codebeispiel finden Sie unter Zugriffsgruppen konfigurieren.

Verwenden Sie die Methode dataAssets.patch, um die Asset-Berechtigungen zu aktualisieren. Ein Codebeispiel finden Sie unter Asset-Berechtigungen konfigurieren.

Datenproduktvertrag aktualisieren

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, für das Sie den Vertrag aktualisieren möchten.

  3. Klicken Sie auf den Tab Vertrag.

  4. So aktualisieren Sie den bestehenden Vertrag:

    1. Klicken Sie auf  Bearbeiten.

    2. Aktualisieren Sie die erforderlichen Felder.

    3. Klicken Sie auf Speichern.

  5. Wenn dem ausgewählten Datenprodukt kein Vertrag angehängt ist, können Sie einen hinzufügen, indem Sie auf Vertrag hinzufügen klicken.

REST

Verwenden Sie zum Aktualisieren eines Vertrags die Methode entries.patch. Ein Codebeispiel finden Sie unter Vertrag hinzufügen.

Aspekte eines Datenprodukts aktualisieren

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, für das Sie die Aspekte aktualisieren möchten.

  3. Klicken Sie auf den Tab Aspekte.

  4. So aktualisieren Sie einen Aspekt:

    1. Klicken Sie auf den Aspekt, den Sie aktualisieren möchten.

    2. Klicken Sie auf  Bearbeiten.

    3. Aktualisieren Sie bei Bedarf den Aspekttyp, das Land und die Region.

    4. Klicken Sie auf Speichern.

  5. So fügen Sie dem Datenprodukt einen neuen Aspekt hinzu:

    1. Klicken Sie auf + Aspekt hinzufügen.

    2. Suchen Sie im Feld Aspekttyp auswählen nach einem Aspekttyp und wählen Sie ihn aus der Liste aus. Beispiel: Geo context.

    3. Wählen Sie im Feld Land das Land aus, zu dem das Asset gehört.

    4. Wählen Sie im Feld Region die Geschäftsregion aus, zu der das Asset gehört.

    5. Klicken Sie auf Speichern.

  6. So löschen Sie einen Aspekt:

    1. Klicken Sie auf den Aspekt, den Sie löschen möchten.

    2. Klicken Sie auf  Löschen.

    3. Klicken Sie auf Bestätigen, um die Aktion zu bestätigen.

REST

Wenn Sie einen Aspekt des Datenprodukteintrags aktualisieren möchten, verwenden Sie die Methode entries.patch.

Dokumentation des Datenprodukts aktualisieren

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, für das Sie die Dokumentation aktualisieren möchten.

  3. Klicken Sie auf den Tab Übersicht.

  4. Klicken Sie neben Dokumentation auf Bearbeiten.

  5. Aktualisieren Sie das Nutzerhandbuch, die Beispielabfragen und andere Dokumentation nach Bedarf.

  6. Klicken Sie auf Speichern.

REST

Die Dokumentation ist Teil des Aspekts overview. Verwenden Sie die Methode entries.patch, um die Dokumentation des Datenprodukts zu aktualisieren.

Datenprodukt löschen

Wenn Sie ein Datenprodukt löschen möchten, müssen Sie zuerst alle Assets aus dem Datenprodukt entfernen.

Console

  1. Rufen Sie in der Google Cloud Console die Seite Datenprodukte im Knowledge Catalog auf.

    Zu „Datenprodukte“

  2. Klicken Sie auf das Datenprodukt, das Sie löschen möchten.

  3. Klicke auf den Tab Assets.

  4. Klicken Sie für jedes aufgeführte Asset auf > Entfernen. Bestätigen Sie die Aktion, indem Sie auf Entfernen klicken.

  5. Nachdem Sie alle Assets entfernt haben, löschen Sie das Datenprodukt, indem Sie auf Löschen klicken.

  6. Geben Sie im Bestätigungsdialogfeld delete ein und klicken Sie auf Löschen.

C#

C#

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für C# in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog C#.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

using Google.Cloud.Dataplex.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedDataProductServiceClientSnippets
{
    /// <summary>Snippet for DeleteDataProduct</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void DeleteDataProductRequestObject()
    {
        // Create client
        DataProductServiceClient dataProductServiceClient = DataProductServiceClient.Create();
        // Initialize request argument(s)
        DeleteDataProductRequest request = new DeleteDataProductRequest
        {
            DataProductName = DataProductName.FromProjectLocationDataProduct("[PROJECT]", "[LOCATION]", "[DATA_PRODUCT]"),
            Etag = "",
            ValidateOnly = false,
        };
        // Make the request
        Operation<Empty, OperationMetadata> response = dataProductServiceClient.DeleteDataProduct(request);

        // Poll until the returned long-running operation is complete
        Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        Empty result = completedResponse.Result;

        // Or get the name of the operation
        string operationName = response.Name;
        // This name can be stored, then the long-running operation retrieved later by name
        Operation<Empty, OperationMetadata> retrievedResponse = dataProductServiceClient.PollOnceDeleteDataProduct(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            Empty retrievedResult = retrievedResponse.Result;
        }
    }
}

Go

Go

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Go in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Go.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewDataProductClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.DeleteDataProductRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#DeleteDataProductRequest.
	}
	op, err := c.DeleteDataProduct(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

Java

Java

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Java in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Java.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

import com.google.cloud.dataplex.v1.DataProductName;
import com.google.cloud.dataplex.v1.DataProductServiceClient;
import com.google.cloud.dataplex.v1.DeleteDataProductRequest;
import com.google.protobuf.Empty;

public class SyncDeleteDataProduct {

  public static void main(String[] args) throws Exception {
    syncDeleteDataProduct();
  }

  public static void syncDeleteDataProduct() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (DataProductServiceClient dataProductServiceClient = DataProductServiceClient.create()) {
      DeleteDataProductRequest request =
          DeleteDataProductRequest.newBuilder()
              .setName(DataProductName.of("[PROJECT]", "[LOCATION]", "[DATA_PRODUCT]").toString())
              .setEtag("etag3123477")
              .setValidateOnly(true)
              .build();
      dataProductServiceClient.deleteDataProductAsync(request).get();
    }
  }
}

Node.js

Node.js

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Node.js in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Node.js.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. The name of the data product to delete.
 *  Format:
 *  projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}
 */
// const name = 'abc123'
/**
 *  Optional. The etag of the data product.
 *  If an etag is provided and does not match the current etag of the data
 *  product, then the deletion will be blocked and an ABORTED error will be
 *  returned.
 */
// const etag = 'abc123'
/**
 *  Optional. Validates the request without actually deleting the data product.
 *  Default: false.
 */
// const validateOnly = true

// Imports the Dataplex library
const {DataProductServiceClient} = require('@google-cloud/dataplex').v1;

// Instantiates a client
const dataplexClient = new DataProductServiceClient();

async function callDeleteDataProduct() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const [operation] = await dataplexClient.deleteDataProduct(request);
  const [response] = await operation.promise();
  console.log(response);
}

callDeleteDataProduct();

Python

Python

Bevor Sie dieses Beispiel ausprobieren, folgen Sie der Einrichtungsanleitung für Python in der Kurzanleitung zur Verwendung von Clientbibliotheken für Knowledge Catalog. Weitere Informationen finden Sie in der API-Referenzdokumentation für Knowledge Catalog Python.

Richten Sie zur Authentifizierung bei Knowledge Catalog Standardanmeldedaten für Anwendungen ein. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_delete_data_product():
    # Create a client
    client = dataplex_v1.DataProductServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.DeleteDataProductRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_data_product(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)

REST

Wenn Sie ein Datenprodukt löschen möchten, verwenden Sie die Methode dataProducts.delete.

Senden Sie beispielsweise die folgende DELETE-Anfrage:

curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/dataProducts/DATA_PRODUCT_ID

Ersetzen Sie Folgendes:

  • PROJECT_ID: die ID Ihres Projekts in Google Cloud
  • LOCATION: die Region, in der sich das Datenprodukt befindet
  • DATA_PRODUCT_ID: die ID des Datenprodukts, das Sie löschen möchten

Datenaufbewahrung und Projektlöschung

Wenn Sie ein Google Cloud -Projekt löschen, das Datenprodukte enthält, durchlaufen die zugehörigen Ressourcen den standardmäßigen Löschzyklus von Google Cloud , der auch als „Wipeout“ bezeichnet wird. Eine detaillierte Übersicht über die technischen Prozesse und Zeitpläne für dieses Verhalten finden Sie unter Datenlöschung in Google Cloud.

Ressourcenlebenszyklus während des Löschens von Projekten

Der Lebenszyklus Ihrer Datenprodukte und Daten-Assets wird nach einer Anfrage zum Löschen eines Projekts in zwei Hauptphasen verwaltet:

  • Vorläufiges Löschen (Status Hidden): Unmittelbar nach dem Initiieren des Löschens des Projekts werden alle Datenprodukte und Daten-Assets im Projekt als Hidden markiert. Während dieses 30-tägigen Kulanzzeitraums bleiben die Metadaten erhalten, sind aber nicht mehr über Dataplex APIs oder die Google Cloud Console zugänglich. Sie können das Projekt und seine Ressourcen jederzeit während dieses Zeitraums wiederherstellen.

  • Dauerhaftes Löschen (Status Purged): Nach Ablauf des 30-tägigen Kulanzzeitraums werden das Projekt und alle zugehörigen Knowledge Catalog-Metadaten endgültig gelöscht. Knowledge Catalog verwendet eine interne Richtlinie zum Löschen von Zeilen, um diese Datensätze nachweislich aus dem Speicher zu löschen.

Verhalten von IAM-Richtlinien für projektübergreifende Ressourcen

Es gibt einen wichtigen operativen Unterschied zwischen Knowledge Catalog-Metadaten und den IAM-Richtlinien, die für Ihre zugrunde liegenden physischen Daten (z. B. BigQuery-Datasets oder Cloud Storage-Buckets) erzwungen werden.

Knowledge Catalog-Metadaten im Projekt werden automatisch gelöscht. IAM-Bindungen, die auf Datenressourcen in einem anderen Projekt (Projekt B) angewendet werden, werden jedoch nicht automatisch widerrufen, wenn das Projekt des Datenproduktinhabers (Projekt A) gelöscht wird.

  • Verwaiste Bindungen: Da die physischen Ressourcen im Zielprojekt aktiv bleiben, entfernt das IAM-System die mit dem gelöschten Projekt verknüpften Hauptkonten-IDs nicht automatisch.

  • Zombie-Berechtigungen verhindern: Um den Datenzugriff vollständig zu deaktivieren, löschen Sie Daten-Assets manuell aus Ihren Datenprodukten oder entfernen Sie die zugehörigen IAM-Bindungen explizit aus Ihren projektübergreifenden Ressourcen, bevor Sie ein Projekt löschen.

Projektwiederherstellung (Löschen rückgängig machen)

Wenn Sie ein gelöschtes Projekt innerhalb des Kulanzzeitraums von 30 Tagen wiederherstellen, versucht Knowledge Catalog, Ihre Ressourcen und deren Sichtbarkeit im Katalog wiederherzustellen. Bei projektübergreifenden Assets wird der Datenzugriff für das wiederhergestellte Projekt in der Regel sofort fortgesetzt, da die zugrunde liegenden IAM-Bindungen während des Löschvorgangs nicht automatisch widerrufen wurden.

Nächste Schritte