Hi!
I have problem with update 'search' campaign bidding strategy...

*This example working fine* (no errors in log)
------------
campaign_operation = client.get_type("CampaignOperation", version="v6")
bidding_strategy_type_enum = client.get_type("BiddingStrategyTypeEnum", 
version="v6")
target_impression_share_location_enum = client.get_type(
"TargetImpressionShareLocationEnum", version="v6")

campaign = campaign_operation.update
campaign.resource_name = campaign_service.campaign_path(customer_id, 
campaign_id)

campaign.bidding_strategy_type = 
bidding_strategy_type_enum.TARGET_IMPRESSION_SHARE
campaign.target_impression_share.location = 
target_impression_share_location_enum.ABSOLUTE_TOP_OF_PAGE
campaign.target_impression_share.location_fraction_micros = 110000
campaign.target_impression_share.cpc_bid_ceiling_micros = 600000

fm = protobuf_helpers.field_mask(None, campaign)
campaign_operation.update_mask.CopyFrom(fm)
------------

*But this second example has no effect *(no errors in log)
------------
campaign_operation = client.get_type("CampaignOperation", version="v6")
bidding_strategy_type_enum = client.get_type("BiddingStrategyTypeEnum", 
version="v6")

campaign = campaign_operation.update
campaign.resource_name = campaign_service.campaign_path(customer_id, 
campaign_id)

campaign.bidding_strategy_type = 
bidding_strategy_type_enum.MAXIMIZE_CONVERSIONS

fm = protobuf_helpers.field_mask(None, campaign)
campaign_operation.update_mask.CopyFrom(fm)
------------

Maybe need more parameters for second example?
Debug log is attached.
Thank you in advance!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6b4f4a96-30bd-4439-bdb4-cb55aeb30119n%40googlegroups.com.
[2021-03-06 21:09:02,385 - DEBUG] Request
-------
Method: /google.ads.googleads.v6.services.BatchJobService/MutateBatchJob
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0 gapic/8.2.0",
  "x-goog-request-params": "customer_id=*************"
}
Request: customer_id: "*************"
operation {
  create {
  }
}
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "sEnvQk7RF8l-dxSFac5RnQ"
}
Response: result {
  resource_name: "customers/*************/batchJobs/4502145436"
}
[2021-03-06 21:09:02,386 - INFO] Request made: ClientCustomerId: *************, 
Host: googleads.googleapis.com:443, Method: 
/google.ads.googleads.v6.services.BatchJobService/MutateBatchJob, RequestId: 
sEnvQk7RF8l-dxSFac5RnQ, IsFault: False, FaultMessage: None

[2021-03-06 21:09:02,825 - DEBUG] Request
-------
Method: /google.ads.googleads.v6.services.BatchJobService/AddBatchJobOperations
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0 gapic/8.2.0",
  "x-goog-request-params": 
"resource_name=customers/*************/batchJobs/4502145436"
}
Request: resource_name: "customers/*************/batchJobs/4502145436"
mutate_operations {
  campaign_operation {
    update {
      resource_name: "customers/*************/campaigns/11398098366"
      bidding_strategy_type: MAXIMIZE_CONVERSIONS
    }
    update_mask {
      paths: "resource_name"
      paths: "bidding_strategy_type"
    }
  }
}
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "pd9AD8lbKljm5qHJZVawrQ"
}
Response: total_operations: 1
next_sequence_token: "f0f95291a3846aac685e8257f67b4c9f"
[2021-03-06 21:09:02,825 - INFO] Request made: ClientCustomerId: *************, 
Host: googleads.googleapis.com:443, Method: 
/google.ads.googleads.v6.services.BatchJobService/AddBatchJobOperations, 
RequestId: pd9AD8lbKljm5qHJZVawrQ, IsFault: False, FaultMessage: None

[2021-03-06 21:09:03,643 - DEBUG] Request
-------
Method: /google.ads.googleads.v6.services.BatchJobService/RunBatchJob
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0 gapic/8.2.0",
  "x-goog-request-params": 
"resource_name=customers/*************/batchJobs/4502145436"
}
Request: resource_name: "customers/*************/batchJobs/4502145436"
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "qlcMse-uuGV2RJXI9zd54g"
}
Response: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
metadata {
  
[type.googleapis.com/google.ads.googleads.v6.resources.BatchJob.BatchJobMetadata]
 {
    creation_date_time: "2021-03-06 21:09:02"
    estimated_completion_ratio: 0.0
    operation_count: 1
    executed_operation_count: 0
  }
}
[2021-03-06 21:09:03,644 - INFO] Request made: ClientCustomerId: *************, 
Host: googleads.googleapis.com:443, Method: 
/google.ads.googleads.v6.services.BatchJobService/RunBatchJob, RequestId: 
qlcMse-uuGV2RJXI9zd54g, IsFault: False, FaultMessage: None

[2021-03-06 21:09:04,156 - DEBUG] Request
-------
Method: /google.longrunning.Operations/GetOperation
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0",
  "x-goog-request-params": 
"name=customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
}
Request: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "Xjeasz1pXwGmSz7_nCWkDw"
}
Response: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
metadata {
  
[type.googleapis.com/google.ads.googleads.v6.resources.BatchJob.BatchJobMetadata]
 {
    creation_date_time: "2021-03-06 21:09:02"
    estimated_completion_ratio: 0.0
    operation_count: 1
    executed_operation_count: 0
  }
}
[2021-03-06 21:09:04,156 - INFO] Request made: ClientCustomerId: None, Host: 
googleads.googleapis.com:443, Method: 
/google.longrunning.Operations/GetOperation, RequestId: Xjeasz1pXwGmSz7_nCWkDw, 
IsFault: False, FaultMessage: None
[2021-03-06 21:09:06,335 - DEBUG] Request
-------
Method: /google.longrunning.Operations/GetOperation
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0",
  "x-goog-request-params": 
"name=customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
}
Request: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "me6CFvkdFjA5LcXStQHLEQ"
}
Response: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
metadata {
  
[type.googleapis.com/google.ads.googleads.v6.resources.BatchJob.BatchJobMetadata]
 {
    creation_date_time: "2021-03-06 21:09:02"
    estimated_completion_ratio: 0.0
    operation_count: 1
    executed_operation_count: 0
  }
}
[2021-03-06 21:09:06,335 - INFO] Request made: ClientCustomerId: None, Host: 
googleads.googleapis.com:443, Method: 
/google.longrunning.Operations/GetOperation, RequestId: me6CFvkdFjA5LcXStQHLEQ, 
IsFault: False, FaultMessage: None
[2021-03-06 21:09:09,277 - DEBUG] Request
-------
Method: /google.longrunning.Operations/GetOperation
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0",
  "x-goog-request-params": 
"name=customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
}
Request: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "RttHHlxnnMbUU7LbJKDiGQ"
}
Response: name: 
"customers/*************/operations/CiljdXN0b21lcnMvOTc2NDA3NjM5OC9iYXRjaEpvYnMvNDUwMjE0NTQzNhAG"
metadata {
  
[type.googleapis.com/google.ads.googleads.v6.resources.BatchJob.BatchJobMetadata]
 {
    creation_date_time: "2021-03-06 21:09:02"
    completion_date_time: "2021-03-06 21:09:08"
    estimated_completion_ratio: 1.0
    operation_count: 1
    executed_operation_count: 1
  }
}
done: true
response {
  [type.googleapis.com/google.protobuf.Empty] {
  }
}
[2021-03-06 21:09:09,277 - INFO] Request made: ClientCustomerId: None, Host: 
googleads.googleapis.com:443, Method: 
/google.longrunning.Operations/GetOperation, RequestId: RttHHlxnnMbUU7LbJKDiGQ, 
IsFault: False, FaultMessage: None

[2021-03-06 21:09:09,578 - DEBUG] Request
-------
Method: /google.ads.googleads.v6.services.BatchJobService/ListBatchJobResults
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "*************",
  "x-goog-api-client": "gl-python/3.9.1 grpc/1.35.0 gax/1.26.0 gapic/8.2.0",
  "x-goog-request-params": 
"resource_name=customers/*************/batchJobs/4502145436"
}
Request: resource_name: "customers/*************/batchJobs/4502145436"
page_size: 1000
Response
-------
Headers: {
  "content-disposition": "attachment",
  "request-id": "aEIzoWgQHdro-IiUsrOI7A"
}
Response: results {
  mutate_operation_response {
    campaign_result {
      resource_name: "customers/*************/campaigns/11398098366"
    }
  }
}
----------
[2021-03-06 21:09:09,578 - INFO] Request made: ClientCustomerId: *************, 
Host: googleads.googleapis.com:443, Method: 
/google.ads.googleads.v6.services.BatchJobService/ListBatchJobResults, 
RequestId: aEIzoWgQHdro-IiUsrOI7A, IsFault: False, FaultMessage: None

Reply via email to