[BindServiceMethod(typeof(OrgPolicy), "BindService")]
public abstract class OrgPolicy.OrgPolicyBaseReference documentation and code samples for the Organization Policy v2 API class OrgPolicy.OrgPolicyBase.
Base class for server-side implementations of OrgPolicy
Namespace
Google.Cloud.OrgPolicy.V2Assembly
Google.Cloud.OrgPolicy.V2.dll
Methods
CreateCustomConstraint(CreateCustomConstraintRequest, ServerCallContext)
public virtual Task<CustomConstraint> CreateCustomConstraint(CreateCustomConstraintRequest request, ServerCallContext context)Creates a custom constraint.
Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the
organization does not exist.
Returns a google.rpc.Status with google.rpc.Code.ALREADY_EXISTS if the
constraint already exists on the given organization.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateCustomConstraintRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskCustomConstraint |
The response to send back to the client (wrapped by a task). |
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 Google Cloud resource.
| Parameters | |
|---|---|
| Name | Description |
request |
CreatePolicyRequestThe request received from the client. |
context |
ServerCallContextThe 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). |
DeleteCustomConstraint(DeleteCustomConstraintRequest, ServerCallContext)
public virtual Task<Empty> DeleteCustomConstraint(DeleteCustomConstraintRequest request, ServerCallContext context)Deletes a custom constraint.
Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the
constraint does not exist.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCustomConstraintRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
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 organization policy does not exist.
| Parameters | |
|---|---|
| Name | Description |
request |
DeletePolicyRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskEmpty |
The response to send back to the client (wrapped by a task). |
GetCustomConstraint(GetCustomConstraintRequest, ServerCallContext)
public virtual Task<CustomConstraint> GetCustomConstraint(GetCustomConstraintRequest request, ServerCallContext context)Gets a custom or managed constraint.
Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the
custom or managed constraint does not exist.
| Parameters | |
|---|---|
| Name | Description |
request |
GetCustomConstraintRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskCustomConstraint |
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
an evaluated policy across multiple resources.
Subtrees of Resource Manager resource hierarchy with 'under:' prefix will
not be expanded.
| Parameters | |
|---|---|
| Name | Description |
request |
GetEffectivePolicyRequestThe request received from the client. |
context |
ServerCallContextThe 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). |
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 |
GetPolicyRequestThe request received from the client. |
context |
ServerCallContextThe 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). |
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 |
ListConstraintsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListConstraintsResponse |
The response to send back to the client (wrapped by a task). |
ListCustomConstraints(ListCustomConstraintsRequest, ServerCallContext)
public virtual Task<ListCustomConstraintsResponse> ListCustomConstraints(ListCustomConstraintsRequest request, ServerCallContext context)Retrieves all of the custom constraints that exist on a particular organization resource.
| Parameters | |
|---|---|
| Name | Description |
request |
ListCustomConstraintsRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskListCustomConstraintsResponse |
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 |
ListPoliciesRequestThe request received from the client. |
context |
ServerCallContextThe 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). |
UpdateCustomConstraint(UpdateCustomConstraintRequest, ServerCallContext)
public virtual Task<CustomConstraint> UpdateCustomConstraint(UpdateCustomConstraintRequest request, ServerCallContext context)Updates a custom constraint.
Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the
constraint does not exist.
Note: the supplied policy will perform a full overwrite of all fields.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateCustomConstraintRequestThe request received from the client. |
context |
ServerCallContextThe context of the server-side call handler being invoked. |
| Returns | |
|---|---|
| Type | Description |
TaskCustomConstraint |
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 |
UpdatePolicyRequestThe request received from the client. |
context |
ServerCallContextThe 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). |