Data Catalog を使用するには、 Google Cloud
プロジェクトで、Data Catalog で作成するリソース、または API を使用して他の Google Cloud システムにアクセスするリソースを含む Data Catalog API を有効にする必要があります。このプロジェクトを Data Catalog の「リソース プロジェクト」と呼びます。
一般的なケースでは、プロジェクトが 1 つしかない場合、そのプロジェクトで Data Catalog API を有効にするだけで、そのプロジェクトに含まれているすべてのリソースにアクセスできます。Data Catalog クイックスタートでは、Data Catalog API が有効で、Data Catalog タグ テンプレートとタグだけでなく、アクセスする BigQuery テーブルを含むプロジェクトの作成例があります。
複数のプロジェクトでタグ テンプレートを使用する
タグ テンプレートを含め、 Google Cloud のすべてがプロジェクトに存在します。ただし、あるプロジェクトのタグ テンプレートを使用して別のプロジェクトでタグを作成できますが、その場合、もう一方のプロジェクトでテンプレートを使用できるよう許可する必要があります。これを行うには、TagTemplate Owner、Creator、User、Viewer の IAM ロールを使用します。
たとえば、プロジェクト A がプロジェクト B が所有するサービス アカウントに TagTemplate User のロールを付与した場合、プロジェクト B はそのテンプレートを使用してタグを作成できます。プロジェクト A は同じサービス アカウントに、Tag Editor ロールを使用して作成されたタグを変更することもできます。
プロジェクト A がプロジェクト B を認可しない場合、プロジェクト B は独自のデータ リソースにプロジェクト A のタグ テンプレートを使用してタグ付けすることはできません。独自のテンプレートを作成する必要があります。
テンプレートが作成されたときに、タグ テンプレート コンテナ プロジェクトで Data Catalog API が有効になっているため、これらの API を呼び出すために特に対応する必要はありません。注:タグの parent パラメータで識別されるプロジェクトと、タグの作成に使用されるタグ テンプレートは同じ組織のものである必要があります。
注:
service account project: アプリケーション コードを認証するためにサービス アカウント認証情報を生成したプロジェクト。
resource parameter: リクエストに関連付けられたリソースを識別する API リクエストで渡されるパラメータ(たとえば、tagTemplates.createparent パラメータの project-id を参照してください)。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-01-16 UTC。"],[[["\u003cp\u003eThe Data Catalog API must be enabled in a Google Cloud project, referred to as the "resource project," to create resources in Data Catalog or access them in other Google Cloud systems.\u003c/p\u003e\n"],["\u003cp\u003eTag templates, although created within a specific project, can be used to create tags in other projects if the appropriate IAM roles (\u003ccode\u003eTagTemplate Owner\u003c/code\u003e, \u003ccode\u003eCreator\u003c/code\u003e, \u003ccode\u003eUser\u003c/code\u003e, and \u003ccode\u003eViewer\u003c/code\u003e) are granted.\u003c/p\u003e\n"],["\u003cp\u003eThe project hosting the tag template is responsible for billing, even if the tags are utilized by other projects.\u003c/p\u003e\n"],["\u003cp\u003eFor optimal management, it's a best practice to create tag templates in a centralized project if they're intended for use across multiple projects, and a data governance team should manage them.\u003c/p\u003e\n"],["\u003cp\u003eThe necessary project in which the Data Catalog API must be enabled varies according to which Data Catalog APIs are being utilized, such as \u003ccode\u003eget/lookup/search\u003c/code\u003e vs.\u003ccode\u003ecreate/update/delete\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Data Catalog resource projects\n\nTo use Data Catalog, you must\n[enable the Data Catalog API](/apis/docs/enable-disable-apis#enable_an_api)\nin a Google Cloud\n[project](/resource-manager/docs/cloud-platform-resource-hierarchy#projects)\nthat contains the resources you will create in Data Catalog or\naccess in other Google Cloud systems with the API. We refer\nto this project as the Data Catalog \"resource project\".\n\nIn the common case, if you have only one project, you only need to enable\nthe Data Catalog API in it to access all the resources it contains.\nThe [Data Catalog quickstart](/data-catalog/docs/quickstarts/quickstart-search-tag)\nis an example of the creation of a project that has the Data Catalog\nAPI enabled and contains a BigQuery table you access as well as a\nData Catalog tag template and tag.\n\n### Using tag templates in multiple projects\n\nEverything in Google Cloud lives in a project, including your tag\ntemplates. However, you can use tag templates from one project to create tags in\nanother if you authorize the other project to use the templates.\nTo do this, use the `TagTemplate Owner`, `Creator`, `User`, and `Viewer` IAM\nroles.\n\nFor example: If project A grants the `TagTemplate User` role to a service\naccount owned by project B, this authorizes project B to create tags using its\ntemplates. Project A can also authorize the same service account to modify the\ncreated tags using the `Tag Editor` role.\n\nIf project A does not authorize project B, project B cannot tag its own data\nresources using project A's tag templates---it must create its own templates.\n| **Important:** The project that hosts your tag template is billed for tags created from it, even if they are used by other projects.\n\n**Best practice:** Create templates in a central project\nif they are relevant to more than one project. Also, your data governance team\nshould own the shared tag templates and maintain them on behalf of the\norganization.\n\n### Identifying the Data Catalog resource project\n\nThe following table lists Data Catalog APIs and the\nassociated resource project(s) where Data Catalog\nAPI must be enabled.\n\n**Notes:**\n\n- `service account project`: the project in which you have generated\n [service account credentials](/iam/docs/service-account-overview#what-are-service-accounts)\n to authenticate your application code.\n\n- `resource parameter`: the parameter passed in the API request that\n identifies the resource associated with the request (for example, see `project-id` in the\n [tagTemplates.create](/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create)\n `parent` parameter).\n\nWhat's next\n-----------\n\n- Follow [Getting started with Data Catalog](/data-catalog/docs/quickstarts/quickstart-search-tag)."]]