想分享對 Google Ads API 的意見嗎?
立即註冊,等待受邀參與使用者研究調查!
資源名稱
Google Ads API 中實體的專屬 ID 稱為資源名稱,以可預測格式的字串表示。如果您知道資源名稱的組成元件,可以使用這個公用程式產生最終資源名稱。
ResourceNames 類別
如果您知道與該實體相關的所有 ID,ResourceNames
公用程式是建構實體資源名稱的方法。舉例來說,廣告活動資源名稱的格式為 customers/{customer_id}/campaigns/{campaign_id}
,因此如果您知道客戶 ID 和廣告活動 ID,就可以使用 ResourceNames
公用程式建構完整的資源名稱,如下所示:
my $resource_name =
Google::Ads::GoogleAds::V19::Utils::ResourceNames::campaign($customer_id,
$campaign_id);
您也可以使用其他實體名稱,這些名稱會根據資源名稱的最終形式採用不同的 ID。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-04 (世界標準時間)。
[null,null,["上次更新時間:2025-03-04 (世界標準時間)。"],[[["Google Ads API entities are uniquely identified by resource names, which are strings with predictable formats based on their components."],["The `ResourceNames` utility helps construct these resource names when you know the necessary IDs, such as customer and campaign IDs."],["You can use the `ResourceNames` utility with various entity names, providing the corresponding IDs needed for the specific resource name structure."]]],[]]