Replace all existing service perimeters in an access policy with the service perimeters provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. Replacements containing errors result in an error response for the first error encountered. Upon an error, replacement are cancelled and existing service perimeters are not affected. The Operation.response field contains ReplaceServicePerimetersResponse.
HTTP request
POST https://accesscontextmanager.googleapis.com/v1alpha/{parent=accessPolicies/*}/servicePerimeters:replaceAll
Optional. The etag for the version of the Access Policy that this replace operation is to be performed on. If, at the time of replace, the etag for the Access Policy stored in Access Context Manager is different from the specified etag, then the replace operation will not be performed and the call will fail. This field is not required. If etag is not provided, the operation will be performed as if a valid etag is provided.
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-17 UTC."],[[["\u003cp\u003eThis webpage details how to replace all existing service perimeters within an access policy using the \u003ccode\u003ereplaceAll\u003c/code\u003e method, which is an atomic operation ensuring data consistency.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses a \u003ccode\u003ePOST\u003c/code\u003e method with a specific URL structure: \u003ccode\u003ehttps://accesscontextmanager.googleapis.com/v1alpha/{parent=accessPolicies/*}/servicePerimeters:replaceAll\u003c/code\u003e, where \u003ccode\u003eparent\u003c/code\u003e specifies the access policy.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a JSON object that contains an array of desired \u003ccode\u003eservicePerimeters\u003c/code\u003e and an optional \u003ccode\u003eetag\u003c/code\u003e to ensure the replace operation is performed on the correct version of the access policy.\u003c/p\u003e\n"],["\u003cp\u003eThe operation will be cancelled and an error will be returned if there is any issue in replacing the service perimeter, in which case there will be no impact on any existing perimeters.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful operations will return an \u003ccode\u003eOperation\u003c/code\u003e object, and this method requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: accessPolicies.servicePerimeters.replaceAll\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReplace all existing [service perimeters](/access-context-manager/docs/reference/rest/v1alpha/accessPolicies.servicePerimeters#ServicePerimeter) in an [access policy](/access-context-manager/docs/reference/rest/v1alpha/accessPolicies#AccessPolicy) with the [service perimeters](/access-context-manager/docs/reference/rest/v1alpha/accessPolicies.servicePerimeters#ServicePerimeter) provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. Replacements containing errors result in an error response for the first error encountered. Upon an error, replacement are cancelled and existing [service perimeters](/access-context-manager/docs/reference/rest/v1alpha/accessPolicies.servicePerimeters#ServicePerimeter) are not affected. The Operation.response field contains ReplaceServicePerimetersResponse.\n\n### HTTP request\n\n`POST https://accesscontextmanager.googleapis.com/v1alpha/{parent=accessPolicies/*}/servicePerimeters:replaceAll`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/access-context-manager/docs/reference/rest/Shared.Types/Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]