- 3.22.0 (latest)
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
public abstract class AdviceClientReference documentation and code samples for the Compute Engine v1 API class AdviceClient.
Advice client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The Advice API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the Advice service, which is a host of "compute.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default Advice scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default Advice scopes are:
GrpcClient
public virtual Advice.AdviceClient GrpcClient { get; }The underlying gRPC Advice client
| Property Value | |
|---|---|
| Type | Description |
AdviceAdviceClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
Methods
CalendarMode(CalendarModeAdviceRpcRequest, CallSettings)
public virtual CalendarModeAdviceResponse CalendarMode(CalendarModeAdviceRpcRequest request, CallSettings callSettings = null)Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.
| Parameters | |
|---|---|
| Name | Description |
request |
CalendarModeAdviceRpcRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
CalendarModeAdviceResponse |
The RPC response. |
// Create client
AdviceClient adviceClient = AdviceClient.Create();
// Initialize request argument(s)
CalendarModeAdviceRpcRequest request = new CalendarModeAdviceRpcRequest
{
Region = "",
CalendarModeAdviceRequestResource = new CalendarModeAdviceRequest(),
Project = "",
};
// Make the request
CalendarModeAdviceResponse response = adviceClient.CalendarMode(request);
CalendarMode(string, string, CalendarModeAdviceRequest, CallSettings)
public virtual CalendarModeAdviceResponse CalendarMode(string project, string region, CalendarModeAdviceRequest calendarModeAdviceRequestResource, CallSettings callSettings = null)Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
region |
stringName of the region for this request. |
calendarModeAdviceRequestResource |
CalendarModeAdviceRequestThe body resource for this request |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
CalendarModeAdviceResponse |
The RPC response. |
// Create client
AdviceClient adviceClient = AdviceClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
CalendarModeAdviceRequest calendarModeAdviceRequestResource = new CalendarModeAdviceRequest();
// Make the request
CalendarModeAdviceResponse response = adviceClient.CalendarMode(project, region, calendarModeAdviceRequestResource);
CalendarModeAsync(CalendarModeAdviceRpcRequest, CallSettings)
public virtual Task<CalendarModeAdviceResponse> CalendarModeAsync(CalendarModeAdviceRpcRequest request, CallSettings callSettings = null)Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.
| Parameters | |
|---|---|
| Name | Description |
request |
CalendarModeAdviceRpcRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskCalendarModeAdviceResponse |
A Task containing the RPC response. |
// Create client
AdviceClient adviceClient = await AdviceClient.CreateAsync();
// Initialize request argument(s)
CalendarModeAdviceRpcRequest request = new CalendarModeAdviceRpcRequest
{
Region = "",
CalendarModeAdviceRequestResource = new CalendarModeAdviceRequest(),
Project = "",
};
// Make the request
CalendarModeAdviceResponse response = await adviceClient.CalendarModeAsync(request);
CalendarModeAsync(CalendarModeAdviceRpcRequest, CancellationToken)
public virtual Task<CalendarModeAdviceResponse> CalendarModeAsync(CalendarModeAdviceRpcRequest request, CancellationToken cancellationToken)Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.
| Parameters | |
|---|---|
| Name | Description |
request |
CalendarModeAdviceRpcRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskCalendarModeAdviceResponse |
A Task containing the RPC response. |
// Create client
AdviceClient adviceClient = await AdviceClient.CreateAsync();
// Initialize request argument(s)
CalendarModeAdviceRpcRequest request = new CalendarModeAdviceRpcRequest
{
Region = "",
CalendarModeAdviceRequestResource = new CalendarModeAdviceRequest(),
Project = "",
};
// Make the request
CalendarModeAdviceResponse response = await adviceClient.CalendarModeAsync(request);
CalendarModeAsync(string, string, CalendarModeAdviceRequest, CallSettings)
public virtual Task<CalendarModeAdviceResponse> CalendarModeAsync(string project, string region, CalendarModeAdviceRequest calendarModeAdviceRequestResource, CallSettings callSettings = null)Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
region |
stringName of the region for this request. |
calendarModeAdviceRequestResource |
CalendarModeAdviceRequestThe body resource for this request |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskCalendarModeAdviceResponse |
A Task containing the RPC response. |
// Create client
AdviceClient adviceClient = await AdviceClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
CalendarModeAdviceRequest calendarModeAdviceRequestResource = new CalendarModeAdviceRequest();
// Make the request
CalendarModeAdviceResponse response = await adviceClient.CalendarModeAsync(project, region, calendarModeAdviceRequestResource);
CalendarModeAsync(string, string, CalendarModeAdviceRequest, CancellationToken)
public virtual Task<CalendarModeAdviceResponse> CalendarModeAsync(string project, string region, CalendarModeAdviceRequest calendarModeAdviceRequestResource, CancellationToken cancellationToken)Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
region |
stringName of the region for this request. |
calendarModeAdviceRequestResource |
CalendarModeAdviceRequestThe body resource for this request |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskCalendarModeAdviceResponse |
A Task containing the RPC response. |
// Create client
AdviceClient adviceClient = await AdviceClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
CalendarModeAdviceRequest calendarModeAdviceRequestResource = new CalendarModeAdviceRequest();
// Make the request
CalendarModeAdviceResponse response = await adviceClient.CalendarModeAsync(project, region, calendarModeAdviceRequestResource);
Create()
public static AdviceClient Create()Synchronously creates a AdviceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AdviceClientBuilder.
| Returns | |
|---|---|
| Type | Description |
AdviceClient |
The created AdviceClient. |
CreateAsync(CancellationToken)
public static Task<AdviceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a AdviceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AdviceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskAdviceClient |
The task representing the created AdviceClient. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
| Returns | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.