[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
Namespace
Google.Cloud.Iam.V2Assembly
Google.Cloud.Iam.V2.dll
Methods
CreatePolicy(CreatePolicyRequest, ServerCallContext)
public virtual Task<Operation> CreatePolicy(CreatePolicyRequest request, ServerCallContext context)
Creates a policy.
Parameters | |
---|---|
Name | Description |
request |
CreatePolicyRequest The request received from the client. |
context |
ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
DeletePolicyRequest The request received from the client. |
context |
ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
GetPolicyRequest The request received from the client. |
context |
ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ListPoliciesRequest The request received from the client. |
context |
ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
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:
- Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy.
- Modify the policy as needed.
- Use
UpdatePolicy
to write the updated policy.
This pattern helps prevent conflicts between concurrent updates.
Parameters | |
---|---|
Name | Description |
request |
UpdatePolicyRequest The request received from the client. |
context |
ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
TaskOperation |
The response to send back to the client (wrapped by a task). |