public virtual Task<TestIamPermissionsResponse> TestIamPermissions(TestIamPermissionsRequest request, ServerCallContext context)
Returns permissions that a caller has on the specified resource.
If the resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware
UIs and command-line tools, not for authorization checking. This operation
may "fail open" without warning.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eIAMPolicy.IAMPolicyBase\u003c/code\u003e class within the Google Cloud Identity and Access Management (IAM) v1 API, specifically for .NET development.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIAMPolicy.IAMPolicyBase\u003c/code\u003e class serves as the base for server-side implementations of IAM policies, inheriting from the base .NET \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 3.4.0, and older versions back to 2.2.0 are also listed, and the document shows the methods \u003ccode\u003eGetIamPolicy\u003c/code\u003e, \u003ccode\u003eSetIamPolicy\u003c/code\u003e, and \u003ccode\u003eTestIamPermissions\u003c/code\u003e with its parameters and return values.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetIamPolicy\u003c/code\u003e, \u003ccode\u003eSetIamPolicy\u003c/code\u003e, and \u003ccode\u003eTestIamPermissions\u003c/code\u003e methods are all available, which allow for retrieving, setting, and testing the access control policy for resources respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation includes details about request and response types for each method, along with relevant parameters and server-side call context information.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Identity and Access Management (IAM) v1 API - Class IAMPolicy.IAMPolicyBase (3.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/3.3.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/3.2.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/3.1.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/3.0.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/2.4.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/2.3.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Iam.V1/2.2.0/Google.Cloud.Iam.V1.IAMPolicy.IAMPolicyBase) \n\n [BindServiceMethod(typeof(IAMPolicy), \"BindService\")]\n public abstract class IAMPolicy.IAMPolicyBase\n\nReference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v1 API class IAMPolicy.IAMPolicyBase.\n\nBase class for server-side implementations of IAMPolicy \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e IAMPolicy.IAMPolicyBase \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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Iam.V1](/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Iam.V1.dll\n\nMethods\n-------\n\n### GetIamPolicy(GetIamPolicyRequest, ServerCallContext)\n\n public virtual Task\u003cPolicy\u003e GetIamPolicy(GetIamPolicyRequest request, ServerCallContext context)\n\nGets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\n### SetIamPolicy(SetIamPolicyRequest, ServerCallContext)\n\n public virtual Task\u003cPolicy\u003e SetIamPolicy(SetIamPolicyRequest request, ServerCallContext context)\n\nSets the access control policy on the specified resource. Replaces any\nexisting policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.\n\n### TestIamPermissions(TestIamPermissionsRequest, ServerCallContext)\n\n public virtual Task\u003cTestIamPermissionsResponse\u003e TestIamPermissions(TestIamPermissionsRequest request, ServerCallContext context)\n\nReturns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning."]]