Organization Policy v2 API - Class OrgPolicy.OrgPolicyClient (2.3.0)

public class OrgPolicy.OrgPolicyClient : ClientBase<OrgPolicy.OrgPolicyClient>

Reference documentation and code samples for the Organization Policy v2 API class OrgPolicy.OrgPolicyClient.

Client for OrgPolicy

Inheritance

object > ClientBase > ClientBaseOrgPolicyOrgPolicyClient > OrgPolicy.OrgPolicyClient

Namespace

Google.Cloud.OrgPolicy.V2

Assembly

Google.Cloud.OrgPolicy.V2.dll

Constructors

OrgPolicyClient()

protected OrgPolicyClient()

Protected parameterless constructor to allow creation of test doubles.

OrgPolicyClient(CallInvoker)

public OrgPolicyClient(CallInvoker callInvoker)

Creates a new client for OrgPolicy that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

OrgPolicyClient(ChannelBase)

public OrgPolicyClient(ChannelBase channel)

Creates a new client for OrgPolicy

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

OrgPolicyClient(ClientBaseConfiguration)

protected OrgPolicyClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateCustomConstraint(CreateCustomConstraintRequest, CallOptions)

public virtual CustomConstraint CreateCustomConstraint(CreateCustomConstraintRequest request, CallOptions options)

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
NameDescription
requestCreateCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CustomConstraint

The response received from the server.

CreateCustomConstraint(CreateCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual CustomConstraint CreateCustomConstraint(CreateCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestCreateCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CustomConstraint

The response received from the server.

CreateCustomConstraintAsync(CreateCustomConstraintRequest, CallOptions)

public virtual AsyncUnaryCall<CustomConstraint> CreateCustomConstraintAsync(CreateCustomConstraintRequest request, CallOptions options)

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
NameDescription
requestCreateCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCustomConstraint

The call object.

CreateCustomConstraintAsync(CreateCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CustomConstraint> CreateCustomConstraintAsync(CreateCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestCreateCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCustomConstraint

The call object.

CreatePolicy(CreatePolicyRequest, CallOptions)

public virtual Policy CreatePolicy(CreatePolicyRequest request, CallOptions options)

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
NameDescription
requestCreatePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

CreatePolicy(CreatePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy CreatePolicy(CreatePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestCreatePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Policy

The response received from the server.

CreatePolicyAsync(CreatePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> CreatePolicyAsync(CreatePolicyRequest request, CallOptions options)

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
NameDescription
requestCreatePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

CreatePolicyAsync(CreatePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> CreatePolicyAsync(CreatePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestCreatePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

DeleteCustomConstraint(DeleteCustomConstraintRequest, CallOptions)

public virtual Empty DeleteCustomConstraint(DeleteCustomConstraintRequest request, CallOptions options)

Deletes a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist.

Parameters
NameDescription
requestDeleteCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteCustomConstraint(DeleteCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteCustomConstraint(DeleteCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist.

Parameters
NameDescription
requestDeleteCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteCustomConstraintAsync(DeleteCustomConstraintRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteCustomConstraintAsync(DeleteCustomConstraintRequest request, CallOptions options)

Deletes a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist.

Parameters
NameDescription
requestDeleteCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteCustomConstraintAsync(DeleteCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteCustomConstraintAsync(DeleteCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint does not exist.

Parameters
NameDescription
requestDeleteCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeletePolicy(DeletePolicyRequest, CallOptions)

public virtual Empty DeletePolicy(DeletePolicyRequest request, CallOptions options)

Deletes a policy.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or organization policy does not exist.

Parameters
NameDescription
requestDeletePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeletePolicy(DeletePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeletePolicy(DeletePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a policy.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or organization policy does not exist.

Parameters
NameDescription
requestDeletePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeletePolicyAsync(DeletePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeletePolicyAsync(DeletePolicyRequest request, CallOptions options)

Deletes a policy.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or organization policy does not exist.

Parameters
NameDescription
requestDeletePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeletePolicyAsync(DeletePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeletePolicyAsync(DeletePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a policy.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the constraint or organization policy does not exist.

Parameters
NameDescription
requestDeletePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

GetCustomConstraint(GetCustomConstraintRequest, CallOptions)

public virtual CustomConstraint GetCustomConstraint(GetCustomConstraintRequest request, CallOptions options)

Gets a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the custom constraint does not exist.

Parameters
NameDescription
requestGetCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CustomConstraint

The response received from the server.

GetCustomConstraint(GetCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual CustomConstraint GetCustomConstraint(GetCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the custom constraint does not exist.

Parameters
NameDescription
requestGetCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CustomConstraint

The response received from the server.

GetCustomConstraintAsync(GetCustomConstraintRequest, CallOptions)

public virtual AsyncUnaryCall<CustomConstraint> GetCustomConstraintAsync(GetCustomConstraintRequest request, CallOptions options)

Gets a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the custom constraint does not exist.

Parameters
NameDescription
requestGetCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCustomConstraint

The call object.

GetCustomConstraintAsync(GetCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CustomConstraint> GetCustomConstraintAsync(GetCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a custom constraint.

Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the custom constraint does not exist.

Parameters
NameDescription
requestGetCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCustomConstraint

The call object.

GetEffectivePolicy(GetEffectivePolicyRequest, CallOptions)

public virtual Policy GetEffectivePolicy(GetEffectivePolicyRequest request, CallOptions options)

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
NameDescription
requestGetEffectivePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

GetEffectivePolicy(GetEffectivePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetEffectivePolicy(GetEffectivePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestGetEffectivePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Policy

The response received from the server.

GetEffectivePolicyAsync(GetEffectivePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetEffectivePolicyAsync(GetEffectivePolicyRequest request, CallOptions options)

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
NameDescription
requestGetEffectivePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetEffectivePolicyAsync(GetEffectivePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetEffectivePolicyAsync(GetEffectivePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestGetEffectivePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetPolicy(GetPolicyRequest, CallOptions)

public virtual Policy GetPolicy(GetPolicyRequest request, CallOptions options)

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
NameDescription
requestGetPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

GetPolicy(GetPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetPolicy(GetPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestGetPolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Policy

The response received from the server.

GetPolicyAsync(GetPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetPolicyAsync(GetPolicyRequest request, CallOptions options)

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
NameDescription
requestGetPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetPolicyAsync(GetPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetPolicyAsync(GetPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestGetPolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

ListConstraints(ListConstraintsRequest, CallOptions)

public virtual ListConstraintsResponse ListConstraints(ListConstraintsRequest request, CallOptions options)

Lists constraints that could be applied on the specified resource.

Parameters
NameDescription
requestListConstraintsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListConstraintsResponse

The response received from the server.

ListConstraints(ListConstraintsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListConstraintsResponse ListConstraints(ListConstraintsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists constraints that could be applied on the specified resource.

Parameters
NameDescription
requestListConstraintsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListConstraintsResponse

The response received from the server.

ListConstraintsAsync(ListConstraintsRequest, CallOptions)

public virtual AsyncUnaryCall<ListConstraintsResponse> ListConstraintsAsync(ListConstraintsRequest request, CallOptions options)

Lists constraints that could be applied on the specified resource.

Parameters
NameDescription
requestListConstraintsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListConstraintsResponse

The call object.

ListConstraintsAsync(ListConstraintsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListConstraintsResponse> ListConstraintsAsync(ListConstraintsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists constraints that could be applied on the specified resource.

Parameters
NameDescription
requestListConstraintsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListConstraintsResponse

The call object.

ListCustomConstraints(ListCustomConstraintsRequest, CallOptions)

public virtual ListCustomConstraintsResponse ListCustomConstraints(ListCustomConstraintsRequest request, CallOptions options)

Retrieves all of the custom constraints that exist on a particular organization resource.

Parameters
NameDescription
requestListCustomConstraintsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListCustomConstraintsResponse

The response received from the server.

ListCustomConstraints(ListCustomConstraintsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListCustomConstraintsResponse ListCustomConstraints(ListCustomConstraintsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves all of the custom constraints that exist on a particular organization resource.

Parameters
NameDescription
requestListCustomConstraintsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListCustomConstraintsResponse

The response received from the server.

ListCustomConstraintsAsync(ListCustomConstraintsRequest, CallOptions)

public virtual AsyncUnaryCall<ListCustomConstraintsResponse> ListCustomConstraintsAsync(ListCustomConstraintsRequest request, CallOptions options)

Retrieves all of the custom constraints that exist on a particular organization resource.

Parameters
NameDescription
requestListCustomConstraintsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListCustomConstraintsResponse

The call object.

ListCustomConstraintsAsync(ListCustomConstraintsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListCustomConstraintsResponse> ListCustomConstraintsAsync(ListCustomConstraintsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves all of the custom constraints that exist on a particular organization resource.

Parameters
NameDescription
requestListCustomConstraintsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListCustomConstraintsResponse

The call object.

ListPolicies(ListPoliciesRequest, CallOptions)

public virtual ListPoliciesResponse ListPolicies(ListPoliciesRequest request, CallOptions options)

Retrieves all of the policies that exist on a particular resource.

Parameters
NameDescription
requestListPoliciesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListPoliciesResponse

The response received from the server.

ListPolicies(ListPoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListPoliciesResponse ListPolicies(ListPoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves all of the policies that exist on a particular resource.

Parameters
NameDescription
requestListPoliciesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListPoliciesResponse

The response received from the server.

ListPoliciesAsync(ListPoliciesRequest, CallOptions)

public virtual AsyncUnaryCall<ListPoliciesResponse> ListPoliciesAsync(ListPoliciesRequest request, CallOptions options)

Retrieves all of the policies that exist on a particular resource.

Parameters
NameDescription
requestListPoliciesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListPoliciesResponse

The call object.

ListPoliciesAsync(ListPoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListPoliciesResponse> ListPoliciesAsync(ListPoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves all of the policies that exist on a particular resource.

Parameters
NameDescription
requestListPoliciesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListPoliciesResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override OrgPolicy.OrgPolicyClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
OrgPolicyOrgPolicyClient
Overrides

UpdateCustomConstraint(UpdateCustomConstraintRequest, CallOptions)

public virtual CustomConstraint UpdateCustomConstraint(UpdateCustomConstraintRequest request, CallOptions options)

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
NameDescription
requestUpdateCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CustomConstraint

The response received from the server.

UpdateCustomConstraint(UpdateCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual CustomConstraint UpdateCustomConstraint(UpdateCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestUpdateCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CustomConstraint

The response received from the server.

UpdateCustomConstraintAsync(UpdateCustomConstraintRequest, CallOptions)

public virtual AsyncUnaryCall<CustomConstraint> UpdateCustomConstraintAsync(UpdateCustomConstraintRequest request, CallOptions options)

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
NameDescription
requestUpdateCustomConstraintRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCustomConstraint

The call object.

UpdateCustomConstraintAsync(UpdateCustomConstraintRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CustomConstraint> UpdateCustomConstraintAsync(UpdateCustomConstraintRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestUpdateCustomConstraintRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCustomConstraint

The call object.

UpdatePolicy(UpdatePolicyRequest, CallOptions)

public virtual Policy UpdatePolicy(UpdatePolicyRequest request, CallOptions options)

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
NameDescription
requestUpdatePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

UpdatePolicy(UpdatePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy UpdatePolicy(UpdatePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestUpdatePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Policy

The response received from the server.

UpdatePolicyAsync(UpdatePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> UpdatePolicyAsync(UpdatePolicyRequest request, CallOptions options)

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
NameDescription
requestUpdatePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

UpdatePolicyAsync(UpdatePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> UpdatePolicyAsync(UpdatePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
NameDescription
requestUpdatePolicyRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.