public abstract class VersionsClient
Reference documentation and code samples for the App Engine v1 API class VersionsClient.
Versions client wrapper, for convenient use.
Derived Types
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 |
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 |
IReadOnlyListstring |
The default Versions scopes are:
DeleteVersionOperationsClient
public virtual OperationsClient DeleteVersionOperationsClient { get; }
The long-running operations client for DeleteVersion
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Versions.VersionsClient GrpcClient { get; }
The underlying gRPC Versions client
Property Value | |
---|---|
Type | Description |
VersionsVersionsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateVersionOperationsClient
public virtual OperationsClient UpdateVersionOperationsClient { get; }
The long-running operations client for UpdateVersion
.
Property Value | |
---|---|
Type | Description |
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)
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 |
TaskVersionsClient | 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 |
OperationVersionCreateVersionMetadataV1 | The RPC response. |
// Create client
gcav::VersionsClient versionsClient = gcav::VersionsClient.Create();
// Initialize request argument(s)
gcav::CreateVersionRequest request = new gcav::CreateVersionRequest
{
Parent = "",
Version = new gcav::Version(),
};
// Make the request
Operation<gcav::Version, gcav::CreateVersionMetadataV1> response = versionsClient.CreateVersion(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, gcav::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, gcav::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 |
TaskOperationVersionCreateVersionMetadataV1 | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::CreateVersionRequest request = new gcav::CreateVersionRequest
{
Parent = "",
Version = new gcav::Version(),
};
// Make the request
Operation<gcav::Version, gcav::CreateVersionMetadataV1> response = await versionsClient.CreateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, gcav::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, gcav::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 |
TaskOperationVersionCreateVersionMetadataV1 | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::CreateVersionRequest request = new gcav::CreateVersionRequest
{
Parent = "",
Version = new gcav::Version(),
};
// Make the request
Operation<gcav::Version, gcav::CreateVersionMetadataV1> response = await versionsClient.CreateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, gcav::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, gcav::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 |
OperationEmptyOperationMetadataV1 | The RPC response. |
// Create client
gcav::VersionsClient versionsClient = gcav::VersionsClient.Create();
// Initialize request argument(s)
gcav::DeleteVersionRequest request = new gcav::DeleteVersionRequest { Name = "", };
// Make the request
Operation<Empty, gcav::OperationMetadataV1> response = versionsClient.DeleteVersion(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcav::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, gcav::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 |
TaskOperationEmptyOperationMetadataV1 | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::DeleteVersionRequest request = new gcav::DeleteVersionRequest { Name = "", };
// Make the request
Operation<Empty, gcav::OperationMetadataV1> response = await versionsClient.DeleteVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcav::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, gcav::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 |
TaskOperationEmptyOperationMetadataV1 | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::DeleteVersionRequest request = new gcav::DeleteVersionRequest { Name = "", };
// Make the request
Operation<Empty, gcav::OperationMetadataV1> response = await versionsClient.DeleteVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, gcav::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, gcav::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
gcav::VersionsClient versionsClient = gcav::VersionsClient.Create();
// Initialize request argument(s)
gcav::GetVersionRequest request = new gcav::GetVersionRequest
{
Name = "",
View = gcav::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 |
TaskVersion | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::GetVersionRequest request = new gcav::GetVersionRequest
{
Name = "",
View = gcav::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 |
TaskVersion | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::GetVersionRequest request = new gcav::GetVersionRequest
{
Name = "",
View = gcav::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 |
PagedEnumerableListVersionsResponseVersion | A pageable sequence of Version resources. |
// Create client
gcav::VersionsClient versionsClient = gcav::VersionsClient.Create();
// Initialize request argument(s)
gcav::ListVersionsRequest request = new gcav::ListVersionsRequest
{
Parent = "",
View = gcav::VersionView.Basic,
};
// Make the request
PagedEnumerable<gcav::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 (gcav::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 |
PagedAsyncEnumerableListVersionsResponseVersion | A pageable asynchronous sequence of Version resources. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::ListVersionsRequest request = new gcav::ListVersionsRequest
{
Parent = "",
View = gcav::VersionView.Basic,
};
// Make the request
PagedAsyncEnumerable<gcav::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((gcav::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 |
OperationVersionCreateVersionMetadataV1 | 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 |
TaskOperationVersionCreateVersionMetadataV1 | 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 |
OperationEmptyOperationMetadataV1 | 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 |
TaskOperationEmptyOperationMetadataV1 | 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 |
OperationVersionOperationMetadataV1 | 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 |
TaskOperationVersionOperationMetadataV1 | 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 |
OperationVersionOperationMetadataV1 | The RPC response. |
// Create client
gcav::VersionsClient versionsClient = gcav::VersionsClient.Create();
// Initialize request argument(s)
gcav::UpdateVersionRequest request = new gcav::UpdateVersionRequest
{
Name = "",
Version = new gcav::Version(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcav::Version, gcav::OperationMetadataV1> response = versionsClient.UpdateVersion(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, gcav::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, gcav::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 |
TaskOperationVersionOperationMetadataV1 | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::UpdateVersionRequest request = new gcav::UpdateVersionRequest
{
Name = "",
Version = new gcav::Version(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcav::Version, gcav::OperationMetadataV1> response = await versionsClient.UpdateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, gcav::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, gcav::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 |
TaskOperationVersionOperationMetadataV1 | A Task containing the RPC response. |
// Create client
gcav::VersionsClient versionsClient = await gcav::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcav::UpdateVersionRequest request = new gcav::UpdateVersionRequest
{
Name = "",
Version = new gcav::Version(),
UpdateMask = new FieldMask(),
};
// Make the request
Operation<gcav::Version, gcav::OperationMetadataV1> response = await versionsClient.UpdateVersionAsync(request);
// Poll until the returned long-running operation is complete
Operation<gcav::Version, gcav::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, gcav::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;
}