Compute Engine v1 API - Class ResourcePolicies.ResourcePoliciesClient (2.16.0)

public class ResourcePolicies.ResourcePoliciesClient : ClientBase<ResourcePolicies.ResourcePoliciesClient>

Reference documentation and code samples for the Compute Engine v1 API class ResourcePolicies.ResourcePoliciesClient.

Client for ResourcePolicies

Inheritance

object > ClientBase > ClientBaseResourcePoliciesResourcePoliciesClient > ResourcePolicies.ResourcePoliciesClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

ResourcePoliciesClient()

protected ResourcePoliciesClient()

Protected parameterless constructor to allow creation of test doubles.

ResourcePoliciesClient(CallInvoker)

public ResourcePoliciesClient(CallInvoker callInvoker)

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

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

ResourcePoliciesClient(ChannelBase)

public ResourcePoliciesClient(ChannelBase channel)

Creates a new client for ResourcePolicies

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

ResourcePoliciesClient(ClientBaseConfiguration)

protected ResourcePoliciesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

AggregatedList(AggregatedListResourcePoliciesRequest, CallOptions)

public virtual ResourcePolicyAggregatedList AggregatedList(AggregatedListResourcePoliciesRequest request, CallOptions options)

Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListResourcePoliciesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ResourcePolicyAggregatedList

The response received from the server.

AggregatedList(AggregatedListResourcePoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual ResourcePolicyAggregatedList AggregatedList(AggregatedListResourcePoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListResourcePoliciesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ResourcePolicyAggregatedList

The response received from the server.

AggregatedListAsync(AggregatedListResourcePoliciesRequest, CallOptions)

public virtual AsyncUnaryCall<ResourcePolicyAggregatedList> AggregatedListAsync(AggregatedListResourcePoliciesRequest request, CallOptions options)

Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListResourcePoliciesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallResourcePolicyAggregatedList

The call object.

AggregatedListAsync(AggregatedListResourcePoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ResourcePolicyAggregatedList> AggregatedListAsync(AggregatedListResourcePoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves an aggregated list of resource policies. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListResourcePoliciesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallResourcePolicyAggregatedList

The call object.

CreateOperationsClientForRegionOperations()

public virtual Operations.OperationsClient CreateOperationsClientForRegionOperations()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client, delegating to RegionOperations.

Returns
Type Description
OperationsOperationsClient

A new Operations client for the same target as this client.

Delete(DeleteResourcePolicyRequest, CallOptions)

public virtual Operation Delete(DeleteResourcePolicyRequest request, CallOptions options)

Deletes the specified resource policy.

Parameters
Name Description
request DeleteResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Delete(DeleteResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Delete(DeleteResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified resource policy.

Parameters
Name Description
request DeleteResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

DeleteAsync(DeleteResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DeleteAsync(DeleteResourcePolicyRequest request, CallOptions options)

Deletes the specified resource policy.

Parameters
Name Description
request DeleteResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

DeleteAsync(DeleteResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> DeleteAsync(DeleteResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified resource policy.

Parameters
Name Description
request DeleteResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

Get(GetResourcePolicyRequest, CallOptions)

public virtual ResourcePolicy Get(GetResourcePolicyRequest request, CallOptions options)

Retrieves all information of the specified resource policy.

Parameters
Name Description
request GetResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ResourcePolicy

The response received from the server.

Get(GetResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual ResourcePolicy Get(GetResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves all information of the specified resource policy.

Parameters
Name Description
request GetResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ResourcePolicy

The response received from the server.

GetAsync(GetResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<ResourcePolicy> GetAsync(GetResourcePolicyRequest request, CallOptions options)

Retrieves all information of the specified resource policy.

Parameters
Name Description
request GetResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallResourcePolicy

The call object.

GetAsync(GetResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ResourcePolicy> GetAsync(GetResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves all information of the specified resource policy.

Parameters
Name Description
request GetResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallResourcePolicy

The call object.

GetIamPolicy(GetIamPolicyResourcePolicyRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyResourcePolicyRequest request, CallOptions options)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

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

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyResourcePolicyRequest request, CallOptions options)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

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

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

Insert(InsertResourcePolicyRequest, CallOptions)

public virtual Operation Insert(InsertResourcePolicyRequest request, CallOptions options)

Creates a new resource policy.

Parameters
Name Description
request InsertResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Insert(InsertResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Insert(InsertResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new resource policy.

Parameters
Name Description
request InsertResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

InsertAsync(InsertResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> InsertAsync(InsertResourcePolicyRequest request, CallOptions options)

Creates a new resource policy.

Parameters
Name Description
request InsertResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

InsertAsync(InsertResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> InsertAsync(InsertResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new resource policy.

Parameters
Name Description
request InsertResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

List(ListResourcePoliciesRequest, CallOptions)

public virtual ResourcePolicyList List(ListResourcePoliciesRequest request, CallOptions options)

A list all the resource policies that have been configured for the specified project in specified region.

Parameters
Name Description
request ListResourcePoliciesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ResourcePolicyList

The response received from the server.

List(ListResourcePoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual ResourcePolicyList List(ListResourcePoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

A list all the resource policies that have been configured for the specified project in specified region.

Parameters
Name Description
request ListResourcePoliciesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ResourcePolicyList

The response received from the server.

ListAsync(ListResourcePoliciesRequest, CallOptions)

public virtual AsyncUnaryCall<ResourcePolicyList> ListAsync(ListResourcePoliciesRequest request, CallOptions options)

A list all the resource policies that have been configured for the specified project in specified region.

Parameters
Name Description
request ListResourcePoliciesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallResourcePolicyList

The call object.

ListAsync(ListResourcePoliciesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ResourcePolicyList> ListAsync(ListResourcePoliciesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

A list all the resource policies that have been configured for the specified project in specified region.

Parameters
Name Description
request ListResourcePoliciesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallResourcePolicyList

The call object.

NewInstance(ClientBaseConfiguration)

protected override ResourcePolicies.ResourcePoliciesClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
ResourcePoliciesResourcePoliciesClient
Overrides

Patch(PatchResourcePolicyRequest, CallOptions)

public virtual Operation Patch(PatchResourcePolicyRequest request, CallOptions options)

Modify the specified resource policy.

Parameters
Name Description
request PatchResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Patch(PatchResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Patch(PatchResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Modify the specified resource policy.

Parameters
Name Description
request PatchResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

PatchAsync(PatchResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> PatchAsync(PatchResourcePolicyRequest request, CallOptions options)

Modify the specified resource policy.

Parameters
Name Description
request PatchResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

PatchAsync(PatchResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> PatchAsync(PatchResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Modify the specified resource policy.

Parameters
Name Description
request PatchResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

SetIamPolicy(SetIamPolicyResourcePolicyRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyResourcePolicyRequest request, CallOptions options)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

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

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyResourcePolicyRequest request, CallOptions options)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

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

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

TestIamPermissions(TestIamPermissionsResourcePolicyRequest, CallOptions)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsResourcePolicyRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
TestPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
TestPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest, CallOptions)

public virtual AsyncUnaryCall<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsResourcePolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTestPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsResourcePolicyRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTestPermissionsResponse

The call object.