Kaynak Hizmeti Değişimleri
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir kaynağın bireysel hizmetini kullanmak, kaynağı değiştirmenin en basit ancak en az esnek yoludur.
Uç noktaları değiştirme
Değişiklik yapmanın en basit yolu kaynağa özgü bir hizmet kullanmaktır.
Değiştirilebilir her kaynağın karşılık gelen bir hizmeti ve kaynağı oluşturmanıza, güncellemenize veya kaldırmanıza olanak tanıyan bir dizi işlemi vardır.
Yeni bir Campaign
oluşturmak istediğinizi varsayalım.
Yeni bir Campaign
nesnesi oluşturup bunu bir CampaignOperation
içine yerleştirir ve ardından CampaignService.MutateCampaigns
uç noktasına gönderirsiniz.
Bunu Google Ads API hizmetlerinin herhangi biri için yapabilirsiniz. Örneğin, bir AdGroup
öğesini değiştirmek istiyorsanız değiştirilmiş AdGroup
öğesini içeren bir AdGroupOperation
öğesini AdGroupService.MutateAdGroups
uç noktasına iletirsiniz.
Benzer şekilde, bir CampaignCriterion
öğesini değiştirmek istiyorsanız CampaignCriterionOperation
öğesini kullanıp CampaignCriterionService.MutateCampaignCriteria
uç noktasına gönderirsiniz.
İsteğin operations
alanı tekrarlanabildiğinden tek bir değiştirme isteği birden fazla işlem içerebilir. Ancak her işlem diğerlerinden bağımsız olarak değerlendirildiğinden çapraz referans verilmesine izin verilmez.
Bu, aynı istekteki işlemlerin diğer işlemlerden gelen öğelere referans verebildiği toplu değiştirme yönteminin (GoogleAdsService.Mutate
) aksinedir.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-27 UTC.
[null,null,["Son güncelleme tarihi: 2025-08-27 UTC."],[[["\u003cp\u003eThe most straightforward way to mutate a resource is by using its individual service and corresponding operations (create, update, or remove).\u003c/p\u003e\n"],["\u003cp\u003eEach mutable resource has a dedicated service with specific endpoints for mutation, like \u003ccode\u003eCampaignService.MutateCampaigns\u003c/code\u003e for \u003ccode\u003eCampaign\u003c/code\u003e resources.\u003c/p\u003e\n"],["\u003cp\u003eA single mutate request to a resource-specific service can handle multiple operations, but each operation is treated independently.\u003c/p\u003e\n"],["\u003cp\u003eResource-specific mutation differs from bulk mutation (\u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e) where operations can cross-reference each other within the same request.\u003c/p\u003e\n"]]],[],null,["# Resource Service Mutates\n\nUsing a resource's individual service is the most straightforward way to mutate\nit, but also the least flexible.\n\nMutate Endpoints\n----------------\n\nUsing a resource-specific service is the most straightforward way to mutate.\nEach mutable resource has a corresponding service and a set of operations that\nenable you to create, update, or remove the resource.\n\nSuppose you want to create a new [`Campaign`](/google-ads/api/reference/rpc/v21/Campaign).\nYou would create a new [`Campaign`](/google-ads/api/reference/rpc/v21/Campaign)\nobject, put it inside a [`CampaignOperation`](/google-ads/api/reference/rpc/v21/CampaignOperation),\nand then send it to the\n[`CampaignService.MutateCampaigns`](/google-ads/api/reference/rpc/v21/CampaignService/MutateCampaigns)\nendpoint.\n\nYou can do this for any of the Google Ads API services. So for example, if you wanted\nto mutate an [`AdGroup`](/google-ads/api/reference/rpc/v21/AdGroup), you would pass an\n[`AdGroupOperation`](/google-ads/api/reference/rpc/v21/AdGroupOperation) containing the\nmutated [`AdGroup`](/google-ads/api/reference/rpc/v21/AdGroup) to the\n[`AdGroupService.MutateAdGroups`](/google-ads/api/reference/rpc/v21/AdGroupService/MutateAdGroups) endpoint.\n\nSimilarly, if you want to modify a [`CampaignCriterion`](/google-ads/api/reference/rpc/v21/CampaignCriterion), you would use a\n[`CampaignCriterionOperation`](/google-ads/api/reference/rpc/v21/CampaignCriterionOperation) and send it to the\n[`CampaignCriterionService.MutateCampaignCriteria`](/google-ads/api/reference/rpc/v21/CampaignCriterionService/MutateCampaignCriteria) endpoint.\n\nSince the `operations` field of the request can be repeated, a single mutate\nrequest can contain multiple operations. However, each operation is treated\nindependently from all others, so no cross-referencing is allowed.\n\nThis is in contrast to the bulk mutate method\n([`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate)),\nwhere operations within the same request can reference entities from other\noperations."]]