This method returns a Long Running Operation (LRO) indicating if the Promote is done. Use [Operations.GetOperation] to poll the LRO until it is done. Only a done status is returned in the response. See the status in the Campaign Draft resource to determine if the promotion was successful. If the LRO failed, use CampaignDraftService.ListCampaignDraftAsyncErrors to view the list of error reasons.

CampaignExperimentService

CampaignExperimentService manages the life cycle of campaign experiments. It is used to create new experiments from drafts, modify experiment properties, promote changes in an experiment back to its base campaign, graduate experiments into new stand-alone campaigns, and to remove an experiment.

An experiment consists of two variants or arms - the base campaign and the experiment campaign, directing a fixed share of traffic to each arm. A campaign experiment is created from a draft of changes to the base campaign and will be a snapshot of changes in the draft at the time of creation.

Creates a campaign experiment based on a campaign draft. The draft campaign will be forked into a real campaign (called the experiment campaign) that will begin serving ads if successfully created.

The campaign experiment is created immediately with status INITIALIZING. This method return a long running operation that tracks the forking of the draft campaign. If the forking fails, a list of errors can be retrieved using the ListCampaignExperimentAsyncErrors method. The operation's metadata will be a StringValue containing the resource name of the created campaign experiment.

Promotes the changes in a experiment campaign back to the base campaign.

The campaign experiment is updated immediately with status PROMOTING. This method return a long running operation that tracks the promoting of the experiment campaign. If the promoting fails, a list of errors can be retrieved using the ListCampaignExperimentAsyncErrors method.

GoogleAdsService

Creates, updates, or removes resources. This method supports atomic transactions with multiple types of resources. For example, you can atomically create a campaign and a campaign budget, or perform up to thousands of mutates atomically.

This method is essentially a wrapper around a series of mutate methods. The only features it offers over calling those methods directly are:

Atomic transactions

Temp resource names (described below)

Somewhat reduced latency over making a series of mutate calls

Note: Only resources that support atomic transactions are included, so this method can't replace all calls to individual services.

Atomicity makes error handling much easier. If you're making a series of changes and one fails, it can leave your account in an inconsistent state. With atomicity, you either reach the desired state directly, or the request fails and you can retry.

Temp resource names are a special type of resource name used to create a resource and reference that resource in the same request. For example, if a campaign budget is created with resource_name equal to customers/123/campaignBudgets/-1, that resource name can be reused in the Campaign.budget field in the same request. That way, the two resources are created and linked atomically.

To create a temp resource name, put a negative number in the part of the name that the server would normally allocate.

Note:

Resources must be created with a temp name before the name can be reused. For example, the previous CampaignBudget+Campaign example would fail if the mutate order was reversed.

Temp names are not remembered across requests.

There's no limit to the number of temp names in a request.

Each temp name must use a unique negative number, even if the resource types differ.

It's important to group mutates by resource type or the request may time out and fail. Latency is roughly equal to a series of calls to individual mutate methods, where each change in resource type is a new call. For example, mutating 10 campaigns then 10 ad groups is like 2 calls, while mutating 1 campaign, 1 ad group, 1 campaign, 1 ad group is like 4 calls.

The Operation.metadata field type is MutateJobMetadata. When finished, the long running operation will not contain errors or a response. Instead, use ListMutateJobResults to get the results of the job.

ReachPlanService

Reach Plan Service gives users information about audience size that can be reached through advertisement on YouTube. In particular, GenerateReachForecast provides estimated number of people of specified demographics that can be reached by an ad in a given market by a campaign of certain duration with a defined budget.

AccountBudgetProposalOperation

FieldMask that determines which budget fields are modified. While budgets may be modified, proposals that propose such modifications are final. Therefore, update operations are not supported for proposals.

Proposals that modify budgets have the 'update' proposal type. Specifying a mask for any other proposal type is considered an error.

Union field operation. The mutate operation. operation can be only one of the following:

Create operation: A new proposal to create a new budget, edit an existing budget, end an actively running budget, or remove an approved budget scheduled to start in the future. No resource name is expected for the new proposal.

remove

string

Remove operation: A resource name for the removed proposal is expected, in this format:

customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id} A request may be cancelled iff it is pending.

AdGroupAdLabelOperation

A single operation (create, remove) on an ad group ad label.

Fields

Union field operation. The mutate operation. operation can be only one of the following:

The list of policy violation keys that should not cause a PolicyViolationError to be reported. Not all policy violations are exemptable, please refer to the is_exemptible field in the returned PolicyViolationError.

Resources violating these polices will be saved, but will not be eligible to serve. They may begin serving at a later time due to a change in policies, re-review of the resource, or a change in advertiser certificates.

Union field operation. The mutate operation. operation can be only one of the following:

AddMutateJobOperationsRequest

The first AddMutateJobOperations request for a MutateJob should not set sequence_token. Subsequent requests must set sequence_token to the value of next_sequence_token received in the previous AddMutateJobOperations response.

Operations can use negative integers as temp ids to signify dependencies between entities created in this MutateJob. For example, a customer with id = 1234 can create a campaign and an ad group in that same campaign by creating a campaign in the first operation with the resource name explicitly set to "customers/1234/campaigns/-1", and creating an ad group in the second operation with the campaign field also set to "customers/1234/campaigns/-1".

AddMutateJobOperationsResponse

The sequence token to be used when calling AddMutateJobOperations again if more operations need to be added. The next AddMutateJobOperations request must set the sequence_token field to the value of this field.

ApplyRecommendationOperation

Information about the operation to apply a recommendation and any parameters to customize it.

Fields

resource_name

string

The resource name of the recommendation to apply.

Union field apply_parameters. Parameters to use when applying the recommendation. apply_parameters can be only one of the following:

ApplyRecommendationRequest

The list of operations to apply recommendations. If partial_failure=false all recommendations should be of the same type There is a limit of 100 operations per request.

partial_failure

bool

If true, successful operations will be carried out and invalid operations will return errors. If false, operations will be carried out as a transaction if and only if they are all valid. Default is false.

ApplyRecommendationResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors) we return the RPC level error.

ApplyRecommendationResult

The result of applying a recommendation.

Fields

resource_name

string

Returned for successful applies.

AssetOperation

A single operation to create an asset. Supported asset types are YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be created with Ad inline.

Creates a billing setup. No resource name is expected for the new billing setup.

remove

string

Resource name of the billing setup to remove. A setup cannot be removed unless it is in a pending state or its scheduled start time is in the future. The resource name looks like customers/{customer_id}/billingSetups/{billing_id}.

Resource name of the conversion action associated with this conversion. Note: Although this resource name consists of a customer id and a conversion action id, validation will ignore the customer id and use the conversion action id as the sole identifier of the conversion action.

ClickConversion

Resource name of the conversion action associated with this conversion. Note: Although this resource name consists of a customer id and a conversion action id, validation will ignore the customer id and use the conversion action id as the sole identifier of the conversion action.

ConversionAdjustment

Resource name of the conversion action associated with this conversion adjustment. Note: Although this resource name consists of a customer id and a conversion action id, validation will ignore the customer id and use the conversion action id as the sole identifier of the conversion action.

DismissRecommendationRequest

The list of operations to dismiss recommendations. If partial_failure=false all recommendations should be of the same type There is a limit of 100 operations per request.

partial_failure

bool

If true, successful operations will be carried out and invalid operations will return errors. If false, operations will be carried in a single transaction if and only if they are all valid. Default is false.

DismissRecommendationOperation

Operation to dismiss a single recommendation identified by resource_name.

Fields

resource_name

string

The resource name of the recommendation to dismiss.

DismissRecommendationResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors) we return the RPC level error.

GenerateKeywordIdeaResult

Text of the keyword idea. As in Keyword Plan historical metrics, this text may not be an actual keyword, but the canonical form of multiple keywords. See KeywordPlanKeywordHistoricalMetrics message in KeywordPlanService.

Desired cookie frequency cap that will be applied to each planned product. This is equivalent to the frequency cap exposed in Google Ads when creating a campaign, it represents the maximum number of times an ad can be shown to the same user. If not specified no cap is applied.

Desired minimum effective frequency (the number of times a person was exposed to the ad) for the reported reach metrics [1-10]. This won't affect the targeting, but just the reporting. If not specified, a default of 1 is applied.

GeoTargetConstantSuggestion

The language this GeoTargetConstantSuggestion is currently translated to. It affects the name of geo target fields. For example, if locale=en, then name=Spain. If locale=es, then name=España. The default locale will be returned if no translation exists for the locale in the request.

KeywordPlanKeywordHistoricalMetrics

The text of the query associated with one or more ad_group_keywords in the plan.

Note that we de-dupe your keywords list, eliminating close variants before returning the plan's keywords as text. For example, if your plan originally contained the keywords 'car' and 'cars', the returned search query will only contain 'car'.

ListCampaignDraftAsyncErrorsRequest

The name of the campaign draft from which to retrieve the async errors.

page_token

string

Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from next_page_token in the previous response in order to request the next page of results.

page_size

int32

Number of elements to retrieve in a single page. When a page request is too large, the server may decide to further limit the number of returned resources.

ListCampaignExperimentAsyncErrorsRequest

The name of the campaign experiment from which to retrieve the async errors.

page_token

string

Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from next_page_token in the previous response in order to request the next page of results.

page_size

int32

Number of elements to retrieve in a single page. When a page request is too large, the server may decide to further limit the number of returned resources.

ListMutateJobResultsRequest

Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from next_page_token in the previous response in order to request the next page of results.

page_size

int32

Number of elements to retrieve in a single page. When a page request is too large, the server may decide to further limit the number of returned resources.

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validate_only

bool

If true, the request is validated but not executed. Only errors are returned, not results.

MutateAdGroupAdLabelsResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors), we return an RPC level error.

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validate_only

bool

If true, the request is validated but not executed. Only errors are returned, not results.

MutateAdGroupAdsResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors), we return an RPC level error.

The list of operations to perform on individual ad group bid modifiers.

partial_failure

bool

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validate_only

bool

If true, the request is validated but not executed. Only errors are returned, not results.

MutateAdGroupBidModifiersResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors), we return an RPC level error.

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validate_only

bool

If true, the request is validated but not executed. Only errors are returned, not results.

MutateAdGroupCriteriaResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors), we return an RPC level error.

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validate_only

bool

If true, the request is validated but not executed. Only errors are returned, not results.

MutateAdGroupCriterionLabelsResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors), we return an RPC level error.

The list of operations to perform on individual ad group extension settings.

partial_failure

bool

If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.

validate_only

bool

If true, the request is validated but not executed. Only errors are returned, not results.

MutateAdGroupExtensionSettingsResponse

Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (e.g. auth errors), we return an RPC level error.