Compute Engine v1 API - Class Hosts.HostsClient (3.30.0)

public class Hosts.HostsClient : ClientBase<Hosts.HostsClient>

Reference documentation and code samples for the Compute Engine v1 API class Hosts.HostsClient.

Client for Hosts

Inheritance

object > ClientBase > ClientBaseHostsHostsClient > Hosts.HostsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

HostsClient()

protected HostsClient()

Protected parameterless constructor to allow creation of test doubles.

HostsClient(CallInvoker)

public HostsClient(CallInvoker callInvoker)

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

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

HostsClient(ChannelBase)

public HostsClient(ChannelBase channel)

Creates a new client for Hosts

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

HostsClient(ClientBaseConfiguration)

protected HostsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateOperationsClientForZoneOperations()

public virtual Operations.OperationsClient CreateOperationsClientForZoneOperations()

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

Returns
Type Description
OperationsOperationsClient

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

Get(GetHostRequest, CallOptions)

public virtual Host Get(GetHostRequest request, CallOptions options)

Retrieves information about the specified host.

Parameters
Name Description
request GetHostRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Host

The response received from the server.

Get(GetHostRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves information about the specified host.

Parameters
Name Description
request GetHostRequest

The request to send to the server.

headers Metadata

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

deadline System.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
Host

The response received from the server.

GetAsync(GetHostRequest, CallOptions)

public virtual AsyncUnaryCall<Host> GetAsync(GetHostRequest request, CallOptions options)

Retrieves information about the specified host.

Parameters
Name Description
request GetHostRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallHost

The call object.

GetAsync(GetHostRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves information about the specified host.

Parameters
Name Description
request GetHostRequest

The request to send to the server.

headers Metadata

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

deadline System.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
AsyncUnaryCallHost

The call object.

GetVersion(GetVersionHostRequest, CallOptions)

public virtual Operation GetVersion(GetVersionHostRequest request, CallOptions options)

Allows customers to get SBOM versions of a host.

Parameters
Name Description
request GetVersionHostRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

GetVersion(GetVersionHostRequest, Metadata, DateTime?, CancellationToken)

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

Allows customers to get SBOM versions of a host.

Parameters
Name Description
request GetVersionHostRequest

The request to send to the server.

headers Metadata

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

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

GetVersionAsync(GetVersionHostRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> GetVersionAsync(GetVersionHostRequest request, CallOptions options)

Allows customers to get SBOM versions of a host.

Parameters
Name Description
request GetVersionHostRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

GetVersionAsync(GetVersionHostRequest, Metadata, DateTime?, CancellationToken)

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

Allows customers to get SBOM versions of a host.

Parameters
Name Description
request GetVersionHostRequest

The request to send to the server.

headers Metadata

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

deadline System.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(ListHostsRequest, CallOptions)

public virtual HostsListResponse List(ListHostsRequest request, CallOptions options)

Retrieves a list of hosts.

Parameters
Name Description
request ListHostsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
HostsListResponse

The response received from the server.

List(ListHostsRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves a list of hosts.

Parameters
Name Description
request ListHostsRequest

The request to send to the server.

headers Metadata

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

deadline System.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
HostsListResponse

The response received from the server.

ListAsync(ListHostsRequest, CallOptions)

public virtual AsyncUnaryCall<HostsListResponse> ListAsync(ListHostsRequest request, CallOptions options)

Retrieves a list of hosts.

Parameters
Name Description
request ListHostsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallHostsListResponse

The call object.

ListAsync(ListHostsRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves a list of hosts.

Parameters
Name Description
request ListHostsRequest

The request to send to the server.

headers Metadata

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

deadline System.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
AsyncUnaryCallHostsListResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override Hosts.HostsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
HostsHostsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Compute.V1.Hosts.HostsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)