What would cause this:

errors { error_code { operation_access_denied_error: 
OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE } message: "This operation is 
not allowed because the resource is removed." trigger { string_value: 
"Campaign" } location { field_path_elements { field_name: "operations" 
index: 13 } } } 

On Wednesday, February 1, 2023 at 2:08:55 PM UTC-8 Chad Wood wrote:

> Guess I was a bit confused. It seems I'd have to recreate the campaign 
> object every time, as the *Operations* object is just a list of *Campaign 
> Operation Object*s. And the *Campaign Object* is just a method of the 
> *Campaign 
> Operation Object*.
>
> I got this working:
>
> operations = []
>
> used_columns = [
>     'campaign.resource_name',
>     'url_custom_parameters'
> ]
>
> for row in df[used_columns].to_dict('records'):
>     # Create campaign operation.
>     campaign_operation = client.get_type("CampaignOperation")
>     campaign = campaign_operation.update
>     
>     # Updates campaign object
>     campaign.resource_name = row['campaign.resource_name']
>     campaign.url_custom_parameters = row['url_custom_parameters']
>     
>     # Grows operations object
>     operations.append(campaign_operation)
>
> On Wednesday, February 1, 2023 at 1:51:51 PM UTC-8 Chad Wood wrote:
>
>> My day just keeps getting better. 10,000 operations per request?
>> Awesome. Thanks again for the help. I'll create a *Campaign Object* and 
>> iterate over-top of it, replacing its *Resource Name*, *Campaign ID*, 
>> and *URL Custom Parameters* within each iteration right before attaching 
>> to the *Campaign Operation Object*. 
>>
>> Once the loop finishes, I'll send it all over with 
>> campaign_service.mutate_campaigns().
>>
>> On Wednesday, February 1, 2023 at 12:32:33 PM UTC-8 adsapi wrote:
>>
>>> Hi Chad,
>>>
>>> Thanks for getting back to us.
>>>
>>> I’m glad to know that you found your answer by checking documents of 
>>> 'update campaign', and your understanding is correct.
>>>
>>> You may use campaign.url_custom_parameters field from the *campaign* 
>>> <https://developers.google.com/google-ads/api/fields/v12/campaign> 
>>> report via the GoogleAdsServiceClient object of *GoogleAdsService* 
>>> <https://developers.google.com/google-ads/api/reference/rpc/v12/GoogleAdsService>.
>>>  
>>> You may use *GoogleAdsService.Search* 
>>> <https://developers.google.com/google-ads/api/reference/rpc/latest/GoogleAdsService#search>
>>>  
>>> or *GoogleAdsService.SearchStream* 
>>> <https://developers.google.com/google-ads/api/reference/rpc/latest/GoogleAdsService#searchstream>
>>>  
>>> to get any report. You may use this *code example* 
>>> <https://developers.google.com/google-ads/api/docs/samples/get-keyword-stats?hl=en>
>>>  
>>> for reporting examples.
>>>
>>> Also, for the best practices on updating campaigns, you may also 
>>> reassign the resource name on campaign object then add it to 
>>> campaign_operation, and then send the request by adding to 
>>> campaign_service.mutate_campaigns(). Also, recreating campaign objects 
>>> every time should work. You should be able to send 10,000 operations per 
>>> request that you want to update campaigns.
>>>
>>> Regards,
>>> [image: Google Logo] 
>>> Yasar 
>>> Google Ads API Team 
>>>   
>>>
>>> ref:_00D1U1174p._5004Q2iNsig:ref
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/563b2fae-f2b7-4143-a10b-4a2963b3160cn%40googlegroups.com.
  • Is... Chad Wood
    • ... Chad Wood
      • ... Chad Wood
        • ... Chad Wood
          • ... Chad Wood
            • ... Chad Wood
              • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
                • ... Chad Wood
                • ... Chad Wood
                • ... Chad Wood
                • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to