리소스 서비스 변형
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
리소스의 개별 서비스를 사용하는 것이 리소스를 변경하는 가장 간단한 방법이지만 유연성은 가장 낮습니다.
엔드포인트 변경
리소스별 서비스를 사용하는 것이 가장 간단한 변이 방법입니다.
각 변경 가능한 리소스에는 리소스를 생성, 업데이트 또는 삭제할 수 있는 해당 서비스와 작업 집합이 있습니다.
새 Campaign
를 만들려고 한다고 가정해 보겠습니다.
새 Campaign
객체를 만들고 CampaignOperation
내부에 넣은 다음 CampaignService.MutateCampaigns
엔드포인트로 전송합니다.
Google Ads API 서비스에 대해 이 작업을 수행할 수 있습니다. 예를 들어 AdGroup
을 변경하려면 변경된 AdGroup
이 포함된 AdGroupOperation
을 AdGroupService.MutateAdGroups
엔드포인트에 전달합니다.
마찬가지로 CampaignCriterion
를 수정하려면 CampaignCriterionOperation
를 사용하여 CampaignCriterionService.MutateCampaignCriteria
엔드포인트로 전송합니다.
요청의 operations
필드는 반복될 수 있으므로 단일 변이 요청에 여러 작업이 포함될 수 있습니다. 하지만 각 작업은 다른 모든 작업과 독립적으로 처리되므로 상호 참조는 허용되지 않습니다.
이는 동일한 요청 내의 작업이 다른 작업의 항목을 참조할 수 있는 일괄 변이 메서드(GoogleAdsService.Mutate
)와는 대조적입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-05(UTC)
[null,null,["최종 업데이트: 2025-09-05(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."]]