public sealed class ReplaceAccessLevelsRequest : IMessage<ReplaceAccessLevelsRequest>, IEquatable<ReplaceAccessLevelsRequest>, IDeepCloneable<ReplaceAccessLevelsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Identity Access Context Manager v1 API class ReplaceAccessLevelsRequest.
A request to replace all existing Access Levels in an Access Policy with
the Access Levels provided. This is done atomically.
public RepeatedField<AccessLevel> AccessLevels { get; }
Required. The desired [Access Levels]
[google.identity.accesscontextmanager.v1.AccessLevel] that should
replace all existing [Access Levels]
[google.identity.accesscontextmanager.v1.AccessLevel] in the
[Access Policy]
[google.identity.accesscontextmanager.v1.AccessPolicy].
Optional. The etag for the version of the [Access Policy]
[google.identity.accesscontextmanager.v1.AccessPolicy] 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.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eReplaceAccessLevelsRequest\u003c/code\u003e class is used to atomically replace all existing Access Levels within an Access Policy.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the Google Identity Access Context Manager v1 API and is found in the \u003ccode\u003eGoogle.Identity.AccessContextManager.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this documentation is for version 2.5.0, with older versions ranging from 2.4.0 down to 1.2.0 available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReplaceAccessLevelsRequest\u003c/code\u003e class requires a parent resource name and allows for specifying the desired Access Levels and an optional etag for conditional updates.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces.\u003c/p\u003e\n"]]],[],null,["# Identity Access Context Manager v1 API - Class ReplaceAccessLevelsRequest (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.4.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.3.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.2.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.1.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.0.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.5.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.4.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.3.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.2.0/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest) \n\n public sealed class ReplaceAccessLevelsRequest : IMessage\u003cReplaceAccessLevelsRequest\u003e, IEquatable\u003cReplaceAccessLevelsRequest\u003e, IDeepCloneable\u003cReplaceAccessLevelsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Identity Access Context Manager v1 API class ReplaceAccessLevelsRequest.\n\nA request to replace all existing Access Levels in an Access Policy with\nthe Access Levels provided. This is done atomically. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ReplaceAccessLevelsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ReplaceAccessLevelsRequest](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ReplaceAccessLevelsRequest](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ReplaceAccessLevelsRequest](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Identity.AccessContextManager.V1](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1)\n\nAssembly\n--------\n\nGoogle.Identity.AccessContextManager.V1.dll\n\nConstructors\n------------\n\n### ReplaceAccessLevelsRequest()\n\n public ReplaceAccessLevelsRequest()\n\n### ReplaceAccessLevelsRequest(ReplaceAccessLevelsRequest)\n\n public ReplaceAccessLevelsRequest(ReplaceAccessLevelsRequest other)\n\nProperties\n----------\n\n### AccessLevels\n\n public RepeatedField\u003cAccessLevel\u003e AccessLevels { get; }\n\nRequired. The desired \\[Access Levels\\]\n\\[google.identity.accesscontextmanager.v1.AccessLevel\\] that should\nreplace all existing \\[Access Levels\\]\n\\[google.identity.accesscontextmanager.v1.AccessLevel\\] in the\n\\[Access Policy\\]\n\\[google.identity.accesscontextmanager.v1.AccessPolicy\\].\n\n### Etag\n\n public string Etag { get; set; }\n\nOptional. The etag for the version of the \\[Access Policy\\]\n\\[google.identity.accesscontextmanager.v1.AccessPolicy\\] that this\nreplace operation is to be performed on. If, at the time of replace, the\netag for the Access Policy stored in Access Context Manager is different\nfrom the specified etag, then the replace operation will not be performed\nand the call will fail. This field is not required. If etag is not\nprovided, the operation will be performed as if a valid etag is provided.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. Resource name for the access policy which owns these\n\\[Access Levels\\]\n\\[google.identity.accesscontextmanager.v1.AccessLevel\\].\n\nFormat: `accessPolicies/{policy_id}`\n\n### ParentAsAccessPolicyName\n\n public AccessPolicyName ParentAsAccessPolicyName { get; set; }\n\n[AccessPolicyName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.AccessPolicyName)-typed view over the [Parent](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ReplaceAccessLevelsRequest#Google_Identity_AccessContextManager_V1_ReplaceAccessLevelsRequest_Parent) resource name property."]]