أسماء الموارد
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يُعرف المعرّف الفريد للكيان في Google Ads API باسم المورد
ويتم تمثيله كسلسلة بتنسيق يمكن التنبؤ به. إذا كنت تعرف
المكونات الأساسية لاسم المورد، يمكنك استخدام هذه الأداة
لإنشاء اسم المورد النهائي.
فئة ResourceNames
الفئة ResourceNames
هي طريقة لإنشاء اسم المورد لأحد الكيانات.
إذا كنت تعرف جميع أرقام التعريف ذات الصلة بتلك الجهة. على سبيل المثال،
اسم مورد الحملة بالتنسيق التالي:
customers/{customer_id}/campaigns/{campaign_id}
وبالتالي، إذا كنت تعرف الرقم التعريفي للعميل ورقم تعريف الحملة، يمكنك استخدام
وتُنشئ الفئة ResourceNames
اسم المورد الكامل على النحو التالي:
String campaignResourceName = ResourceNames.campaign(customerId, campaignId);
يمكنك أيضًا استخدام أسماء كيانات أخرى، والتي تأخذ أرقام تعريف مختلفة حسب
الشكل النهائي لاسم المورد.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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."]]