Backup for GKE v1 API - Class BackupForGKEClient (2.1.0)

public abstract class BackupForGKEClient

Reference documentation and code samples for the Backup for GKE v1 API class BackupForGKEClient.

BackupForGKE client wrapper, for convenient use.

Inheritance

Object > BackupForGKEClient

Derived Types

Namespace

Google.Cloud.GkeBackup.V1

Assembly

Google.Cloud.GkeBackup.V1.dll

Remarks

BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters.

Properties

CreateBackupOperationsClient

public virtual OperationsClient CreateBackupOperationsClient { get; }

The long-running operations client for CreateBackup.

Property Value
TypeDescription
OperationsClient

CreateBackupPlanOperationsClient

public virtual OperationsClient CreateBackupPlanOperationsClient { get; }

The long-running operations client for CreateBackupPlan.

Property Value
TypeDescription
OperationsClient

CreateRestoreOperationsClient

public virtual OperationsClient CreateRestoreOperationsClient { get; }

The long-running operations client for CreateRestore.

Property Value
TypeDescription
OperationsClient

CreateRestorePlanOperationsClient

public virtual OperationsClient CreateRestorePlanOperationsClient { get; }

The long-running operations client for CreateRestorePlan.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the BackupForGKE service, which is a host of "gkebackup.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default BackupForGKE scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default BackupForGKE scopes are:

DeleteBackupOperationsClient

public virtual OperationsClient DeleteBackupOperationsClient { get; }

The long-running operations client for DeleteBackup.

Property Value
TypeDescription
OperationsClient

DeleteBackupPlanOperationsClient

public virtual OperationsClient DeleteBackupPlanOperationsClient { get; }

The long-running operations client for DeleteBackupPlan.

Property Value
TypeDescription
OperationsClient

DeleteRestoreOperationsClient

public virtual OperationsClient DeleteRestoreOperationsClient { get; }

The long-running operations client for DeleteRestore.

Property Value
TypeDescription
OperationsClient

DeleteRestorePlanOperationsClient

public virtual OperationsClient DeleteRestorePlanOperationsClient { get; }

The long-running operations client for DeleteRestorePlan.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual BackupForGKE.BackupForGKEClient GrpcClient { get; }

The underlying gRPC BackupForGKE client

Property Value
TypeDescription
BackupForGKE.BackupForGKEClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateBackupOperationsClient

public virtual OperationsClient UpdateBackupOperationsClient { get; }

The long-running operations client for UpdateBackup.

Property Value
TypeDescription
OperationsClient

UpdateBackupPlanOperationsClient

public virtual OperationsClient UpdateBackupPlanOperationsClient { get; }

The long-running operations client for UpdateBackupPlan.

Property Value
TypeDescription
OperationsClient

UpdateRestoreOperationsClient

public virtual OperationsClient UpdateRestoreOperationsClient { get; }

The long-running operations client for UpdateRestore.

Property Value
TypeDescription
OperationsClient

UpdateRestorePlanOperationsClient

public virtual OperationsClient UpdateRestorePlanOperationsClient { get; }

The long-running operations client for UpdateRestorePlan.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static BackupForGKEClient Create()

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

Returns
TypeDescription
BackupForGKEClient

The created BackupForGKEClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<BackupForGKEClient>

The task representing the created BackupForGKEClient.

CreateBackup(BackupPlanName, Backup, String, CallSettings)

public virtual Operation<Backup, OperationMetadata> CreateBackup(BackupPlanName parent, Backup backup, string backupId, CallSettings callSettings = null)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
parentBackupPlanName

Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*

backupBackup

The Backup resource to create.

backupIdString

The client-provided short name for the Backup resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Backups in this BackupPlan
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Backup, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
BackupPlanName parent = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = backupForGKEClient.CreateBackup(parent, backup, backupId);

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

CreateBackup(CreateBackupRequest, CallSettings)

public virtual Operation<Backup, OperationMetadata> CreateBackup(CreateBackupRequest request, CallSettings callSettings = null)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
requestCreateBackupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Backup, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
    ParentAsBackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
    Backup = new Backup(),
    BackupId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = backupForGKEClient.CreateBackup(request);

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

CreateBackup(String, Backup, String, CallSettings)

public virtual Operation<Backup, OperationMetadata> CreateBackup(string parent, Backup backup, string backupId, CallSettings callSettings = null)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
parentString

Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*

backupBackup

The Backup resource to create.

backupIdString

The client-provided short name for the Backup resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Backups in this BackupPlan
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Backup, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = backupForGKEClient.CreateBackup(parent, backup, backupId);

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

CreateBackupAsync(BackupPlanName, Backup, String, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(BackupPlanName parent, Backup backup, string backupId, CallSettings callSettings = null)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
parentBackupPlanName

Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*

backupBackup

The Backup resource to create.

backupIdString

The client-provided short name for the Backup resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Backups in this BackupPlan
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Backup, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
BackupPlanName parent = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await backupForGKEClient.CreateBackupAsync(parent, backup, backupId);

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

CreateBackupAsync(BackupPlanName, Backup, String, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(BackupPlanName parent, Backup backup, string backupId, CancellationToken cancellationToken)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
parentBackupPlanName

Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*

backupBackup

The Backup resource to create.

backupIdString

The client-provided short name for the Backup resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Backups in this BackupPlan
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Backup, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
BackupPlanName parent = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await backupForGKEClient.CreateBackupAsync(parent, backup, backupId);

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

CreateBackupAsync(CreateBackupRequest, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(CreateBackupRequest request, CallSettings callSettings = null)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
requestCreateBackupRequest

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<Operation<Backup, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
    ParentAsBackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
    Backup = new Backup(),
    BackupId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupForGKEClient.CreateBackupAsync(request);

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

CreateBackupAsync(CreateBackupRequest, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(CreateBackupRequest request, CancellationToken cancellationToken)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
requestCreateBackupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Backup, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
    ParentAsBackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
    Backup = new Backup(),
    BackupId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupForGKEClient.CreateBackupAsync(request);

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

CreateBackupAsync(String, Backup, String, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(string parent, Backup backup, string backupId, CallSettings callSettings = null)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
parentString

Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*

backupBackup

The Backup resource to create.

backupIdString

The client-provided short name for the Backup resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Backups in this BackupPlan
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Backup, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await backupForGKEClient.CreateBackupAsync(parent, backup, backupId);

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

CreateBackupAsync(String, Backup, String, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> CreateBackupAsync(string parent, Backup backup, string backupId, CancellationToken cancellationToken)

Creates a Backup for the given BackupPlan.

Parameters
NameDescription
parentString

Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*

backupBackup

The Backup resource to create.

backupIdString

The client-provided short name for the Backup resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Backups in this BackupPlan
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Backup, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await backupForGKEClient.CreateBackupAsync(parent, backup, backupId);

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

CreateBackupPlan(LocationName, BackupPlan, String, CallSettings)

public virtual Operation<BackupPlan, OperationMetadata> CreateBackupPlan(LocationName parent, BackupPlan backupPlan, string backupPlanId, CallSettings callSettings = null)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
parentLocationName

Required. The location within which to create the BackupPlan. Format: projects//locations/

backupPlanBackupPlan

Required. The BackupPlan resource object to create.

backupPlanIdString

Required. The client-provided short name for the BackupPlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of BackupPlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BackupPlan, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = backupForGKEClient.CreateBackupPlan(parent, backupPlan, backupPlanId);

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

CreateBackupPlan(CreateBackupPlanRequest, CallSettings)

public virtual Operation<BackupPlan, OperationMetadata> CreateBackupPlan(CreateBackupPlanRequest request, CallSettings callSettings = null)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
requestCreateBackupPlanRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BackupPlan, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
CreateBackupPlanRequest request = new CreateBackupPlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlan = new BackupPlan(),
    BackupPlanId = "",
};
// Make the request
Operation<BackupPlan, OperationMetadata> response = backupForGKEClient.CreateBackupPlan(request);

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

CreateBackupPlan(String, BackupPlan, String, CallSettings)

public virtual Operation<BackupPlan, OperationMetadata> CreateBackupPlan(string parent, BackupPlan backupPlan, string backupPlanId, CallSettings callSettings = null)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
parentString

Required. The location within which to create the BackupPlan. Format: projects//locations/

backupPlanBackupPlan

Required. The BackupPlan resource object to create.

backupPlanIdString

Required. The client-provided short name for the BackupPlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of BackupPlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<BackupPlan, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = backupForGKEClient.CreateBackupPlan(parent, backupPlan, backupPlanId);

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

CreateBackupPlanAsync(LocationName, BackupPlan, String, CallSettings)

public virtual Task<Operation<BackupPlan, OperationMetadata>> CreateBackupPlanAsync(LocationName parent, BackupPlan backupPlan, string backupPlanId, CallSettings callSettings = null)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
parentLocationName

Required. The location within which to create the BackupPlan. Format: projects//locations/

backupPlanBackupPlan

Required. The BackupPlan resource object to create.

backupPlanIdString

Required. The client-provided short name for the BackupPlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of BackupPlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<BackupPlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupForGKEClient.CreateBackupPlanAsync(parent, backupPlan, backupPlanId);

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

CreateBackupPlanAsync(LocationName, BackupPlan, String, CancellationToken)

public virtual Task<Operation<BackupPlan, OperationMetadata>> CreateBackupPlanAsync(LocationName parent, BackupPlan backupPlan, string backupPlanId, CancellationToken cancellationToken)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
parentLocationName

Required. The location within which to create the BackupPlan. Format: projects//locations/

backupPlanBackupPlan

Required. The BackupPlan resource object to create.

backupPlanIdString

Required. The client-provided short name for the BackupPlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of BackupPlans in this location
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<BackupPlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupForGKEClient.CreateBackupPlanAsync(parent, backupPlan, backupPlanId);

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

CreateBackupPlanAsync(CreateBackupPlanRequest, CallSettings)

public virtual Task<Operation<BackupPlan, OperationMetadata>> CreateBackupPlanAsync(CreateBackupPlanRequest request, CallSettings callSettings = null)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
requestCreateBackupPlanRequest

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<Operation<BackupPlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateBackupPlanRequest request = new CreateBackupPlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlan = new BackupPlan(),
    BackupPlanId = "",
};
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupForGKEClient.CreateBackupPlanAsync(request);

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

CreateBackupPlanAsync(CreateBackupPlanRequest, CancellationToken)

public virtual Task<Operation<BackupPlan, OperationMetadata>> CreateBackupPlanAsync(CreateBackupPlanRequest request, CancellationToken cancellationToken)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
requestCreateBackupPlanRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<BackupPlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateBackupPlanRequest request = new CreateBackupPlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlan = new BackupPlan(),
    BackupPlanId = "",
};
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupForGKEClient.CreateBackupPlanAsync(request);

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

CreateBackupPlanAsync(String, BackupPlan, String, CallSettings)

public virtual Task<Operation<BackupPlan, OperationMetadata>> CreateBackupPlanAsync(string parent, BackupPlan backupPlan, string backupPlanId, CallSettings callSettings = null)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
parentString

Required. The location within which to create the BackupPlan. Format: projects//locations/

backupPlanBackupPlan

Required. The BackupPlan resource object to create.

backupPlanIdString

Required. The client-provided short name for the BackupPlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of BackupPlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<BackupPlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupForGKEClient.CreateBackupPlanAsync(parent, backupPlan, backupPlanId);

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

CreateBackupPlanAsync(String, BackupPlan, String, CancellationToken)

public virtual Task<Operation<BackupPlan, OperationMetadata>> CreateBackupPlanAsync(string parent, BackupPlan backupPlan, string backupPlanId, CancellationToken cancellationToken)

Creates a new BackupPlan in a given location.

Parameters
NameDescription
parentString

Required. The location within which to create the BackupPlan. Format: projects//locations/

backupPlanBackupPlan

Required. The BackupPlan resource object to create.

backupPlanIdString

Required. The client-provided short name for the BackupPlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of BackupPlans in this location
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<BackupPlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupForGKEClient.CreateBackupPlanAsync(parent, backupPlan, backupPlanId);

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

CreateRestore(CreateRestoreRequest, CallSettings)

public virtual Operation<Restore, OperationMetadata> CreateRestore(CreateRestoreRequest request, CallSettings callSettings = null)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
requestCreateRestoreRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Restore, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
CreateRestoreRequest request = new CreateRestoreRequest
{
    ParentAsRestorePlanName = RestorePlanName.FromProjectLocationRestorePlan("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]"),
    Restore = new Restore(),
    RestoreId = "",
};
// Make the request
Operation<Restore, OperationMetadata> response = backupForGKEClient.CreateRestore(request);

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

CreateRestore(RestorePlanName, Restore, String, CallSettings)

public virtual Operation<Restore, OperationMetadata> CreateRestore(RestorePlanName parent, Restore restore, string restoreId, CallSettings callSettings = null)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
parentRestorePlanName

Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*

restoreRestore

Required. The restore resource to create.

restoreIdString

Required. The client-provided short name for the Restore resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Restores in this RestorePlan.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Restore, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
RestorePlanName parent = RestorePlanName.FromProjectLocationRestorePlan("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
Restore restore = new Restore();
string restoreId = "";
// Make the request
Operation<Restore, OperationMetadata> response = backupForGKEClient.CreateRestore(parent, restore, restoreId);

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

CreateRestore(String, Restore, String, CallSettings)

public virtual Operation<Restore, OperationMetadata> CreateRestore(string parent, Restore restore, string restoreId, CallSettings callSettings = null)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
parentString

Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*

restoreRestore

Required. The restore resource to create.

restoreIdString

Required. The client-provided short name for the Restore resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Restores in this RestorePlan.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Restore, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/restorePlans/[RESTORE_PLAN]";
Restore restore = new Restore();
string restoreId = "";
// Make the request
Operation<Restore, OperationMetadata> response = backupForGKEClient.CreateRestore(parent, restore, restoreId);

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

CreateRestoreAsync(CreateRestoreRequest, CallSettings)

public virtual Task<Operation<Restore, OperationMetadata>> CreateRestoreAsync(CreateRestoreRequest request, CallSettings callSettings = null)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
requestCreateRestoreRequest

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<Operation<Restore, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateRestoreRequest request = new CreateRestoreRequest
{
    ParentAsRestorePlanName = RestorePlanName.FromProjectLocationRestorePlan("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]"),
    Restore = new Restore(),
    RestoreId = "",
};
// Make the request
Operation<Restore, OperationMetadata> response = await backupForGKEClient.CreateRestoreAsync(request);

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

CreateRestoreAsync(CreateRestoreRequest, CancellationToken)

public virtual Task<Operation<Restore, OperationMetadata>> CreateRestoreAsync(CreateRestoreRequest request, CancellationToken cancellationToken)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
requestCreateRestoreRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Restore, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateRestoreRequest request = new CreateRestoreRequest
{
    ParentAsRestorePlanName = RestorePlanName.FromProjectLocationRestorePlan("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]"),
    Restore = new Restore(),
    RestoreId = "",
};
// Make the request
Operation<Restore, OperationMetadata> response = await backupForGKEClient.CreateRestoreAsync(request);

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

CreateRestoreAsync(RestorePlanName, Restore, String, CallSettings)

public virtual Task<Operation<Restore, OperationMetadata>> CreateRestoreAsync(RestorePlanName parent, Restore restore, string restoreId, CallSettings callSettings = null)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
parentRestorePlanName

Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*

restoreRestore

Required. The restore resource to create.

restoreIdString

Required. The client-provided short name for the Restore resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Restores in this RestorePlan.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Restore, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
RestorePlanName parent = RestorePlanName.FromProjectLocationRestorePlan("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
Restore restore = new Restore();
string restoreId = "";
// Make the request
Operation<Restore, OperationMetadata> response = await backupForGKEClient.CreateRestoreAsync(parent, restore, restoreId);

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

CreateRestoreAsync(RestorePlanName, Restore, String, CancellationToken)

public virtual Task<Operation<Restore, OperationMetadata>> CreateRestoreAsync(RestorePlanName parent, Restore restore, string restoreId, CancellationToken cancellationToken)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
parentRestorePlanName

Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*

restoreRestore

Required. The restore resource to create.

restoreIdString

Required. The client-provided short name for the Restore resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Restores in this RestorePlan.
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Restore, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
RestorePlanName parent = RestorePlanName.FromProjectLocationRestorePlan("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
Restore restore = new Restore();
string restoreId = "";
// Make the request
Operation<Restore, OperationMetadata> response = await backupForGKEClient.CreateRestoreAsync(parent, restore, restoreId);

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

CreateRestoreAsync(String, Restore, String, CallSettings)

public virtual Task<Operation<Restore, OperationMetadata>> CreateRestoreAsync(string parent, Restore restore, string restoreId, CallSettings callSettings = null)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
parentString

Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*

restoreRestore

Required. The restore resource to create.

restoreIdString

Required. The client-provided short name for the Restore resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Restores in this RestorePlan.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Restore, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/restorePlans/[RESTORE_PLAN]";
Restore restore = new Restore();
string restoreId = "";
// Make the request
Operation<Restore, OperationMetadata> response = await backupForGKEClient.CreateRestoreAsync(parent, restore, restoreId);

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

CreateRestoreAsync(String, Restore, String, CancellationToken)

public virtual Task<Operation<Restore, OperationMetadata>> CreateRestoreAsync(string parent, Restore restore, string restoreId, CancellationToken cancellationToken)

Creates a new Restore for the given RestorePlan.

Parameters
NameDescription
parentString

Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*

restoreRestore

Required. The restore resource to create.

restoreIdString

Required. The client-provided short name for the Restore resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of Restores in this RestorePlan.
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Restore, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/restorePlans/[RESTORE_PLAN]";
Restore restore = new Restore();
string restoreId = "";
// Make the request
Operation<Restore, OperationMetadata> response = await backupForGKEClient.CreateRestoreAsync(parent, restore, restoreId);

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

CreateRestorePlan(LocationName, RestorePlan, String, CallSettings)

public virtual Operation<RestorePlan, OperationMetadata> CreateRestorePlan(LocationName parent, RestorePlan restorePlan, string restorePlanId, CallSettings callSettings = null)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
parentLocationName

Required. The location within which to create the RestorePlan. Format: projects//locations/

restorePlanRestorePlan

Required. The RestorePlan resource object to create.

restorePlanIdString

Required. The client-provided short name for the RestorePlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of RestorePlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RestorePlan, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
RestorePlan restorePlan = new RestorePlan();
string restorePlanId = "";
// Make the request
Operation<RestorePlan, OperationMetadata> response = backupForGKEClient.CreateRestorePlan(parent, restorePlan, restorePlanId);

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

CreateRestorePlan(CreateRestorePlanRequest, CallSettings)

public virtual Operation<RestorePlan, OperationMetadata> CreateRestorePlan(CreateRestorePlanRequest request, CallSettings callSettings = null)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
requestCreateRestorePlanRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RestorePlan, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
CreateRestorePlanRequest request = new CreateRestorePlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    RestorePlan = new RestorePlan(),
    RestorePlanId = "",
};
// Make the request
Operation<RestorePlan, OperationMetadata> response = backupForGKEClient.CreateRestorePlan(request);

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

CreateRestorePlan(String, RestorePlan, String, CallSettings)

public virtual Operation<RestorePlan, OperationMetadata> CreateRestorePlan(string parent, RestorePlan restorePlan, string restorePlanId, CallSettings callSettings = null)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
parentString

Required. The location within which to create the RestorePlan. Format: projects//locations/

restorePlanRestorePlan

Required. The RestorePlan resource object to create.

restorePlanIdString

Required. The client-provided short name for the RestorePlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of RestorePlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RestorePlan, OperationMetadata>

The RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = BackupForGKEClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
RestorePlan restorePlan = new RestorePlan();
string restorePlanId = "";
// Make the request
Operation<RestorePlan, OperationMetadata> response = backupForGKEClient.CreateRestorePlan(parent, restorePlan, restorePlanId);

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

CreateRestorePlanAsync(LocationName, RestorePlan, String, CallSettings)

public virtual Task<Operation<RestorePlan, OperationMetadata>> CreateRestorePlanAsync(LocationName parent, RestorePlan restorePlan, string restorePlanId, CallSettings callSettings = null)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
parentLocationName

Required. The location within which to create the RestorePlan. Format: projects//locations/

restorePlanRestorePlan

Required. The RestorePlan resource object to create.

restorePlanIdString

Required. The client-provided short name for the RestorePlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of RestorePlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RestorePlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
RestorePlan restorePlan = new RestorePlan();
string restorePlanId = "";
// Make the request
Operation<RestorePlan, OperationMetadata> response = await backupForGKEClient.CreateRestorePlanAsync(parent, restorePlan, restorePlanId);

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

CreateRestorePlanAsync(LocationName, RestorePlan, String, CancellationToken)

public virtual Task<Operation<RestorePlan, OperationMetadata>> CreateRestorePlanAsync(LocationName parent, RestorePlan restorePlan, string restorePlanId, CancellationToken cancellationToken)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
parentLocationName

Required. The location within which to create the RestorePlan. Format: projects//locations/

restorePlanRestorePlan

Required. The RestorePlan resource object to create.

restorePlanIdString

Required. The client-provided short name for the RestorePlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of RestorePlans in this location
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RestorePlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
RestorePlan restorePlan = new RestorePlan();
string restorePlanId = "";
// Make the request
Operation<RestorePlan, OperationMetadata> response = await backupForGKEClient.CreateRestorePlanAsync(parent, restorePlan, restorePlanId);

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

CreateRestorePlanAsync(CreateRestorePlanRequest, CallSettings)

public virtual Task<Operation<RestorePlan, OperationMetadata>> CreateRestorePlanAsync(CreateRestorePlanRequest request, CallSettings callSettings = null)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
requestCreateRestorePlanRequest

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<Operation<RestorePlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateRestorePlanRequest request = new CreateRestorePlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    RestorePlan = new RestorePlan(),
    RestorePlanId = "",
};
// Make the request
Operation<RestorePlan, OperationMetadata> response = await backupForGKEClient.CreateRestorePlanAsync(request);

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

CreateRestorePlanAsync(CreateRestorePlanRequest, CancellationToken)

public virtual Task<Operation<RestorePlan, OperationMetadata>> CreateRestorePlanAsync(CreateRestorePlanRequest request, CancellationToken cancellationToken)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
requestCreateRestorePlanRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RestorePlan, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
BackupForGKEClient backupForGKEClient = await BackupForGKEClient.CreateAsync();
// Initialize request argument(s)
CreateRestorePlanRequest request = new CreateRestorePlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    RestorePlan = new RestorePlan(),
    RestorePlanId = "",
};
// Make the request
Operation<RestorePlan, OperationMetadata> response = await backupForGKEClient.CreateRestorePlanAsync(request);

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

CreateRestorePlanAsync(String, RestorePlan, String, CallSettings)

public virtual Task<Operation<RestorePlan, OperationMetadata>> CreateRestorePlanAsync(string parent, RestorePlan restorePlan, string restorePlanId, CallSettings callSettings = null)

Creates a new RestorePlan in a given location.

Parameters
NameDescription
parentString

Required. The location within which to create the RestorePlan. Format: projects//locations/

restorePlanRestorePlan

Required. The RestorePlan resource object to create.

restorePlanIdString

Required. The client-provided short name for the RestorePlan resource. This name must:

  • be between 1 and 63 characters long (inclusive)
  • consist of only lower-case ASCII letters, numbers, and dashes
  • start with a lower-case letter
  • end with a lower-case letter or number
  • be unique within the set of RestorePlans in this location
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription