App Engine v1 API - Class VersionsClient (2.3.0)

public abstract class VersionsClient

Reference documentation and code samples for the App Engine v1 API class VersionsClient.

Versions client wrapper, for convenient use.

Inheritance

object > VersionsClient

Derived Types

Namespace

Google.Cloud.AppEngine.V1

Assembly

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
TypeDescription
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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Versions scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteVersionOperationsClient

public virtual OperationsClient DeleteVersionOperationsClient { get; }

The long-running operations client for DeleteVersion.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Versions.VersionsClient GrpcClient { get; }

The underlying gRPC Versions client

Property Value
TypeDescription
VersionsVersionsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateVersionOperationsClient

public virtual OperationsClient UpdateVersionOperationsClient { get; }

The long-running operations client for UpdateVersion.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
requestCreateVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationVersionCreateVersionMetadataV1

The RPC response.

Example
// 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
NameDescription
requestCreateVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationVersionCreateVersionMetadataV1

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateVersionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationVersionCreateVersionMetadataV1

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadataV1

The RPC response.

Example
// 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
NameDescription
requestDeleteVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadataV1

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteVersionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadataV1

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Version

The RPC response.

Example
// 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
NameDescription
requestGetVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskVersion

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetVersionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskVersion

A Task containing the RPC response.

Example
// 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
NameDescription
requestListVersionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListVersionsResponseVersion

A pageable sequence of Version resources.

Example
// 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
NameDescription
requestListVersionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListVersionsResponseVersion

A pageable asynchronous sequence of Version resources.

Example
// 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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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:

basic scaling or manual scaling in the standard environment:

Flexible environment

automatic scaling in the flexible environment:

manual scaling in the flexible environment:

Parameters
NameDescription
requestUpdateVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationVersionOperationMetadataV1

The RPC response.

Example
// 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:

basic scaling or manual scaling in the standard environment:

Flexible environment

automatic scaling in the flexible environment:

manual scaling in the flexible environment:

Parameters
NameDescription
requestUpdateVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationVersionOperationMetadataV1

A Task containing the RPC response.

Example
// 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:

basic scaling or manual scaling in the standard environment:

Flexible environment

automatic scaling in the flexible environment:

manual scaling in the flexible environment:

Parameters
NameDescription
requestUpdateVersionRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationVersionOperationMetadataV1

A Task containing the RPC response.

Example
// 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;
}