public abstract class VersionsClient
Versions client wrapper, for convenient use.
Namespace
Google.Cloud.AppEngine.V1Assembly
Google.Cloud.AppEngine.V1.dll
Remarks
Manages versions of a service.
Properties
CreateVersionOperationsClient
public virtual OperationsClient CreateVersionOperationsClient { get; }
The long-running operations client for CreateVersion
.
Property Value | |
---|---|
Type | Description |
Google.LongRunning.OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Versions service, which is a host of "appengine.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Versions scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default Versions scopes are:
DeleteVersionOperationsClient
public virtual OperationsClient DeleteVersionOperationsClient { get; }
The long-running operations client for DeleteVersion
.
Property Value | |
---|---|
Type | Description |
Google.LongRunning.OperationsClient |
GrpcClient
public virtual Versions.VersionsClient GrpcClient { get; }
The underlying gRPC Versions client
Property Value | |
---|---|
Type | Description |
Versions.VersionsClient |
UpdateVersionOperationsClient
public virtual OperationsClient UpdateVersionOperationsClient { get; }
The long-running operations client for UpdateVersion
.
Property Value | |
---|---|
Type | Description |
Google.LongRunning.OperationsClient |
Methods
Create()
public static VersionsClient Create()
Synchronously creates a VersionsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VersionsClientBuilder.
Returns | |
---|---|
Type | Description |
VersionsClient | The created VersionsClient. |
CreateAsync(CancellationToken)
public static Task<VersionsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a VersionsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VersionsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<VersionsClient> | The task representing the created VersionsClient. |
CreateVersion(CreateVersionRequest, CallSettings)
public virtual Operation<Version, CreateVersionMetadataV1> CreateVersion(CreateVersionRequest request, CallSettings callSettings = null)
Deploys code and resource files to a new version.
Parameters | |
---|---|
Name | Description |
request | CreateVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Version, CreateVersionMetadataV1> | The RPC response. |
// Create client
VersionsClient versionsClient = VersionsClient.Create();
// Initialize request argument(s)
CreateVersionRequest request = new CreateVersionRequest
{
Parent = "",
Version = new gcav::Version(),
};
// Make the request
Operation<gcav::Version, CreateVersionMetadataV1> response = versionsClient.CreateVersion(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, CreateVersionMetadataV1> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcav::Version result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcav::Version, CreateVersionMetadataV1> retrievedResponse = versionsClient.PollOnceCreateVersion(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcav::Version retrievedResult = retrievedResponse.Result;
}
CreateVersionAsync(CreateVersionRequest, CallSettings)
public virtual Task<Operation<Version, CreateVersionMetadataV1>> CreateVersionAsync(CreateVersionRequest request, CallSettings callSettings = null)
Deploys code and resource files to a new version.
Parameters | |
---|---|
Name | Description |
request | CreateVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Version, CreateVersionMetadataV1>> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
CreateVersionRequest request = new CreateVersionRequest
{
Parent = "",
Version = new gcav::Version(),
};
// Make the request
Operation<gcav::Version, CreateVersionMetadataV1> response = await versionsClient.CreateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, CreateVersionMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcav::Version result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcav::Version, CreateVersionMetadataV1> retrievedResponse = await versionsClient.PollOnceCreateVersionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcav::Version retrievedResult = retrievedResponse.Result;
}
CreateVersionAsync(CreateVersionRequest, CancellationToken)
public virtual Task<Operation<Version, CreateVersionMetadataV1>> CreateVersionAsync(CreateVersionRequest request, CancellationToken cancellationToken)
Deploys code and resource files to a new version.
Parameters | |
---|---|
Name | Description |
request | CreateVersionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Version, CreateVersionMetadataV1>> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
CreateVersionRequest request = new CreateVersionRequest
{
Parent = "",
Version = new gcav::Version(),
};
// Make the request
Operation<gcav::Version, CreateVersionMetadataV1> response = await versionsClient.CreateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, CreateVersionMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcav::Version result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcav::Version, CreateVersionMetadataV1> retrievedResponse = await versionsClient.PollOnceCreateVersionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcav::Version retrievedResult = retrievedResponse.Result;
}
DeleteVersion(DeleteVersionRequest, CallSettings)
public virtual Operation<Empty, OperationMetadataV1> DeleteVersion(DeleteVersionRequest request, CallSettings callSettings = null)
Deletes an existing Version resource.
Parameters | |
---|---|
Name | Description |
request | DeleteVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1> | The RPC response. |
// Create client
VersionsClient versionsClient = VersionsClient.Create();
// Initialize request argument(s)
DeleteVersionRequest request = new DeleteVersionRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadataV1> response = versionsClient.DeleteVersion(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadataV1> retrievedResponse = versionsClient.PollOnceDeleteVersion(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVersionAsync(DeleteVersionRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadataV1>> DeleteVersionAsync(DeleteVersionRequest request, CallSettings callSettings = null)
Deletes an existing Version resource.
Parameters | |
---|---|
Name | Description |
request | DeleteVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1>> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
DeleteVersionRequest request = new DeleteVersionRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadataV1> response = await versionsClient.DeleteVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadataV1> retrievedResponse = await versionsClient.PollOnceDeleteVersionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVersionAsync(DeleteVersionRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadataV1>> DeleteVersionAsync(DeleteVersionRequest request, CancellationToken cancellationToken)
Deletes an existing Version resource.
Parameters | |
---|---|
Name | Description |
request | DeleteVersionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1>> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
DeleteVersionRequest request = new DeleteVersionRequest { Name = "", };
// Make the request
Operation<Empty, OperationMetadataV1> response = await versionsClient.DeleteVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadataV1> retrievedResponse = await versionsClient.PollOnceDeleteVersionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetVersion(GetVersionRequest, CallSettings)
public virtual Version GetVersion(GetVersionRequest request, CallSettings callSettings = null)
Gets the specified Version resource.
By default, only a BASIC_VIEW
will be returned.
Specify the FULL_VIEW
parameter to get the full resource.
Parameters | |
---|---|
Name | Description |
request | GetVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Version | The RPC response. |
// Create client
VersionsClient versionsClient = VersionsClient.Create();
// Initialize request argument(s)
GetVersionRequest request = new GetVersionRequest
{
Name = "",
View = VersionView.Basic,
};
// Make the request
gcav::Version response = versionsClient.GetVersion(request);
GetVersionAsync(GetVersionRequest, CallSettings)
public virtual Task<Version> GetVersionAsync(GetVersionRequest request, CallSettings callSettings = null)
Gets the specified Version resource.
By default, only a BASIC_VIEW
will be returned.
Specify the FULL_VIEW
parameter to get the full resource.
Parameters | |
---|---|
Name | Description |
request | GetVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Version> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
GetVersionRequest request = new GetVersionRequest
{
Name = "",
View = VersionView.Basic,
};
// Make the request
gcav::Version response = await versionsClient.GetVersionAsync(request);
GetVersionAsync(GetVersionRequest, CancellationToken)
public virtual Task<Version> GetVersionAsync(GetVersionRequest request, CancellationToken cancellationToken)
Gets the specified Version resource.
By default, only a BASIC_VIEW
will be returned.
Specify the FULL_VIEW
parameter to get the full resource.
Parameters | |
---|---|
Name | Description |
request | GetVersionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Version> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
GetVersionRequest request = new GetVersionRequest
{
Name = "",
View = VersionView.Basic,
};
// Make the request
gcav::Version response = await versionsClient.GetVersionAsync(request);
ListVersions(ListVersionsRequest, CallSettings)
public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(ListVersionsRequest request, CallSettings callSettings = null)
Lists the versions of a service.
Parameters | |
---|---|
Name | Description |
request | ListVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListVersionsResponse, Version> | A pageable sequence of Version resources. |
// Create client
VersionsClient versionsClient = VersionsClient.Create();
// Initialize request argument(s)
ListVersionsRequest request = new ListVersionsRequest
{
Parent = "",
View = VersionView.Basic,
};
// Make the request
PagedEnumerable<ListVersionsResponse, gcav::Version> response = versionsClient.ListVersions(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (gcav::Version item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListVersionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcav::Version item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcav::Version> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcav::Version item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListVersionsAsync(ListVersionsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(ListVersionsRequest request, CallSettings callSettings = null)
Lists the versions of a service.
Parameters | |
---|---|
Name | Description |
request | ListVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListVersionsResponse, Version> | A pageable asynchronous sequence of Version resources. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
ListVersionsRequest request = new ListVersionsRequest
{
Parent = "",
View = VersionView.Basic,
};
// Make the request
PagedAsyncEnumerable<ListVersionsResponse, gcav::Version> response = versionsClient.ListVersionsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcav::Version item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListVersionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (gcav::Version item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<gcav::Version> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (gcav::Version item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceCreateVersion(String, CallSettings)
public virtual Operation<Version, CreateVersionMetadataV1> PollOnceCreateVersion(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateVersion
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Version, CreateVersionMetadataV1> | The result of polling the operation. |
PollOnceCreateVersionAsync(String, CallSettings)
public virtual Task<Operation<Version, CreateVersionMetadataV1>> PollOnceCreateVersionAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateVersion
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Version, CreateVersionMetadataV1>> | A task representing the result of polling the operation. |
PollOnceDeleteVersion(String, CallSettings)
public virtual Operation<Empty, OperationMetadataV1> PollOnceDeleteVersion(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteVersion
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1> | The result of polling the operation. |
PollOnceDeleteVersionAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadataV1>> PollOnceDeleteVersionAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteVersion
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1>> | A task representing the result of polling the operation. |
PollOnceUpdateVersion(String, CallSettings)
public virtual Operation<Version, OperationMetadataV1> PollOnceUpdateVersion(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateVersion
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Version, OperationMetadataV1> | The result of polling the operation. |
PollOnceUpdateVersionAsync(String, CallSettings)
public virtual Task<Operation<Version, OperationMetadataV1>> PollOnceUpdateVersionAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateVersion
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Version, OperationMetadataV1>> | A task representing the result of polling the operation. |
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.
UpdateVersion(UpdateVersionRequest, CallSettings)
public virtual Operation<Version, OperationMetadataV1> UpdateVersion(UpdateVersionRequest request, CallSettings callSettings = null)
Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:
Standard environment
automatic scaling in the standard environment:
automatic_scaling.min_idle_instances
automatic_scaling.max_idle_instances
automaticScaling.standard_scheduler_settings.max_instances
automaticScaling.standard_scheduler_settings.min_instances
automaticScaling.standard_scheduler_settings.target_cpu_utilization
automaticScaling.standard_scheduler_settings.target_throughput_utilization
basic scaling or manual scaling in the standard environment:
Flexible environment
automatic scaling in the flexible environment:
automatic_scaling.min_total_instances
automatic_scaling.max_total_instances
automatic_scaling.cool_down_period_sec
automatic_scaling.cpu_utilization.target_utilization
manual scaling in the flexible environment:
Parameters | |
---|---|
Name | Description |
request | UpdateVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Google.LongRunning.Operation<Version, OperationMetadataV1> | The RPC response. |
// Create client
VersionsClient versionsClient = VersionsClient.Create();
// Initialize request argument(s)
UpdateVersionRequest request = new UpdateVersionRequest
{
Name = "",
Version = new gcav::Version(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcav::Version, OperationMetadataV1> response = versionsClient.UpdateVersion(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
gcav::Version result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcav::Version, OperationMetadataV1> retrievedResponse = versionsClient.PollOnceUpdateVersion(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcav::Version retrievedResult = retrievedResponse.Result;
}
UpdateVersionAsync(UpdateVersionRequest, CallSettings)
public virtual Task<Operation<Version, OperationMetadataV1>> UpdateVersionAsync(UpdateVersionRequest request, CallSettings callSettings = null)
Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:
Standard environment
automatic scaling in the standard environment:
automatic_scaling.min_idle_instances
automatic_scaling.max_idle_instances
automaticScaling.standard_scheduler_settings.max_instances
automaticScaling.standard_scheduler_settings.min_instances
automaticScaling.standard_scheduler_settings.target_cpu_utilization
automaticScaling.standard_scheduler_settings.target_throughput_utilization
basic scaling or manual scaling in the standard environment:
Flexible environment
automatic scaling in the flexible environment:
automatic_scaling.min_total_instances
automatic_scaling.max_total_instances
automatic_scaling.cool_down_period_sec
automatic_scaling.cpu_utilization.target_utilization
manual scaling in the flexible environment:
Parameters | |
---|---|
Name | Description |
request | UpdateVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Version, OperationMetadataV1>> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
UpdateVersionRequest request = new UpdateVersionRequest
{
Name = "",
Version = new gcav::Version(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcav::Version, OperationMetadataV1> response = await versionsClient.UpdateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcav::Version result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcav::Version, OperationMetadataV1> retrievedResponse = await versionsClient.PollOnceUpdateVersionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcav::Version retrievedResult = retrievedResponse.Result;
}
UpdateVersionAsync(UpdateVersionRequest, CancellationToken)
public virtual Task<Operation<Version, OperationMetadataV1>> UpdateVersionAsync(UpdateVersionRequest request, CancellationToken cancellationToken)
Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:
Standard environment
automatic scaling in the standard environment:
automatic_scaling.min_idle_instances
automatic_scaling.max_idle_instances
automaticScaling.standard_scheduler_settings.max_instances
automaticScaling.standard_scheduler_settings.min_instances
automaticScaling.standard_scheduler_settings.target_cpu_utilization
automaticScaling.standard_scheduler_settings.target_throughput_utilization
basic scaling or manual scaling in the standard environment:
Flexible environment
automatic scaling in the flexible environment:
automatic_scaling.min_total_instances
automatic_scaling.max_total_instances
automatic_scaling.cool_down_period_sec
automatic_scaling.cpu_utilization.target_utilization
manual scaling in the flexible environment:
Parameters | |
---|---|
Name | Description |
request | UpdateVersionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Google.LongRunning.Operation<Version, OperationMetadataV1>> | A Task containing the RPC response. |
// Create client
VersionsClient versionsClient = await VersionsClient.CreateAsync();
// Initialize request argument(s)
UpdateVersionRequest request = new UpdateVersionRequest
{
Name = "",
Version = new gcav::Version(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcav::Version, OperationMetadataV1> response = await versionsClient.UpdateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
gcav::Version result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<gcav::Version, OperationMetadataV1> retrievedResponse = await versionsClient.PollOnceUpdateVersionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
gcav::Version retrievedResult = retrievedResponse.Result;
}