Compute Engine v1 API - Class ResourcePolicies.ResourcePoliciesClient (2.10.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ResourcePoliciesClient(ChannelBase)

public ResourcePoliciesClient(ChannelBase channel)

Creates a new client for ResourcePolicies

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ResourcePoliciesClient(ClientBaseConfiguration)

protected ResourcePoliciesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

AggregatedList(AggregatedListResourcePoliciesRequest, CallOptions)

public virtual ResourcePolicyAggregatedList AggregatedList(AggregatedListResourcePoliciesRequest request, CallOptions options)

Retrieves an aggregated list of resource policies.

Parameters
NameDescription
requestAggregatedListResourcePoliciesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestAggregatedListResourcePoliciesRequest

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
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.

Parameters
NameDescription
requestAggregatedListResourcePoliciesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestAggregatedListResourcePoliciesRequest

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
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
TypeDescription
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
NameDescription
requestDeleteResourcePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestDeleteResourcePolicyRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestDeleteResourcePolicyRequest

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
AsyncUnaryCallOperation

The call object.

Get(GetResourcePolicyRequest, CallOptions)

public virtual ResourcePolicy Get(GetResourcePolicyRequest request, CallOptions options)

Retrieves all information of the specified resource policy.

Parameters
NameDescription
requestGetResourcePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetResourcePolicyRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetResourcePolicyRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyResourcePolicyRequest

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.

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyResourcePolicyRequest

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.

Insert(InsertResourcePolicyRequest, CallOptions)

public virtual Operation Insert(InsertResourcePolicyRequest request, CallOptions options)

Creates a new resource policy.

Parameters
NameDescription
requestInsertResourcePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestInsertResourcePolicyRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestInsertResourcePolicyRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListResourcePoliciesRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListResourcePoliciesRequest

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
AsyncUnaryCallResourcePolicyList

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ResourcePoliciesResourcePoliciesClient
Overrides

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyResourcePolicyRequest

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.

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyResourcePolicyRequest

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.

TestIamPermissions(TestIamPermissionsResourcePolicyRequest, CallOptions)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsResourcePolicyRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsResourcePolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsResourcePolicyRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsResourcePolicyRequest

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
AsyncUnaryCallTestPermissionsResponse

The call object.