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

public class ResourcePoliciesClient : ClientBase<ResourcePolicies.ResourcePoliciesClient>

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

Client for ResourcePolicies

Inheritance

Object > ClientBase > ClientBase<ResourcePolicies.ResourcePoliciesClient> > 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(ClientBase.ClientBaseConfiguration)

protected ResourcePoliciesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ResourcePolicyAggregatedList>

The call object.

AggregatedListAsync(AggregatedListResourcePoliciesRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ResourcePolicyAggregatedList>

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

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

DeleteAsync(DeleteResourcePolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ResourcePolicy>

The call object.

GetAsync(GetResourcePolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ResourcePolicy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

The call object.

GetIamPolicyAsync(GetIamPolicyResourcePolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

InsertAsync(InsertResourcePolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ResourcePolicyList>

The call object.

ListAsync(ListResourcePoliciesRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ResourcePolicyList>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
ResourcePolicies.ResourcePoliciesClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Compute.V1.ResourcePolicies.ResourcePoliciesClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

The call object.

SetIamPolicyAsync(SetIamPolicyResourcePolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<TestPermissionsResponse>

The call object.

TestIamPermissionsAsync(TestIamPermissionsResourcePolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<TestPermissionsResponse>

The call object.