리소스 이름
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
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가 필요합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[null,null,["최종 업데이트: 2025-08-27(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eResourceNames\u003c/code\u003e utility helps build resource names for Google Ads entities using their respective IDs.\u003c/p\u003e\n"],["\u003cp\u003eYou need to provide the necessary IDs, like customer ID and campaign ID, to construct a specific resource name.\u003c/p\u003e\n"],["\u003cp\u003eEach 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.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eResourceNames\u003c/code\u003e offers functions like \u003ccode\u003eforCampaign\u003c/code\u003e to easily generate resource names for specific entities.\u003c/p\u003e\n"]]],[],null,["# Resource Names\n\nThe\n[ResourceNames](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Util/V21/ResourceNames.php)\nutility is a way to construct the resource name of an entity if you know all of\nthe relevant IDs related to that entity. For example, a campaign resource name\nis in the format `customers/\u003cCUSTOMER_ID\u003e/campaigns/\u003cCAMPAIGN_ID\u003e`, so if you\nknow the customer ID and the campaign ID, you can use the `ResourceNames`\nutility to construct the full resource name.\n\nProvided that `$customerId` contains your customer ID and `$campaignId` contains\nyour campaign ID, you can use\n[forCampaign](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Util/V21/ResourceNames.php#L141)\nto get the resource name of the campaign as shown below: \n\n $campaignResourceName = ResourceNames::forCampaign($customerId, $campaignId)\n\nEach entity has a different set of IDs that composes the resource name. For\ninstance, the resource name of an ad group criterion needs a customer ID, ad\ngroup ID, and ad group criterion ID."]]