Google Cloud Identity and Access Management (IAM) v1 API - Class IAMPolicy.IAMPolicyBase (3.1.0)

[BindServiceMethod(typeof(IAMPolicy), "BindService")]
public abstract class IAMPolicy.IAMPolicyBase

Reference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v1 API class IAMPolicy.IAMPolicyBase.

Base class for server-side implementations of IAMPolicy

Inheritance

object > IAMPolicy.IAMPolicyBase

Namespace

Google.Cloud.Iam.V1

Assembly

Google.Cloud.Iam.V1.dll

Methods

GetIamPolicy(GetIamPolicyRequest, ServerCallContext)

public virtual Task<Policy> GetIamPolicy(GetIamPolicyRequest request, ServerCallContext context)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskPolicy

The response to send back to the client (wrapped by a task).

SetIamPolicy(SetIamPolicyRequest, ServerCallContext)

public virtual Task<Policy> SetIamPolicy(SetIamPolicyRequest request, ServerCallContext context)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
NameDescription
requestSetIamPolicyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskPolicy

The response to send back to the client (wrapped by a task).

TestIamPermissions(TestIamPermissionsRequest, ServerCallContext)

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.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskTestIamPermissionsResponse

The response to send back to the client (wrapped by a task).