संसाधन के नाम
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ResourceNames टूल की मदद से, किसी इकाई का संसाधन नाम बनाया जा सकता है. इसके लिए, इकाई से जुड़े सभी ज़रूरी आईडी की जानकारी होनी चाहिए. उदाहरण के लिए, कैंपेन रिसॉर्स का नाम customers/<CUSTOMER_ID>/campaigns/<CAMPAIGN_ID>
फ़ॉर्मैट में होता है. इसलिए, अगर आपको ग्राहक आईडी और कैंपेन आईडी पता है, तो ResourceNames
टूल का इस्तेमाल करके रिसॉर्स का पूरा नाम बनाया जा सकता है.
अगर $customerId
में आपका ग्राहक आईडी और $campaignId
में आपका कैंपेन आईडी है, तो कैंपेन का रिसॉर्स नाम पाने के लिए, forCampaign का इस्तेमाल किया जा सकता है. इसके लिए, नीचे दिया गया तरीका अपनाएं:
$campaignResourceName = ResourceNames::forCampaign($customerId, $campaignId)
हर इकाई के पास आईडी का एक अलग सेट होता है, जो रिसॉर्स का नाम बनाता है. उदाहरण के लिए, विज्ञापन ग्रुप के लिए तय की गई शर्त के रिसॉर्स के नाम में ग्राहक आईडी, विज्ञापन ग्रुप आईडी, और विज्ञापन ग्रुप के लिए तय की गई शर्त का आईडी होना चाहिए.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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."]]