Class VersionsClient (1.0.0)

public abstract class VersionsClient

Versions client wrapper, for convenient use.

Inheritance

Object > VersionsClient

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

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Versions scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteVersionOperationsClient

public virtual OperationsClient DeleteVersionOperationsClient { get; }

The long-running operations client for DeleteVersion.

Property Value
TypeDescription
Google.LongRunning.OperationsClient

GrpcClient

public virtual Versions.VersionsClient GrpcClient { get; }

The underlying gRPC Versions client

Property Value
TypeDescription
Versions.VersionsClient

UpdateVersionOperationsClient

public virtual OperationsClient UpdateVersionOperationsClient { get; }

The long-running operations client for UpdateVersion.

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

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
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
Google.LongRunning.Operation<Version, CreateVersionMetadataV1>

The RPC response.

Example
// 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
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
Task<Google.LongRunning.Operation<Version, CreateVersionMetadataV1>>

A Task containing the RPC response.

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Google.LongRunning.Operation<Version, CreateVersionMetadataV1>>

A Task containing the RPC response.

Example
// 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
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
Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1>

The RPC response.

Example
// 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
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
Task<Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1>>

A Task containing the RPC response.

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Google.LongRunning.Operation<Google.Protobuf.WellKnownTypes.Empty, OperationMetadataV1>>

A Task containing the RPC response.

Example
// 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
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
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
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
Task<Version>

A Task containing the RPC response.

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Version>

A Task containing the RPC response.

Example
// 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
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
PagedEnumerable<ListVersionsResponse, Version>

A pageable sequence of Version resources.

Example
// 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
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
PagedAsyncEnumerable<ListVersionsResponse, Version>

A pageable asynchronous sequence of Version resources.

Example
// 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
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
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
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
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
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
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
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
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
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
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
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
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
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
Google.LongRunning.Operation<Version, OperationMetadataV1>

The RPC response.

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

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
Task<Google.LongRunning.Operation<Version, OperationMetadataV1>>

A Task containing the RPC response.

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

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
Task<Google.LongRunning.Operation<Version, OperationMetadataV1>>

A Task containing the RPC response.

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