次のように、パイプライン実行の一意のパイプライン実行請求 ID を使用して、パイプライン実行によって作成されたリソースの費用を確認することもできます。
Vertex AI Pipelines は、パイプライン実行に vertex-ai-pipelines-run-billing-id ラベルを自動的に付けます。このラベルの値は、一意のパイプライン実行請求 ID です。
Vertex AI Pipelines は、パイプラインの実行中にパイプライン コンポーネントによって生成された Google Cloud リソースにこのラベルを伝播させます。コンポーネントやリソースによっては、ラベルを伝播させるために、 Google Cloud パイプライン コンポーネント SDK をアップグレードするか、コンポーネント コードを更新する必要があります。 Google Cloud リソースのラベル付けの詳細については、Vertex AI Pipelines によるリソースのラベル付けをご覧ください。
vertex-ai-pipelines-run-billing-id ラベルは、パイプラインによって生成された Google Cloud リソースの使用量を請求レポートで関連付けます。このラベルの値を使用すると、BigQuery への Cloud Billing のエクスポートで実行されるパイプラインでのリソース使用量の費用を確認できます。
一意のパイプライン実行請求 ID を次の形式で入力して、Enter キーを押します。 labels.vertex-ai-pipelines-run-billing-id=PIPELINE_RUN_BILLING_ID
ここで、PIPELINE_RUN_BILLING_ID は一意のパイプライン実行請求 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-09-04 UTC。"],[],[],null,["# Understand pipeline run costs\n\nYou can review the cost of your pipeline runs using [Cloud Billing export to BigQuery](/billing/docs/how-to/export-data-bigquery).\n\nYou can also use the unique pipeline run billing ID of your pipeline run to review the costs of resources created by the pipeline run, as follows:\n\n1. Vertex AI Pipelines automatically attaches the `vertex-ai-pipelines-run-billing-id` label to your pipeline run. The value of this label is your unique pipeline run billing ID.\n\n2. Vertex AI Pipelines propagates this label to Google Cloud resources generated by pipeline components during the pipeline run. Note that for some components and resources, you need to either upgrade the Google Cloud Pipeline Components SDK or update your component code to propagate the labels. For more information about labeling Google Cloud resources, see [Resource labeling by Vertex AI Pipelines](/vertex-ai/docs/pipelines/gcpc-label-propagation).\n\n3. The `vertex-ai-pipelines-run-billing-id` label connects the usage of Google Cloud resources generated by the pipeline run in billing reports. Using the value of this label, you can review the cost of the resource usage in the pipeline run with [Cloud Billing export to BigQuery](/billing/docs/how-to/export-data-bigquery).\n\nThis page shows you how to do the following:\n\n- [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines)\n\n- [Use a pipeline run billing ID to locate a pipeline run](#locate_pipeline_run)\n\n- [Query the costs of Google Cloud resources in a pipeline run from Cloud Billing](#view_pipeline_resources_cost)\n\nBefore you begin\n----------------\n\nBefore you use Cloud Billing to understand the cost of a pipeline run, use the following instructions to set up your Google Cloud project and development environment:\n\n- [Set up Cloud Billing data export to BigQuery](/billing/docs/how-to/export-data-bigquery-setup).\n\n- [Install v1.0.31 or higher of the Google Cloud Pipeline Components SDK](/vertex-ai/docs/pipelines/components-quickstart#install_latest_release)\n\nFor more information about the schema of Cloud Billing standard usage cost data, see [Schema of the standard usage cost data](/billing/docs/how-to/export-data-bigquery-tables/standard-usage#usage-cost-export-more-info).\n\nList your ten most expensive pipeline runs\n------------------------------------------\n\nRun the following query to view a list of your ten most expensive pipeline runs over a specified time period:\n\n**Standard SQL** \n\n SELECT\n project.id,\n location.region,\n L.value,\n SUM(cost) AS total_cost\n FROM\n `project.dataset.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX` B,\n UNNEST (B.labels) L\n WHERE\n DATE(_PARTITIONTIME) \u003e= \"\u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e\"\n AND DATE(_PARTITIONTIME) \u003c \"\u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e\"\n AND L.key = \"vertex-ai-pipelines-run-billing-id\"\n GROUP BY\n project.id,\n location.region,\n L.value\n ORDER BY\n total_cost DESC\n LIMIT\n 10;\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e: Start date of the time period.\n\n- \u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e: End date of the time period.\n\nYou should see the following columns in the query results:\n\n- `project_id`\n\n- `region`\n\n- `pipeline_run_billing_id`\n\n- `total_cost`\n\nYou can now use the unique pipeline run billing ID from the `pipeline_run_billing_id` column of the query results to do the following:\n\n- [Locate or retrieve a pipeline run](#locate_pipeline_run)\n\n- [View the costs of Google Cloud resources in a pipeline run](#view_pipeline_resources_cost)\n\n| **Tip:** The query results display the pipeline runs in the descending order of the cost. The first row represents the most expensive pipeline run.\n\nUse the billing ID to locate a pipeline run\n-------------------------------------------\n\nYou can use the unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines) to locate a pipeline run. \n\n### Console\n\nUse the following instructions to retrieve a pipeline run in the Google Cloud console.\n\n1. In the Google Cloud console, in the Vertex AI section, go to the **Pipelines** page.\n\n [Go to Pipelines](https://console.cloud.google.com/vertex-ai/pipelines)\n2. To locate the pipeline run, filter the list using a unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines). To do this:\n\n 1. Click **Filter** and then click **Labels**.\n\n 2. Enter the unique pipeline run billing ID in the following format and press **Enter** : \n\n `labels.vertex-ai-pipelines-run-billing-id=`\u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e \n\n where \u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e is the unique pipeline run billing ID.\n\n### Vertex AI SDK for Python\n\nUse the following code sample to retrieve the pipeline run: \n\n runs = aip.PipelineJob.list(\n project=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT_ID\u003c/span\u003e\u003c/var\u003e,\n location=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eLOCATION\u003c/span\u003e\u003c/var\u003e,\n filter=\"labels.vertex-ai-pipelines-run-billing-id=\u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e\")\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The Google Cloud project that this pipeline runs in.\n\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The region that the pipeline runs in. For more information about the regions that Vertex AI Pipelines is available in, see the [Vertex AI locations guide](/vertex-ai/docs/general/locations#feature-availability).\n\n- \u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e: Unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines).\n\nView the costs of Google Cloud resources in a pipeline run\n----------------------------------------------------------\n\nYou can use the unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines) to view the costs of Google Cloud resources generated by the pipeline run.\n\nRun the following query to view the list of Google Cloud resources generated in a pipeline run, along with the cost of each resource:\n\n**Standard SQL** \n\n SELECT\n service,\n sku,\n cost\n FROM\n `project.dataset.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX` B,\n UNNEST (B.labels) L\n WHERE\n DATE(_PARTITIONTIME) \u003e= \"\u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e\"\n AND DATE(_PARTITIONTIME) \u003c \"\u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e\"\n AND L.key = \"vertex-ai-pipelines-run-billing-id\"\n AND L.value = \"\u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e\";\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSTART_DATE\u003c/var\u003e: Start date of the time period.\n\n- \u003cvar translate=\"no\"\u003eEND_DATE\u003c/var\u003e: End date of the time period.\n\n- \u003cvar translate=\"no\"\u003ePIPELINE_RUN_BILLING_ID\u003c/var\u003e: Unique pipeline run billing ID from the query results in [List your ten most expensive pipeline runs](#retrieve_ten_most_expensive_pipelines).\n\nYou should see the following columns in the query results:\n\n- `service.id`\n\n- `service.description`\n\n- `sku.id`\n\n- `sku_description`\n\n- `cost`\n\nThe `cost` column represents the cost of a resource corresponding to the `sku.id` in the pipeline run."]]