Compute Engine v1 API - Class Regions.RegionsClient (2.16.0)

public class Regions.RegionsClient : ClientBase<Regions.RegionsClient>

Reference documentation and code samples for the Compute Engine v1 API class Regions.RegionsClient.

Client for Regions

Inheritance

object > ClientBase > ClientBaseRegionsRegionsClient > Regions.RegionsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

RegionsClient()

protected RegionsClient()

Protected parameterless constructor to allow creation of test doubles.

RegionsClient(CallInvoker)

public RegionsClient(CallInvoker callInvoker)

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

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

RegionsClient(ChannelBase)

public RegionsClient(ChannelBase channel)

Creates a new client for Regions

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

RegionsClient(ClientBaseConfiguration)

protected RegionsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

Get(GetRegionRequest, CallOptions)

public virtual Region Get(GetRegionRequest request, CallOptions options)

Returns the specified Region resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetRegionRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Region

The response received from the server.

Get(GetRegionRequest, Metadata, DateTime?, CancellationToken)

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

Returns the specified Region resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetRegionRequest

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
Region

The response received from the server.

GetAsync(GetRegionRequest, CallOptions)

public virtual AsyncUnaryCall<Region> GetAsync(GetRegionRequest request, CallOptions options)

Returns the specified Region resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetRegionRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallRegion

The call object.

GetAsync(GetRegionRequest, Metadata, DateTime?, CancellationToken)

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

Returns the specified Region resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetRegionRequest

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
AsyncUnaryCallRegion

The call object.

List(ListRegionsRequest, CallOptions)

public virtual RegionList List(ListRegionsRequest request, CallOptions options)

Retrieves the list of region resources available to the specified project. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the items.quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request ListRegionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
RegionList

The response received from the server.

List(ListRegionsRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves the list of region resources available to the specified project. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the items.quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request ListRegionsRequest

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
RegionList

The response received from the server.

ListAsync(ListRegionsRequest, CallOptions)

public virtual AsyncUnaryCall<RegionList> ListAsync(ListRegionsRequest request, CallOptions options)

Retrieves the list of region resources available to the specified project. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the items.quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request ListRegionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallRegionList

The call object.

ListAsync(ListRegionsRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves the list of region resources available to the specified project. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the items.quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request ListRegionsRequest

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
AsyncUnaryCallRegionList

The call object.

NewInstance(ClientBaseConfiguration)

protected override Regions.RegionsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
RegionsRegionsClient
Overrides