Google Cloud Identity and Access Management (IAM) v2 API - Class Policies.PoliciesBase (1.0.0)

[BindServiceMethod(typeof(Policies), "BindService")]
public abstract class Policies.PoliciesBase

Reference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v2 API class Policies.PoliciesBase.

Base class for server-side implementations of Policies

Inheritance

object > Policies.PoliciesBase

Namespace

Google.Cloud.Iam.V2

Assembly

Google.Cloud.Iam.V2.dll

Methods

CreatePolicy(CreatePolicyRequest, ServerCallContext)

public virtual Task<Operation> CreatePolicy(CreatePolicyRequest request, ServerCallContext context)

Creates a policy.

Parameters
NameDescription
requestCreatePolicyRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

DeletePolicy(DeletePolicyRequest, ServerCallContext)

public virtual Task<Operation> DeletePolicy(DeletePolicyRequest request, ServerCallContext context)

Deletes a policy. This action is permanent.

Parameters
NameDescription
requestDeletePolicyRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

GetPolicy(GetPolicyRequest, ServerCallContext)

public virtual Task<Policy> GetPolicy(GetPolicyRequest request, ServerCallContext context)

Gets a policy.

Parameters
NameDescription
requestGetPolicyRequest

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).

ListPolicies(ListPoliciesRequest, ServerCallContext)

public virtual Task<ListPoliciesResponse> ListPolicies(ListPoliciesRequest request, ServerCallContext context)

Retrieves the policies of the specified kind that are attached to a resource.

The response lists only policy metadata. In particular, policy rules are omitted.

Parameters
NameDescription
requestListPoliciesRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListPoliciesResponse

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

UpdatePolicy(UpdatePolicyRequest, ServerCallContext)

public virtual Task<Operation> UpdatePolicy(UpdatePolicyRequest request, ServerCallContext context)

Updates the specified policy.

You can update only the rules and the display name for the policy.

To update a policy, you should use a read-modify-write loop:

  1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
  2. Modify the policy as needed.
  3. Use UpdatePolicy to write the updated policy.

This pattern helps prevent conflicts between concurrent updates.

Parameters
NameDescription
requestUpdatePolicyRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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