[BindServiceMethod(typeof(OrgPolicy), "BindService")]
public abstract class OrgPolicyBase
Base class for server-side implementations of OrgPolicy
Namespace
Google.Cloud.OrgPolicy.V2Assembly
Google.Cloud.OrgPolicy.V2.dll
Methods
CreatePolicy(CreatePolicyRequest, ServerCallContext)
public virtual Task<Policy> CreatePolicy(CreatePolicyRequest request, ServerCallContext context)
Creates a Policy.
Returns a google.rpc.Status
with google.rpc.Code.NOT_FOUND
if the
constraint does not exist.
Returns a google.rpc.Status
with google.rpc.Code.ALREADY_EXISTS
if the
policy already exists on the given Cloud resource.
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 |
Task<Policy> | The response to send back to the client (wrapped by a task). |
DeletePolicy(DeletePolicyRequest, ServerCallContext)
public virtual Task<Empty> DeletePolicy(DeletePolicyRequest request, ServerCallContext context)
Deletes a Policy.
Returns a google.rpc.Status
with google.rpc.Code.NOT_FOUND
if the
constraint or Org Policy does not exist.
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 |
Task<Empty> | The response to send back to the client (wrapped by a task). |
GetEffectivePolicy(GetEffectivePolicyRequest, ServerCallContext)
public virtual Task<Policy> GetEffectivePolicy(GetEffectivePolicyRequest request, ServerCallContext context)
Gets the effective Policy
on a resource. This is the result of merging
Policies
in the resource hierarchy and evaluating conditions. The
returned Policy
will not have an etag
or condition
set because it is
a computed Policy
across multiple resources.
Subtrees of Resource Manager resource hierarchy with 'under:' prefix will
not be expanded.
Parameters | |
---|---|
Name | Description |
request | GetEffectivePolicyRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Policy> | 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
on a resource.
If no Policy
is set on the resource, NOT_FOUND is returned. The
etag
value can be used with UpdatePolicy()
to update a
Policy
during read-modify-write.
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 |
Task<Policy> | The response to send back to the client (wrapped by a task). |
ListConstraints(ListConstraintsRequest, ServerCallContext)
public virtual Task<ListConstraintsResponse> ListConstraints(ListConstraintsRequest request, ServerCallContext context)
Lists Constraints
that could be applied on the specified resource.
Parameters | |
---|---|
Name | Description |
request | ListConstraintsRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<ListConstraintsResponse> | 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 all of the Policies
that exist on a particular resource.
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 |
Task<ListPoliciesResponse> | The response to send back to the client (wrapped by a task). |
UpdatePolicy(UpdatePolicyRequest, ServerCallContext)
public virtual Task<Policy> UpdatePolicy(UpdatePolicyRequest request, ServerCallContext context)
Updates a Policy.
Returns a google.rpc.Status
with google.rpc.Code.NOT_FOUND
if the
constraint or the policy do not exist.
Returns a google.rpc.Status
with google.rpc.Code.ABORTED
if the etag
supplied in the request does not match the persisted etag of the policy
Note: the supplied policy will perform a full overwrite of all fields.
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 |
Task<Policy> | The response to send back to the client (wrapped by a task). |