Resource Names

A resource name is the unique identifier for an entity in the Google Ads API and is represented as a string with a predictable format.

ResourceNames class

The ResourceNames is a utility class that provides a way to construct the resource name of an entity if you know all of the relevant IDs related to that entity. For example, a campaign resource name is in the format customers/{customer_id}/campaigns/{campaign_id}, so if you know the customer ID and the campaign ID, you can use the ResourceNames class construct the full resource name as follows:

string campaignResourceName = ResourceNames.Campaign(customerId, campaignId),

You can use other entity names as well, which take different IDs depending on the final form of the resource name.