App Engine v1 API - Class ApplicationsClient (2.3.0)

public abstract class ApplicationsClient

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

Applications client wrapper, for convenient use.

Inheritance

object > ApplicationsClient

Derived Types

Namespace

Google.Cloud.AppEngine.V1

Assembly

Google.Cloud.AppEngine.V1.dll

Remarks

Manages App Engine applications.

Properties

CreateApplicationOperationsClient

public virtual OperationsClient CreateApplicationOperationsClient { get; }

The long-running operations client for CreateApplication.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Applications 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 Applications scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

GrpcClient

public virtual Applications.ApplicationsClient GrpcClient { get; }

The underlying gRPC Applications client

Property Value
TypeDescription
ApplicationsApplicationsClient

RepairApplicationOperationsClient

public virtual OperationsClient RepairApplicationOperationsClient { get; }

The long-running operations client for RepairApplication.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateApplicationOperationsClient

public virtual OperationsClient UpdateApplicationOperationsClient { get; }

The long-running operations client for UpdateApplication.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static ApplicationsClient Create()

Synchronously creates a ApplicationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ApplicationsClientBuilder.

Returns
TypeDescription
ApplicationsClient

The created ApplicationsClient.

CreateApplication(CreateApplicationRequest, CallSettings)

public virtual Operation<Application, OperationMetadataV1> CreateApplication(CreateApplicationRequest request, CallSettings callSettings = null)

Creates an App Engine application for a Google Cloud Platform project. Required fields:

  • id - The ID of the target Cloud Platform project.
  • location - The region where you want the App Engine application located.

For more information about App Engine applications, see Managing Projects, Applications, and Billing.

Parameters
NameDescription
requestCreateApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationApplicationOperationMetadataV1

The RPC response.

Example
// Create client
ApplicationsClient applicationsClient = ApplicationsClient.Create();
// Initialize request argument(s)
CreateApplicationRequest request = new CreateApplicationRequest
{
    Application = new Application(),
};
// Make the request
Operation<Application, OperationMetadataV1> response = applicationsClient.CreateApplication(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = applicationsClient.PollOnceCreateApplication(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

CreateApplicationAsync(CreateApplicationRequest, CallSettings)

public virtual Task<Operation<Application, OperationMetadataV1>> CreateApplicationAsync(CreateApplicationRequest request, CallSettings callSettings = null)

Creates an App Engine application for a Google Cloud Platform project. Required fields:

  • id - The ID of the target Cloud Platform project.
  • location - The region where you want the App Engine application located.

For more information about App Engine applications, see Managing Projects, Applications, and Billing.

Parameters
NameDescription
requestCreateApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationApplicationOperationMetadataV1

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
CreateApplicationRequest request = new CreateApplicationRequest
{
    Application = new Application(),
};
// Make the request
Operation<Application, OperationMetadataV1> response = await applicationsClient.CreateApplicationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = await applicationsClient.PollOnceCreateApplicationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

CreateApplicationAsync(CreateApplicationRequest, CancellationToken)

public virtual Task<Operation<Application, OperationMetadataV1>> CreateApplicationAsync(CreateApplicationRequest request, CancellationToken cancellationToken)

Creates an App Engine application for a Google Cloud Platform project. Required fields:

  • id - The ID of the target Cloud Platform project.
  • location - The region where you want the App Engine application located.

For more information about App Engine applications, see Managing Projects, Applications, and Billing.

Parameters
NameDescription
requestCreateApplicationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationApplicationOperationMetadataV1

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
CreateApplicationRequest request = new CreateApplicationRequest
{
    Application = new Application(),
};
// Make the request
Operation<Application, OperationMetadataV1> response = await applicationsClient.CreateApplicationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = await applicationsClient.PollOnceCreateApplicationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

CreateAsync(CancellationToken)

public static Task<ApplicationsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ApplicationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ApplicationsClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskApplicationsClient

The task representing the created ApplicationsClient.

GetApplication(GetApplicationRequest, CallSettings)

public virtual Application GetApplication(GetApplicationRequest request, CallSettings callSettings = null)

Gets information about an application.

Parameters
NameDescription
requestGetApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Application

The RPC response.

Example
// Create client
ApplicationsClient applicationsClient = ApplicationsClient.Create();
// Initialize request argument(s)
GetApplicationRequest request = new GetApplicationRequest { Name = "", };
// Make the request
Application response = applicationsClient.GetApplication(request);

GetApplication(string, CallSettings)

public virtual Application GetApplication(string name, CallSettings callSettings = null)

Gets information about an application.

Parameters
NameDescription
namestring

Name of the Application resource to get. Example: apps/myapp.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Application

The RPC response.

Example
// Create client
ApplicationsClient applicationsClient = ApplicationsClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Application response = applicationsClient.GetApplication(name);

GetApplicationAsync(GetApplicationRequest, CallSettings)

public virtual Task<Application> GetApplicationAsync(GetApplicationRequest request, CallSettings callSettings = null)

Gets information about an application.

Parameters
NameDescription
requestGetApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskApplication

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
GetApplicationRequest request = new GetApplicationRequest { Name = "", };
// Make the request
Application response = await applicationsClient.GetApplicationAsync(request);

GetApplicationAsync(GetApplicationRequest, CancellationToken)

public virtual Task<Application> GetApplicationAsync(GetApplicationRequest request, CancellationToken cancellationToken)

Gets information about an application.

Parameters
NameDescription
requestGetApplicationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskApplication

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
GetApplicationRequest request = new GetApplicationRequest { Name = "", };
// Make the request
Application response = await applicationsClient.GetApplicationAsync(request);

GetApplicationAsync(string, CallSettings)

public virtual Task<Application> GetApplicationAsync(string name, CallSettings callSettings = null)

Gets information about an application.

Parameters
NameDescription
namestring

Name of the Application resource to get. Example: apps/myapp.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskApplication

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Application response = await applicationsClient.GetApplicationAsync(name);

GetApplicationAsync(string, CancellationToken)

public virtual Task<Application> GetApplicationAsync(string name, CancellationToken cancellationToken)

Gets information about an application.

Parameters
NameDescription
namestring

Name of the Application resource to get. Example: apps/myapp.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskApplication

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Application response = await applicationsClient.GetApplicationAsync(name);

PollOnceCreateApplication(string, CallSettings)

public virtual Operation<Application, OperationMetadataV1> PollOnceCreateApplication(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateApplication .

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
OperationApplicationOperationMetadataV1

The result of polling the operation.

PollOnceCreateApplicationAsync(string, CallSettings)

public virtual Task<Operation<Application, OperationMetadataV1>> PollOnceCreateApplicationAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateApplication.

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
TaskOperationApplicationOperationMetadataV1

A task representing the result of polling the operation.

PollOnceRepairApplication(string, CallSettings)

public virtual Operation<Application, OperationMetadataV1> PollOnceRepairApplication(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of RepairApplication .

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
OperationApplicationOperationMetadataV1

The result of polling the operation.

PollOnceRepairApplicationAsync(string, CallSettings)

public virtual Task<Operation<Application, OperationMetadataV1>> PollOnceRepairApplicationAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of RepairApplication.

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
TaskOperationApplicationOperationMetadataV1

A task representing the result of polling the operation.

PollOnceUpdateApplication(string, CallSettings)

public virtual Operation<Application, OperationMetadataV1> PollOnceUpdateApplication(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateApplication .

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
OperationApplicationOperationMetadataV1

The result of polling the operation.

PollOnceUpdateApplicationAsync(string, CallSettings)

public virtual Task<Operation<Application, OperationMetadataV1>> PollOnceUpdateApplicationAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateApplication.

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
TaskOperationApplicationOperationMetadataV1

A task representing the result of polling the operation.

RepairApplication(RepairApplicationRequest, CallSettings)

public virtual Operation<Application, OperationMetadataV1> RepairApplication(RepairApplicationRequest request, CallSettings callSettings = null)

Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.

Parameters
NameDescription
requestRepairApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationApplicationOperationMetadataV1

The RPC response.

Example
// Create client
ApplicationsClient applicationsClient = ApplicationsClient.Create();
// Initialize request argument(s)
RepairApplicationRequest request = new RepairApplicationRequest { Name = "", };
// Make the request
Operation<Application, OperationMetadataV1> response = applicationsClient.RepairApplication(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = applicationsClient.PollOnceRepairApplication(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

RepairApplicationAsync(RepairApplicationRequest, CallSettings)

public virtual Task<Operation<Application, OperationMetadataV1>> RepairApplicationAsync(RepairApplicationRequest request, CallSettings callSettings = null)

Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.

Parameters
NameDescription
requestRepairApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationApplicationOperationMetadataV1

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
RepairApplicationRequest request = new RepairApplicationRequest { Name = "", };
// Make the request
Operation<Application, OperationMetadataV1> response = await applicationsClient.RepairApplicationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = await applicationsClient.PollOnceRepairApplicationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

RepairApplicationAsync(RepairApplicationRequest, CancellationToken)

public virtual Task<Operation<Application, OperationMetadataV1>> RepairApplicationAsync(RepairApplicationRequest request, CancellationToken cancellationToken)

Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.

Parameters
NameDescription
requestRepairApplicationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationApplicationOperationMetadataV1

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
RepairApplicationRequest request = new RepairApplicationRequest { Name = "", };
// Make the request
Operation<Application, OperationMetadataV1> response = await applicationsClient.RepairApplicationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = await applicationsClient.PollOnceRepairApplicationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

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.

UpdateApplication(UpdateApplicationRequest, CallSettings)

public virtual Operation<Application, OperationMetadataV1> UpdateApplication(UpdateApplicationRequest request, CallSettings callSettings = null)

Updates the specified Application resource. You can update the following fields:

  • auth_domain - Google authentication domain for controlling user access to the application.
  • default_cookie_expiration - Cookie expiration policy for the application.
  • iap - Identity-Aware Proxy properties for the application.
Parameters
NameDescription
requestUpdateApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationApplicationOperationMetadataV1

The RPC response.

Example
// Create client
ApplicationsClient applicationsClient = ApplicationsClient.Create();
// Initialize request argument(s)
UpdateApplicationRequest request = new UpdateApplicationRequest
{
    Name = "",
    Application = new Application(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<Application, OperationMetadataV1> response = applicationsClient.UpdateApplication(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = applicationsClient.PollOnceUpdateApplication(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

UpdateApplicationAsync(UpdateApplicationRequest, CallSettings)

public virtual Task<Operation<Application, OperationMetadataV1>> UpdateApplicationAsync(UpdateApplicationRequest request, CallSettings callSettings = null)

Updates the specified Application resource. You can update the following fields:

  • auth_domain - Google authentication domain for controlling user access to the application.
  • default_cookie_expiration - Cookie expiration policy for the application.
  • iap - Identity-Aware Proxy properties for the application.
Parameters
NameDescription
requestUpdateApplicationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationApplicationOperationMetadataV1

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
UpdateApplicationRequest request = new UpdateApplicationRequest
{
    Name = "",
    Application = new Application(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<Application, OperationMetadataV1> response = await applicationsClient.UpdateApplicationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = await applicationsClient.PollOnceUpdateApplicationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}

UpdateApplicationAsync(UpdateApplicationRequest, CancellationToken)

public virtual Task<Operation<Application, OperationMetadataV1>> UpdateApplicationAsync(UpdateApplicationRequest request, CancellationToken cancellationToken)

Updates the specified Application resource. You can update the following fields:

  • auth_domain - Google authentication domain for controlling user access to the application.
  • default_cookie_expiration - Cookie expiration policy for the application.
  • iap - Identity-Aware Proxy properties for the application.
Parameters
NameDescription
requestUpdateApplicationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationApplicationOperationMetadataV1

A Task containing the RPC response.

Example
// Create client
ApplicationsClient applicationsClient = await ApplicationsClient.CreateAsync();
// Initialize request argument(s)
UpdateApplicationRequest request = new UpdateApplicationRequest
{
    Name = "",
    Application = new Application(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<Application, OperationMetadataV1> response = await applicationsClient.UpdateApplicationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Application, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Application 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<Application, OperationMetadataV1> retrievedResponse = await applicationsClient.PollOnceUpdateApplicationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Application retrievedResult = retrievedResponse.Result;
}