有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
资源名称
通过
ResourceNames
如果您知道
与该实体相关的 ID。例如,广告系列资源名称
格式为 customers/<CUSTOMER_ID>/campaigns/<CAMPAIGN_ID>
,因此如果您
知道客户 ID 和广告系列 ID,则可以使用 ResourceNames
实用程序构造完整资源名称。
假设 $customerId
包含您的客户 ID,$campaignId
包含
广告系列 ID,您可以使用
forCampaign
来获取广告系列的资源名称,如下所示:
$campaignResourceName = ResourceNames::forCampaign($customerId, $campaignId)
每个实体都有一组不同的 ID,这些 ID 构成了资源名称。对于
例如,广告组条件的资源名称需要包含客户 ID、广告
广告组 ID 和广告组条件 ID。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-20。
[null,null,["最后更新时间 (UTC):2024-08-20。"],[[["The `ResourceNames` utility helps build resource names for Google Ads entities using their respective IDs."],["You need to provide the necessary IDs, like customer ID and campaign ID, to construct a specific resource name."],["Each Google Ads entity type has a unique set of IDs required for its resource name, such as ad group criteria needing customer ID, ad group ID, and criterion ID."],["`ResourceNames` offers functions like `forCampaign` to easily generate resource names for specific entities."]]],[]]