想分享對 Google Ads API 的意見嗎?
立即註冊,等待受邀參與使用者研究調查!
資源名稱
Google Ads API 中實體的專屬 ID 稱為資源名稱,以可預測格式的字串表示。如果您知道資源名稱的組成元件,可以使用這個公用程式產生最終資源名稱。
ResourceNames 類別
如果您知道與該實體相關的所有 ID,ResourceNames
類別是建構實體資源名稱的方法。舉例來說,廣告活動資源名稱的格式為 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 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-04 (世界標準時間)。
[null,null,["上次更新時間:2025-03-04 (世界標準時間)。"],[[["The Google Ads API client library for .NET will drop support for .NET 5.0 starting with version 19.0.0, urging users to upgrade to a newer version."],["Resource names are unique identifiers for entities in the Google Ads API, following a predictable format based on the entity's components."],["You can easily construct resource names using the `ResourceNames` class if you know the necessary IDs, such as customer and campaign IDs."]]],[]]