리소스 이름
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google Ads API에 있는 항목의 고유 식별자를 리소스라고 합니다.
예측 가능한 형식의 문자열로 표현됩니다. 알고 있는 경우
구성 요소인 경우 이 유틸리티를 사용하여
최종 리소스 이름을 생성합니다
ResourceNames 클래스
ResourceNames
클래스는 항목의 리소스 이름을 구성하는 방법입니다.
해당 항목과 관련된 모든 ID를 알고 있는 경우 예를 들어
캠페인 리소스 이름의 형식은 다음과 같습니다.
customers/{customer_id}/campaigns/{campaign_id}
따라서 고객 ID와 캠페인 ID를 알고 있다면
ResourceNames
클래스는 다음과 같이 전체 리소스 이름을 구성합니다.
String campaignResourceName = ResourceNames.campaign(customerId, campaignId);
다음에 따라 다른 ID를 사용하는 다른 항목 이름도 사용할 수 있습니다.
리소스 이름의 최종 형태입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-21(UTC)
[null,null,["최종 업데이트: 2025-08-21(UTC)"],[[["\u003cp\u003eThe Google Ads API uses unique identifiers called resource names to represent entities.\u003c/p\u003e\n"],["\u003cp\u003eResource names follow a predictable format and can be generated using their components.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eResourceNames\u003c/code\u003e class allows you to construct a resource name using relevant IDs, such as customer ID and campaign ID.\u003c/p\u003e\n"],["\u003cp\u003eUsing entity names like \u003ccode\u003ecampaign\u003c/code\u003e with appropriate IDs in the \u003ccode\u003eResourceNames\u003c/code\u003e class generates the full resource name string.\u003c/p\u003e\n"]]],[],null,["# Resource Names\n\nThe unique identifier for an entity in the Google Ads API is called a resource\nname, and is represented as a string with a predictable format. If you know\nthe constituent components of a resource name, you can use this utility to\ngenerate the final resource name.\n\nResourceNames class\n-------------------\n\nThe `ResourceNames` class is a way to construct the resource name of an entity\nif you know all of the relevant IDs related to that entity. For example, a\ncampaign resource name is in the format: \n\n customers/{customer_id}/campaigns/{campaign_id}\n\nSo if you know the customer ID and the campaign ID, you can use the\n`ResourceNames` class construct the full resource name as follows: \n\n String campaignResourceName = ResourceNames.campaign(customerId, campaignId);\n\nYou can use other entity names as well, which take different IDs depending on\nthe final form of the resource name."]]