public abstract class BackupForGKEClient
Reference documentation and code samples for the Backup for GKE v1 API class BackupForGKEClient.
BackupForGKE client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.GkeBackup.V1Assembly
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 | |
---|---|
Type | Description |
OperationsClient |
CreateBackupPlanOperationsClient
public virtual OperationsClient CreateBackupPlanOperationsClient { get; }
The long-running operations client for CreateBackupPlan
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateRestoreOperationsClient
public virtual OperationsClient CreateRestoreOperationsClient { get; }
The long-running operations client for CreateRestore
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateRestorePlanOperationsClient
public virtual OperationsClient CreateRestorePlanOperationsClient { get; }
The long-running operations client for CreateRestorePlan
.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default BackupForGKE scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default BackupForGKE scopes are:
DeleteBackupOperationsClient
public virtual OperationsClient DeleteBackupOperationsClient { get; }
The long-running operations client for DeleteBackup
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteBackupPlanOperationsClient
public virtual OperationsClient DeleteBackupPlanOperationsClient { get; }
The long-running operations client for DeleteBackupPlan
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteRestoreOperationsClient
public virtual OperationsClient DeleteRestoreOperationsClient { get; }
The long-running operations client for DeleteRestore
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteRestorePlanOperationsClient
public virtual OperationsClient DeleteRestorePlanOperationsClient { get; }
The long-running operations client for DeleteRestorePlan
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual BackupForGKE.BackupForGKEClient GrpcClient { get; }
The underlying gRPC BackupForGKE client
Property Value | |
---|---|
Type | Description |
BackupForGKE.BackupForGKEClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateBackupOperationsClient
public virtual OperationsClient UpdateBackupOperationsClient { get; }
The long-running operations client for UpdateBackup
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateBackupPlanOperationsClient
public virtual OperationsClient UpdateBackupPlanOperationsClient { get; }
The long-running operations client for UpdateBackupPlan
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateRestoreOperationsClient
public virtual OperationsClient UpdateRestoreOperationsClient { get; }
The long-running operations client for UpdateRestore
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateRestorePlanOperationsClient
public virtual OperationsClient UpdateRestorePlanOperationsClient { get; }
The long-running operations client for UpdateRestorePlan
.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
parent | BackupPlanName Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Backup, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Backup, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Backup, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | BackupPlanName Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Backup, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | BackupPlanName Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Backup, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Backup, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Backup, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Backup, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Backup, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The location within which to create the BackupPlan. Format: projects//locations/ |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<BackupPlan, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateBackupPlanRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<BackupPlan, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The location within which to create the BackupPlan. Format: projects//locations/ |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<BackupPlan, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The location within which to create the BackupPlan. Format: projects//locations/ |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<BackupPlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The location within which to create the BackupPlan. Format: projects//locations/ |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<BackupPlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateBackupPlanRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<BackupPlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateBackupPlanRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<BackupPlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The location within which to create the BackupPlan. Format: projects//locations/ |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<BackupPlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The location within which to create the BackupPlan. Format: projects//locations/ |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<BackupPlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateRestoreRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Restore, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | RestorePlanName Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Restore, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Restore, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateRestoreRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Restore, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateRestoreRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Restore, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | RestorePlanName Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Restore, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | RestorePlanName Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Restore, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Restore, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Restore, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The location within which to create the RestorePlan. Format: projects//locations/ |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<RestorePlan, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateRestorePlanRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<RestorePlan, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The location within which to create the RestorePlan. Format: projects//locations/ |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<RestorePlan, OperationMetadata> | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The location within which to create the RestorePlan. Format: projects//locations/ |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<RestorePlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The location within which to create the RestorePlan. Format: projects//locations/ |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<RestorePlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateRestorePlanRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<RestorePlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateRestorePlanRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<RestorePlan, OperationMetadata>> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. The location within which to create the RestorePlan. Format: projects//locations/ |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
|