Class PoliciesGrpc.PoliciesStub (1.32.1)

public static final class PoliciesGrpc.PoliciesStub extends AbstractAsyncStub<PoliciesGrpc.PoliciesStub>

A stub to allow clients to do asynchronous rpc calls to service Policies.

An interface for managing Identity and Access Management (IAM) policies.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractAsyncStub > PoliciesGrpc.PoliciesStub

Methods

build(Channel channel, CallOptions callOptions)

protected PoliciesGrpc.PoliciesStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
PoliciesGrpc.PoliciesStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createPolicy(CreatePolicyRequest request, StreamObserver<Operation> responseObserver)

public void createPolicy(CreatePolicyRequest request, StreamObserver<Operation> responseObserver)

Creates a policy.

Parameters
NameDescription
requestCreatePolicyRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

deletePolicy(DeletePolicyRequest request, StreamObserver<Operation> responseObserver)

public void deletePolicy(DeletePolicyRequest request, StreamObserver<Operation> responseObserver)

Deletes a policy. This action is permanent.

Parameters
NameDescription
requestDeletePolicyRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

getPolicy(GetPolicyRequest request, StreamObserver<Policy> responseObserver)

public void getPolicy(GetPolicyRequest request, StreamObserver<Policy> responseObserver)

Gets a policy.

Parameters
NameDescription
requestGetPolicyRequest
responseObserverio.grpc.stub.StreamObserver<Policy>

listPolicies(ListPoliciesRequest request, StreamObserver<ListPoliciesResponse> responseObserver)

public void listPolicies(ListPoliciesRequest request, StreamObserver<ListPoliciesResponse> responseObserver)

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
responseObserverio.grpc.stub.StreamObserver<ListPoliciesResponse>

updatePolicy(UpdatePolicyRequest request, StreamObserver<Operation> responseObserver)

public void updatePolicy(UpdatePolicyRequest request, StreamObserver<Operation> responseObserver)

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 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
responseObserverio.grpc.stub.StreamObserver<Operation>