想分享對 Google Ads API 的意見嗎?
立即註冊,等待受邀參與使用者研究調查!
資源名稱
在 Google Ads API 中,實體的專屬 ID 稱為資源
名稱,並顯示為具有可預測格式的字串。如果您知道
您可以使用此公用程式
產生最終資源名稱
ResourceNames 類別
ResourceNames
類別是建構實體資源名稱的方法
若您知道該實體的所有相關 ID舉例來說
廣告活動資源名稱的格式如下:
customers/{customer_id}/campaigns/{campaign_id}
因此如果您知道客戶 ID 和廣告活動 ID,就可以使用
ResourceNames
類別會以下列方式建構完整的資源名稱:
String campaignResourceName = ResourceNames.campaign(customerId, campaignId);
您也可以使用其他實體名稱,其 ID 會根據
資源名稱的最終形式
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-14 (世界標準時間)。
[null,null,["上次更新時間:2024-10-14 (世界標準時間)。"],[[["The Google Ads API uses unique identifiers called resource names to represent entities."],["Resource names follow a predictable format and can be generated using their components."],["The `ResourceNames` class allows you to construct a resource name using relevant IDs, such as customer ID and campaign ID."],["Using entity names like `campaign` with appropriate IDs in the `ResourceNames` class generates the full resource name string."]]],[]]