Backup and DR Service v1 API - Class BackupDRClient (1.2.0)

public abstract class BackupDRClient

Reference documentation and code samples for the Backup and DR Service v1 API class BackupDRClient.

BackupDR client wrapper, for convenient use.

Inheritance

object > BackupDRClient

Derived Types

Namespace

Google.Cloud.BackupDR.V1

Assembly

Google.Cloud.BackupDR.V1.dll

Remarks

The BackupDR Service

Properties

AbandonBackupOperationsClient

public virtual OperationsClient AbandonBackupOperationsClient { get; }

The long-running operations client for AbandonBackup.

Property Value
Type Description
OperationsClient

CreateBackupPlanAssociationOperationsClient

public virtual OperationsClient CreateBackupPlanAssociationOperationsClient { get; }

The long-running operations client for CreateBackupPlanAssociation.

Property Value
Type Description
OperationsClient

CreateBackupPlanOperationsClient

public virtual OperationsClient CreateBackupPlanOperationsClient { get; }

The long-running operations client for CreateBackupPlan.

Property Value
Type Description
OperationsClient

CreateBackupVaultOperationsClient

public virtual OperationsClient CreateBackupVaultOperationsClient { get; }

The long-running operations client for CreateBackupVault.

Property Value
Type Description
OperationsClient

CreateManagementServerOperationsClient

public virtual OperationsClient CreateManagementServerOperationsClient { get; }

The long-running operations client for CreateManagementServer.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default BackupDR scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default BackupDR scopes are:

DeleteBackupOperationsClient

public virtual OperationsClient DeleteBackupOperationsClient { get; }

The long-running operations client for DeleteBackup.

Property Value
Type Description
OperationsClient

DeleteBackupPlanAssociationOperationsClient

public virtual OperationsClient DeleteBackupPlanAssociationOperationsClient { get; }

The long-running operations client for DeleteBackupPlanAssociation.

Property Value
Type Description
OperationsClient

DeleteBackupPlanOperationsClient

public virtual OperationsClient DeleteBackupPlanOperationsClient { get; }

The long-running operations client for DeleteBackupPlan.

Property Value
Type Description
OperationsClient

DeleteBackupVaultOperationsClient

public virtual OperationsClient DeleteBackupVaultOperationsClient { get; }

The long-running operations client for DeleteBackupVault.

Property Value
Type Description
OperationsClient

DeleteManagementServerOperationsClient

public virtual OperationsClient DeleteManagementServerOperationsClient { get; }

The long-running operations client for DeleteManagementServer.

Property Value
Type Description
OperationsClient

FinalizeBackupOperationsClient

public virtual OperationsClient FinalizeBackupOperationsClient { get; }

The long-running operations client for FinalizeBackup.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual BackupDR.BackupDRClient GrpcClient { get; }

The underlying gRPC BackupDR client

Property Value
Type Description
BackupDRBackupDRClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

RemoveDataSourceOperationsClient

public virtual OperationsClient RemoveDataSourceOperationsClient { get; }

The long-running operations client for RemoveDataSource.

Property Value
Type Description
OperationsClient

RestoreBackupOperationsClient

public virtual OperationsClient RestoreBackupOperationsClient { get; }

The long-running operations client for RestoreBackup.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

SetInternalStatusOperationsClient

public virtual OperationsClient SetInternalStatusOperationsClient { get; }

The long-running operations client for SetInternalStatus.

Property Value
Type Description
OperationsClient

TriggerBackupOperationsClient

public virtual OperationsClient TriggerBackupOperationsClient { get; }

The long-running operations client for TriggerBackup.

Property Value
Type Description
OperationsClient

UpdateBackupOperationsClient

public virtual OperationsClient UpdateBackupOperationsClient { get; }

The long-running operations client for UpdateBackup.

Property Value
Type Description
OperationsClient

UpdateBackupVaultOperationsClient

public virtual OperationsClient UpdateBackupVaultOperationsClient { get; }

The long-running operations client for UpdateBackupVault.

Property Value
Type Description
OperationsClient

UpdateDataSourceOperationsClient

public virtual OperationsClient UpdateDataSourceOperationsClient { get; }

The long-running operations client for UpdateDataSource.

Property Value
Type Description
OperationsClient

Methods

AbandonBackup(AbandonBackupRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> AbandonBackup(AbandonBackupRequest request, CallSettings callSettings = null)

Internal only. Abandons a backup.

Parameters
Name Description
request AbandonBackupRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
AbandonBackupRequest request = new AbandonBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.AbandonBackup(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceAbandonBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackup(DataSourceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> AbandonBackup(DataSourceName dataSource, CallSettings callSettings = null)

Internal only. Abandons a backup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.AbandonBackup(dataSource);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceAbandonBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackup(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> AbandonBackup(string dataSource, CallSettings callSettings = null)

Internal only. Abandons a backup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.AbandonBackup(dataSource);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceAbandonBackup(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackupAsync(AbandonBackupRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> AbandonBackupAsync(AbandonBackupRequest request, CallSettings callSettings = null)

Internal only. Abandons a backup.

Parameters
Name Description
request AbandonBackupRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
AbandonBackupRequest request = new AbandonBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.AbandonBackupAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceAbandonBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackupAsync(AbandonBackupRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> AbandonBackupAsync(AbandonBackupRequest request, CancellationToken cancellationToken)

Internal only. Abandons a backup.

Parameters
Name Description
request AbandonBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
AbandonBackupRequest request = new AbandonBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.AbandonBackupAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceAbandonBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackupAsync(DataSourceName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> AbandonBackupAsync(DataSourceName dataSource, CallSettings callSettings = null)

Internal only. Abandons a backup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.AbandonBackupAsync(dataSource);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceAbandonBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackupAsync(DataSourceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> AbandonBackupAsync(DataSourceName dataSource, CancellationToken cancellationToken)

Internal only. Abandons a backup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.AbandonBackupAsync(dataSource);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceAbandonBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackupAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> AbandonBackupAsync(string dataSource, CallSettings callSettings = null)

Internal only. Abandons a backup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.AbandonBackupAsync(dataSource);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceAbandonBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

AbandonBackupAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> AbandonBackupAsync(string dataSource, CancellationToken cancellationToken)

Internal only. Abandons a backup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.AbandonBackupAsync(dataSource);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceAbandonBackupAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

Create()

public static BackupDRClient Create()

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

Returns
Type Description
BackupDRClient

The created BackupDRClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskBackupDRClient

The task representing the created BackupDRClient.

CreateBackupPlan(LocationName, BackupPlan, string, CallSettings)

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

Create a BackupPlan

Parameters
Name Description
parent LocationName

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId string

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = backupDRClient.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 = backupDRClient.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)

Create a BackupPlan

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
OperationBackupPlanOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
CreateBackupPlanRequest request = new CreateBackupPlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlanId = "",
    BackupPlan = new BackupPlan(),
    RequestId = "",
};
// Make the request
Operation<BackupPlan, OperationMetadata> response = backupDRClient.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 = backupDRClient.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)

Create a BackupPlan

Parameters
Name Description
parent string

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId string

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlan backupPlan = new BackupPlan();
string backupPlanId = "";
// Make the request
Operation<BackupPlan, OperationMetadata> response = backupDRClient.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 = backupDRClient.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;
}

CreateBackupPlanAssociation(LocationName, BackupPlanAssociation, string, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> CreateBackupPlanAssociation(LocationName parent, BackupPlanAssociation backupPlanAssociation, string backupPlanAssociationId, CallSettings callSettings = null)

Create a BackupPlanAssociation

Parameters
Name Description
parent LocationName

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId string

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanAssociationOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlanAssociation backupPlanAssociation = new BackupPlanAssociation();
string backupPlanAssociationId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = backupDRClient.CreateBackupPlanAssociation(parent, backupPlanAssociation, backupPlanAssociationId);

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

CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest request, CallSettings callSettings = null)

Create a BackupPlanAssociation

Parameters
Name Description
request CreateBackupPlanAssociationRequest

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
OperationBackupPlanAssociationOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
CreateBackupPlanAssociationRequest request = new CreateBackupPlanAssociationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlanAssociationId = "",
    BackupPlanAssociation = new BackupPlanAssociation(),
    RequestId = "",
};
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = backupDRClient.CreateBackupPlanAssociation(request);

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

CreateBackupPlanAssociation(string, BackupPlanAssociation, string, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> CreateBackupPlanAssociation(string parent, BackupPlanAssociation backupPlanAssociation, string backupPlanAssociationId, CallSettings callSettings = null)

Create a BackupPlanAssociation

Parameters
Name Description
parent string

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId string

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanAssociationOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlanAssociation backupPlanAssociation = new BackupPlanAssociation();
string backupPlanAssociationId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = backupDRClient.CreateBackupPlanAssociation(parent, backupPlanAssociation, backupPlanAssociationId);

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

CreateBackupPlanAssociationAsync(LocationName, BackupPlanAssociation, string, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> CreateBackupPlanAssociationAsync(LocationName parent, BackupPlanAssociation backupPlanAssociation, string backupPlanAssociationId, CallSettings callSettings = null)

Create a BackupPlanAssociation

Parameters
Name Description
parent LocationName

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId string

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlanAssociation backupPlanAssociation = new BackupPlanAssociation();
string backupPlanAssociationId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.CreateBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId);

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

CreateBackupPlanAssociationAsync(LocationName, BackupPlanAssociation, string, CancellationToken)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> CreateBackupPlanAssociationAsync(LocationName parent, BackupPlanAssociation backupPlanAssociation, string backupPlanAssociationId, CancellationToken cancellationToken)

Create a BackupPlanAssociation

Parameters
Name Description
parent LocationName

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId string

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupPlanAssociation backupPlanAssociation = new BackupPlanAssociation();
string backupPlanAssociationId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.CreateBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId);

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

CreateBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> CreateBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request, CallSettings callSettings = null)

Create a BackupPlanAssociation

Parameters
Name Description
request CreateBackupPlanAssociationRequest

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
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateBackupPlanAssociationRequest request = new CreateBackupPlanAssociationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlanAssociationId = "",
    BackupPlanAssociation = new BackupPlanAssociation(),
    RequestId = "",
};
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.CreateBackupPlanAssociationAsync(request);

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

CreateBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest, CancellationToken)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> CreateBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request, CancellationToken cancellationToken)

Create a BackupPlanAssociation

Parameters
Name Description
request CreateBackupPlanAssociationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateBackupPlanAssociationRequest request = new CreateBackupPlanAssociationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlanAssociationId = "",
    BackupPlanAssociation = new BackupPlanAssociation(),
    RequestId = "",
};
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.CreateBackupPlanAssociationAsync(request);

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

CreateBackupPlanAssociationAsync(string, BackupPlanAssociation, string, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> CreateBackupPlanAssociationAsync(string parent, BackupPlanAssociation backupPlanAssociation, string backupPlanAssociationId, CallSettings callSettings = null)

Create a BackupPlanAssociation

Parameters
Name Description
parent string

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId string

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlanAssociation backupPlanAssociation = new BackupPlanAssociation();
string backupPlanAssociationId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.CreateBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId);

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

CreateBackupPlanAssociationAsync(string, BackupPlanAssociation, string, CancellationToken)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> CreateBackupPlanAssociationAsync(string parent, BackupPlanAssociation backupPlanAssociation, string backupPlanAssociationId, CancellationToken cancellationToken)

Create a BackupPlanAssociation

Parameters
Name Description
parent string

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId string

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupPlanAssociation backupPlanAssociation = new BackupPlanAssociation();
string backupPlanAssociationId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.CreateBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId);

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

CreateBackupPlanAsync(LocationName, BackupPlan, string, CallSettings)

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

Create a BackupPlan

Parameters
Name Description
parent LocationName

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId string

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.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 backupDRClient.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 backupDRClient.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)

Create a BackupPlan

Parameters
Name Description
parent LocationName

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId string

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.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 backupDRClient.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 backupDRClient.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)

Create a BackupPlan

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
TaskOperationBackupPlanOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateBackupPlanRequest request = new CreateBackupPlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlanId = "",
    BackupPlan = new BackupPlan(),
    RequestId = "",
};
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupDRClient.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 backupDRClient.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)

Create a BackupPlan

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
TaskOperationBackupPlanOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateBackupPlanRequest request = new CreateBackupPlanRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupPlanId = "",
    BackupPlan = new BackupPlan(),
    RequestId = "",
};
// Make the request
Operation<BackupPlan, OperationMetadata> response = await backupDRClient.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 backupDRClient.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)

Create a BackupPlan

Parameters
Name Description
parent string

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId string

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.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 backupDRClient.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 backupDRClient.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)

Create a BackupPlan

Parameters
Name Description
parent string

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example us-central1.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId string

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.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 backupDRClient.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 backupDRClient.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;
}

CreateBackupVault(LocationName, BackupVault, string, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> CreateBackupVault(LocationName parent, BackupVault backupVault, string backupVaultId, CallSettings callSettings = null)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId string

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupVaultOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupVault backupVault = new BackupVault();
string backupVaultId = "";
// Make the request
Operation<BackupVault, OperationMetadata> response = backupDRClient.CreateBackupVault(parent, backupVault, backupVaultId);

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

CreateBackupVault(CreateBackupVaultRequest, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> CreateBackupVault(CreateBackupVaultRequest request, CallSettings callSettings = null)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
request CreateBackupVaultRequest

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
OperationBackupVaultOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
CreateBackupVaultRequest request = new CreateBackupVaultRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupVaultId = "",
    BackupVault = new BackupVault(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<BackupVault, OperationMetadata> response = backupDRClient.CreateBackupVault(request);

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

CreateBackupVault(string, BackupVault, string, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> CreateBackupVault(string parent, BackupVault backupVault, string backupVaultId, CallSettings callSettings = null)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId string

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupVaultOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupVault backupVault = new BackupVault();
string backupVaultId = "";
// Make the request
Operation<BackupVault, OperationMetadata> response = backupDRClient.CreateBackupVault(parent, backupVault, backupVaultId);

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

CreateBackupVaultAsync(LocationName, BackupVault, string, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> CreateBackupVaultAsync(LocationName parent, BackupVault backupVault, string backupVaultId, CallSettings callSettings = null)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId string

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupVault backupVault = new BackupVault();
string backupVaultId = "";
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.CreateBackupVaultAsync(parent, backupVault, backupVaultId);

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

CreateBackupVaultAsync(LocationName, BackupVault, string, CancellationToken)

public virtual Task<Operation<BackupVault, OperationMetadata>> CreateBackupVaultAsync(LocationName parent, BackupVault backupVault, string backupVaultId, CancellationToken cancellationToken)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId string

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
BackupVault backupVault = new BackupVault();
string backupVaultId = "";
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.CreateBackupVaultAsync(parent, backupVault, backupVaultId);

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

CreateBackupVaultAsync(CreateBackupVaultRequest, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> CreateBackupVaultAsync(CreateBackupVaultRequest request, CallSettings callSettings = null)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
request CreateBackupVaultRequest

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
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateBackupVaultRequest request = new CreateBackupVaultRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupVaultId = "",
    BackupVault = new BackupVault(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.CreateBackupVaultAsync(request);

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

CreateBackupVaultAsync(CreateBackupVaultRequest, CancellationToken)

public virtual Task<Operation<BackupVault, OperationMetadata>> CreateBackupVaultAsync(CreateBackupVaultRequest request, CancellationToken cancellationToken)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
request CreateBackupVaultRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateBackupVaultRequest request = new CreateBackupVaultRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupVaultId = "",
    BackupVault = new BackupVault(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.CreateBackupVaultAsync(request);

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

CreateBackupVaultAsync(string, BackupVault, string, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> CreateBackupVaultAsync(string parent, BackupVault backupVault, string backupVaultId, CallSettings callSettings = null)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId string

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupVault backupVault = new BackupVault();
string backupVaultId = "";
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.CreateBackupVaultAsync(parent, backupVault, backupVaultId);

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

CreateBackupVaultAsync(string, BackupVault, string, CancellationToken)

public virtual Task<Operation<BackupVault, OperationMetadata>> CreateBackupVaultAsync(string parent, BackupVault backupVault, string backupVaultId, CancellationToken cancellationToken)

Creates a new BackupVault in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId string

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
BackupVault backupVault = new BackupVault();
string backupVaultId = "";
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.CreateBackupVaultAsync(parent, backupVault, backupVaultId);

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

CreateManagementServer(LocationName, ManagementServer, string, CallSettings)

public virtual Operation<ManagementServer, OperationMetadata> CreateManagementServer(LocationName parent, ManagementServer managementServer, string managementServerId, CallSettings callSettings = null)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
parent LocationName

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example us-central1.

managementServer ManagementServer

Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]

managementServerId string

Required. The name of the management server to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationManagementServerOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ManagementServer managementServer = new ManagementServer();
string managementServerId = "";
// Make the request
Operation<ManagementServer, OperationMetadata> response = backupDRClient.CreateManagementServer(parent, managementServer, managementServerId);

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

CreateManagementServer(CreateManagementServerRequest, CallSettings)

public virtual Operation<ManagementServer, OperationMetadata> CreateManagementServer(CreateManagementServerRequest request, CallSettings callSettings = null)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
request CreateManagementServerRequest

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
OperationManagementServerOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
CreateManagementServerRequest request = new CreateManagementServerRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ManagementServerId = "",
    ManagementServer = new ManagementServer(),
    RequestId = "",
};
// Make the request
Operation<ManagementServer, OperationMetadata> response = backupDRClient.CreateManagementServer(request);

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

CreateManagementServer(string, ManagementServer, string, CallSettings)

public virtual Operation<ManagementServer, OperationMetadata> CreateManagementServer(string parent, ManagementServer managementServer, string managementServerId, CallSettings callSettings = null)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
parent string

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example us-central1.

managementServer ManagementServer

Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]

managementServerId string

Required. The name of the management server to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationManagementServerOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ManagementServer managementServer = new ManagementServer();
string managementServerId = "";
// Make the request
Operation<ManagementServer, OperationMetadata> response = backupDRClient.CreateManagementServer(parent, managementServer, managementServerId);

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

CreateManagementServerAsync(LocationName, ManagementServer, string, CallSettings)

public virtual Task<Operation<ManagementServer, OperationMetadata>> CreateManagementServerAsync(LocationName parent, ManagementServer managementServer, string managementServerId, CallSettings callSettings = null)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
parent LocationName

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example us-central1.

managementServer ManagementServer

Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]

managementServerId string

Required. The name of the management server to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationManagementServerOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ManagementServer managementServer = new ManagementServer();
string managementServerId = "";
// Make the request
Operation<ManagementServer, OperationMetadata> response = await backupDRClient.CreateManagementServerAsync(parent, managementServer, managementServerId);

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

CreateManagementServerAsync(LocationName, ManagementServer, string, CancellationToken)

public virtual Task<Operation<ManagementServer, OperationMetadata>> CreateManagementServerAsync(LocationName parent, ManagementServer managementServer, string managementServerId, CancellationToken cancellationToken)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
parent LocationName

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example us-central1.

managementServer ManagementServer

Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]

managementServerId string

Required. The name of the management server to create. The name must be unique for the specified project and location.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationManagementServerOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ManagementServer managementServer = new ManagementServer();
string managementServerId = "";
// Make the request
Operation<ManagementServer, OperationMetadata> response = await backupDRClient.CreateManagementServerAsync(parent, managementServer, managementServerId);

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

CreateManagementServerAsync(CreateManagementServerRequest, CallSettings)

public virtual Task<Operation<ManagementServer, OperationMetadata>> CreateManagementServerAsync(CreateManagementServerRequest request, CallSettings callSettings = null)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
request CreateManagementServerRequest

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
TaskOperationManagementServerOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateManagementServerRequest request = new CreateManagementServerRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ManagementServerId = "",
    ManagementServer = new ManagementServer(),
    RequestId = "",
};
// Make the request
Operation<ManagementServer, OperationMetadata> response = await backupDRClient.CreateManagementServerAsync(request);

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

CreateManagementServerAsync(CreateManagementServerRequest, CancellationToken)

public virtual Task<Operation<ManagementServer, OperationMetadata>> CreateManagementServerAsync(CreateManagementServerRequest request, CancellationToken cancellationToken)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
request CreateManagementServerRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationManagementServerOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
CreateManagementServerRequest request = new CreateManagementServerRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ManagementServerId = "",
    ManagementServer = new ManagementServer(),
    RequestId = "",
};
// Make the request
Operation<ManagementServer, OperationMetadata> response = await backupDRClient.CreateManagementServerAsync(request);

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

CreateManagementServerAsync(string, ManagementServer, string, CallSettings)

public virtual Task<Operation<ManagementServer, OperationMetadata>> CreateManagementServerAsync(string parent, ManagementServer managementServer, string managementServerId, CallSettings callSettings = null)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
parent string

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example us-central1.

managementServer ManagementServer

Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]

managementServerId string

Required. The name of the management server to create. The name must be unique for the specified project and location.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationManagementServerOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ManagementServer managementServer = new ManagementServer();
string managementServerId = "";
// Make the request
Operation<ManagementServer, OperationMetadata> response = await backupDRClient.CreateManagementServerAsync(parent, managementServer, managementServerId);

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

CreateManagementServerAsync(string, ManagementServer, string, CancellationToken)

public virtual Task<Operation<ManagementServer, OperationMetadata>> CreateManagementServerAsync(string parent, ManagementServer managementServer, string managementServerId, CancellationToken cancellationToken)

Creates a new ManagementServer in a given project and location.

Parameters
Name Description
parent string

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example us-central1.

managementServer ManagementServer

Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]

managementServerId string

Required. The name of the management server to create. The name must be unique for the specified project and location.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationManagementServerOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ManagementServer managementServer = new ManagementServer();
string managementServerId = "";
// Make the request
Operation<ManagementServer, OperationMetadata> response = await backupDRClient.CreateManagementServerAsync(parent, managementServer, managementServerId);

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

DeleteBackup(BackupName, CallSettings)

public virtual Operation<Backup, OperationMetadata> DeleteBackup(BackupName name, CallSettings callSettings = null)

Deletes a Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.DeleteBackup(name);

// 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 = backupDRClient.PollOnceDeleteBackup(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;
}

DeleteBackup(DeleteBackupRequest, CallSettings)

public virtual Operation<Backup, OperationMetadata> DeleteBackup(DeleteBackupRequest request, CallSettings callSettings = null)

Deletes a Backup.

Parameters
Name Description
request DeleteBackupRequest

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
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    RequestId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.DeleteBackup(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 = backupDRClient.PollOnceDeleteBackup(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;
}

DeleteBackup(string, CallSettings)

public virtual Operation<Backup, OperationMetadata> DeleteBackup(string name, CallSettings callSettings = null)

Deletes a Backup.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.DeleteBackup(name);

// 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 = backupDRClient.PollOnceDeleteBackup(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;
}

DeleteBackupAsync(BackupName, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> DeleteBackupAsync(BackupName name, CallSettings callSettings = null)

Deletes a Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.DeleteBackupAsync(name);

// 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 backupDRClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(BackupName, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> DeleteBackupAsync(BackupName name, CancellationToken cancellationToken)

Deletes a Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.DeleteBackupAsync(name);

// 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 backupDRClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(DeleteBackupRequest, CallSettings)

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

Deletes a Backup.

Parameters
Name Description
request DeleteBackupRequest

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
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    RequestId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.DeleteBackupAsync(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 backupDRClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(DeleteBackupRequest, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> DeleteBackupAsync(DeleteBackupRequest request, CancellationToken cancellationToken)

Deletes a Backup.

Parameters
Name Description
request DeleteBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    RequestId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.DeleteBackupAsync(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 backupDRClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(string, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> DeleteBackupAsync(string name, CallSettings callSettings = null)

Deletes a Backup.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.DeleteBackupAsync(name);

// 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 backupDRClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(string, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> DeleteBackupAsync(string name, CancellationToken cancellationToken)

Deletes a Backup.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.DeleteBackupAsync(name);

// 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 backupDRClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupPlan(BackupPlanName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupPlan(BackupPlanName name, CallSettings callSettings = null)

Deletes a single BackupPlan.

Parameters
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupPlanName name = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupPlan(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupPlan(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlan(DeleteBackupPlanRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupPlan(DeleteBackupPlanRequest request, CallSettings callSettings = null)

Deletes a single BackupPlan.

Parameters
Name Description
request DeleteBackupPlanRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DeleteBackupPlanRequest request = new DeleteBackupPlanRequest
{
    BackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupPlan(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupPlan(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlan(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupPlan(string name, CallSettings callSettings = null)

Deletes a single BackupPlan.

Parameters
Name Description
name string

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupPlan(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupPlan(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociation(BackupPlanAssociationName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupPlanAssociation(BackupPlanAssociationName name, CallSettings callSettings = null)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupPlanAssociation(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupPlanAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest request, CallSettings callSettings = null)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
request DeleteBackupPlanAssociationRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DeleteBackupPlanAssociationRequest request = new DeleteBackupPlanAssociationRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupPlanAssociation(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupPlanAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociation(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupPlanAssociation(string name, CallSettings callSettings = null)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupPlanAssociation(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupPlanAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociationAsync(BackupPlanAssociationName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAssociationAsync(BackupPlanAssociationName name, CallSettings callSettings = null)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAssociationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociationAsync(BackupPlanAssociationName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAssociationAsync(BackupPlanAssociationName name, CancellationToken cancellationToken)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAssociationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest request, CallSettings callSettings = null)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
request DeleteBackupPlanAssociationRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupPlanAssociationRequest request = new DeleteBackupPlanAssociationRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAssociationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest request, CancellationToken cancellationToken)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
request DeleteBackupPlanAssociationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupPlanAssociationRequest request = new DeleteBackupPlanAssociationRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAssociationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociationAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAssociationAsync(string name, CallSettings callSettings = null)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAssociationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAssociationAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAssociationAsync(string name, CancellationToken cancellationToken)

Deletes a single BackupPlanAssociation.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAssociationAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAsync(BackupPlanName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAsync(BackupPlanName name, CallSettings callSettings = null)

Deletes a single BackupPlan.

Parameters
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanName name = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAsync(BackupPlanName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAsync(BackupPlanName name, CancellationToken cancellationToken)

Deletes a single BackupPlan.

Parameters
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanName name = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAsync(DeleteBackupPlanRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAsync(DeleteBackupPlanRequest request, CallSettings callSettings = null)

Deletes a single BackupPlan.

Parameters
Name Description
request DeleteBackupPlanRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupPlanRequest request = new DeleteBackupPlanRequest
{
    BackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAsync(DeleteBackupPlanRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAsync(DeleteBackupPlanRequest request, CancellationToken cancellationToken)

Deletes a single BackupPlan.

Parameters
Name Description
request DeleteBackupPlanRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupPlanRequest request = new DeleteBackupPlanRequest
{
    BackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAsync(string name, CallSettings callSettings = null)

Deletes a single BackupPlan.

Parameters
Name Description
name string

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupPlanAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupPlanAsync(string name, CancellationToken cancellationToken)

Deletes a single BackupPlan.

Parameters
Name Description
name string

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupPlanAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupPlanAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVault(BackupVaultName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupVault(BackupVaultName name, CallSettings callSettings = null)

Deletes a BackupVault.

Parameters
Name Description
name BackupVaultName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupVaultName name = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupVault(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupVault(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVault(DeleteBackupVaultRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupVault(DeleteBackupVaultRequest request, CallSettings callSettings = null)

Deletes a BackupVault.

Parameters
Name Description
request DeleteBackupVaultRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DeleteBackupVaultRequest request = new DeleteBackupVaultRequest
{
    BackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    RequestId = "",
    Force = false,
    Etag = "",
    ValidateOnly = false,
    AllowMissing = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupVault(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupVault(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVault(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBackupVault(string name, CallSettings callSettings = null)

Deletes a BackupVault.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteBackupVault(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteBackupVault(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVaultAsync(BackupVaultName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupVaultAsync(BackupVaultName name, CallSettings callSettings = null)

Deletes a BackupVault.

Parameters
Name Description
name BackupVaultName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVaultName name = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupVaultAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupVaultAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVaultAsync(BackupVaultName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupVaultAsync(BackupVaultName name, CancellationToken cancellationToken)

Deletes a BackupVault.

Parameters
Name Description
name BackupVaultName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVaultName name = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupVaultAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupVaultAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVaultAsync(DeleteBackupVaultRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupVaultAsync(DeleteBackupVaultRequest request, CallSettings callSettings = null)

Deletes a BackupVault.

Parameters
Name Description
request DeleteBackupVaultRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupVaultRequest request = new DeleteBackupVaultRequest
{
    BackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    RequestId = "",
    Force = false,
    Etag = "",
    ValidateOnly = false,
    AllowMissing = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupVaultAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupVaultAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVaultAsync(DeleteBackupVaultRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupVaultAsync(DeleteBackupVaultRequest request, CancellationToken cancellationToken)

Deletes a BackupVault.

Parameters
Name Description
request DeleteBackupVaultRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupVaultRequest request = new DeleteBackupVaultRequest
{
    BackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    RequestId = "",
    Force = false,
    Etag = "",
    ValidateOnly = false,
    AllowMissing = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupVaultAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupVaultAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVaultAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupVaultAsync(string name, CallSettings callSettings = null)

Deletes a BackupVault.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupVaultAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupVaultAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteBackupVaultAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBackupVaultAsync(string name, CancellationToken cancellationToken)

Deletes a BackupVault.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteBackupVaultAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteBackupVaultAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServer(DeleteManagementServerRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteManagementServer(DeleteManagementServerRequest request, CallSettings callSettings = null)

Deletes a single ManagementServer.

Parameters
Name Description
request DeleteManagementServerRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DeleteManagementServerRequest request = new DeleteManagementServerRequest
{
    ManagementServerName = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteManagementServer(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteManagementServer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServer(ManagementServerName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteManagementServer(ManagementServerName name, CallSettings callSettings = null)

Deletes a single ManagementServer.

Parameters
Name Description
name ManagementServerName

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ManagementServerName name = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteManagementServer(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteManagementServer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServer(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteManagementServer(string name, CallSettings callSettings = null)

Deletes a single ManagementServer.

Parameters
Name Description
name string

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/managementServers/[MANAGEMENTSERVER]";
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.DeleteManagementServer(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceDeleteManagementServer(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServerAsync(DeleteManagementServerRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteManagementServerAsync(DeleteManagementServerRequest request, CallSettings callSettings = null)

Deletes a single ManagementServer.

Parameters
Name Description
request DeleteManagementServerRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteManagementServerRequest request = new DeleteManagementServerRequest
{
    ManagementServerName = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteManagementServerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteManagementServerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServerAsync(DeleteManagementServerRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteManagementServerAsync(DeleteManagementServerRequest request, CancellationToken cancellationToken)

Deletes a single ManagementServer.

Parameters
Name Description
request DeleteManagementServerRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DeleteManagementServerRequest request = new DeleteManagementServerRequest
{
    ManagementServerName = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteManagementServerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteManagementServerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServerAsync(ManagementServerName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteManagementServerAsync(ManagementServerName name, CallSettings callSettings = null)

Deletes a single ManagementServer.

Parameters
Name Description
name ManagementServerName

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ManagementServerName name = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteManagementServerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteManagementServerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServerAsync(ManagementServerName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteManagementServerAsync(ManagementServerName name, CancellationToken cancellationToken)

Deletes a single ManagementServer.

Parameters
Name Description
name ManagementServerName

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ManagementServerName name = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteManagementServerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteManagementServerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServerAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteManagementServerAsync(string name, CallSettings callSettings = null)

Deletes a single ManagementServer.

Parameters
Name Description
name string

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/managementServers/[MANAGEMENTSERVER]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteManagementServerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteManagementServerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteManagementServerAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteManagementServerAsync(string name, CancellationToken cancellationToken)

Deletes a single ManagementServer.

Parameters
Name Description
name string

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/managementServers/[MANAGEMENTSERVER]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.DeleteManagementServerAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceDeleteManagementServerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

FetchAccessToken(DataSourceName, CallSettings)

public virtual FetchAccessTokenResponse FetchAccessToken(DataSourceName name, CallSettings callSettings = null)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
name DataSourceName

Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects//locations//backupVaults/*/dataSources'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
FetchAccessTokenResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
FetchAccessTokenResponse response = backupDRClient.FetchAccessToken(name);

FetchAccessToken(FetchAccessTokenRequest, CallSettings)

public virtual FetchAccessTokenResponse FetchAccessToken(FetchAccessTokenRequest request, CallSettings callSettings = null)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
request FetchAccessTokenRequest

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
FetchAccessTokenResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
FetchAccessTokenRequest request = new FetchAccessTokenRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    GenerationId = 0,
};
// Make the request
FetchAccessTokenResponse response = backupDRClient.FetchAccessToken(request);

FetchAccessToken(string, CallSettings)

public virtual FetchAccessTokenResponse FetchAccessToken(string name, CallSettings callSettings = null)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
name string

Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects//locations//backupVaults/*/dataSources'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
FetchAccessTokenResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
FetchAccessTokenResponse response = backupDRClient.FetchAccessToken(name);

FetchAccessTokenAsync(DataSourceName, CallSettings)

public virtual Task<FetchAccessTokenResponse> FetchAccessTokenAsync(DataSourceName name, CallSettings callSettings = null)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
name DataSourceName

Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects//locations//backupVaults/*/dataSources'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFetchAccessTokenResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
FetchAccessTokenResponse response = await backupDRClient.FetchAccessTokenAsync(name);

FetchAccessTokenAsync(DataSourceName, CancellationToken)

public virtual Task<FetchAccessTokenResponse> FetchAccessTokenAsync(DataSourceName name, CancellationToken cancellationToken)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
name DataSourceName

Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects//locations//backupVaults/*/dataSources'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFetchAccessTokenResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
FetchAccessTokenResponse response = await backupDRClient.FetchAccessTokenAsync(name);

FetchAccessTokenAsync(FetchAccessTokenRequest, CallSettings)

public virtual Task<FetchAccessTokenResponse> FetchAccessTokenAsync(FetchAccessTokenRequest request, CallSettings callSettings = null)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
request FetchAccessTokenRequest

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
TaskFetchAccessTokenResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
FetchAccessTokenRequest request = new FetchAccessTokenRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    GenerationId = 0,
};
// Make the request
FetchAccessTokenResponse response = await backupDRClient.FetchAccessTokenAsync(request);

FetchAccessTokenAsync(FetchAccessTokenRequest, CancellationToken)

public virtual Task<FetchAccessTokenResponse> FetchAccessTokenAsync(FetchAccessTokenRequest request, CancellationToken cancellationToken)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
request FetchAccessTokenRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFetchAccessTokenResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
FetchAccessTokenRequest request = new FetchAccessTokenRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    GenerationId = 0,
};
// Make the request
FetchAccessTokenResponse response = await backupDRClient.FetchAccessTokenAsync(request);

FetchAccessTokenAsync(string, CallSettings)

public virtual Task<FetchAccessTokenResponse> FetchAccessTokenAsync(string name, CallSettings callSettings = null)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
name string

Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects//locations//backupVaults/*/dataSources'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFetchAccessTokenResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
FetchAccessTokenResponse response = await backupDRClient.FetchAccessTokenAsync(name);

FetchAccessTokenAsync(string, CancellationToken)

public virtual Task<FetchAccessTokenResponse> FetchAccessTokenAsync(string name, CancellationToken cancellationToken)

Internal only. Fetch access token for a given data source.

Parameters
Name Description
name string

Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects//locations//backupVaults/*/dataSources'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFetchAccessTokenResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
FetchAccessTokenResponse response = await backupDRClient.FetchAccessTokenAsync(name);

FetchUsableBackupVaults(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<FetchUsableBackupVaultsResponse, BackupVault> FetchUsableBackupVaults(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableFetchUsableBackupVaultsResponseBackupVault

A pageable sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<FetchUsableBackupVaultsResponse, BackupVault> response = backupDRClient.FetchUsableBackupVaults(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupVault item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (FetchUsableBackupVaultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FetchUsableBackupVaults(FetchUsableBackupVaultsRequest, CallSettings)

public virtual PagedEnumerable<FetchUsableBackupVaultsResponse, BackupVault> FetchUsableBackupVaults(FetchUsableBackupVaultsRequest request, CallSettings callSettings = null)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Parameters
Name Description
request FetchUsableBackupVaultsRequest

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
PagedEnumerableFetchUsableBackupVaultsResponseBackupVault

A pageable sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
FetchUsableBackupVaultsRequest request = new FetchUsableBackupVaultsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<FetchUsableBackupVaultsResponse, BackupVault> response = backupDRClient.FetchUsableBackupVaults(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupVault item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (FetchUsableBackupVaultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FetchUsableBackupVaults(string, string, int?, CallSettings)

public virtual PagedEnumerable<FetchUsableBackupVaultsResponse, BackupVault> FetchUsableBackupVaults(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableFetchUsableBackupVaultsResponseBackupVault

A pageable sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<FetchUsableBackupVaultsResponse, BackupVault> response = backupDRClient.FetchUsableBackupVaults(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupVault item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (FetchUsableBackupVaultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FetchUsableBackupVaultsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<FetchUsableBackupVaultsResponse, BackupVault> FetchUsableBackupVaultsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableFetchUsableBackupVaultsResponseBackupVault

A pageable asynchronous sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<FetchUsableBackupVaultsResponse, BackupVault> response = backupDRClient.FetchUsableBackupVaultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupVault item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchUsableBackupVaultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FetchUsableBackupVaultsAsync(FetchUsableBackupVaultsRequest, CallSettings)

public virtual PagedAsyncEnumerable<FetchUsableBackupVaultsResponse, BackupVault> FetchUsableBackupVaultsAsync(FetchUsableBackupVaultsRequest request, CallSettings callSettings = null)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Parameters
Name Description
request FetchUsableBackupVaultsRequest

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
PagedAsyncEnumerableFetchUsableBackupVaultsResponseBackupVault

A pageable asynchronous sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
FetchUsableBackupVaultsRequest request = new FetchUsableBackupVaultsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<FetchUsableBackupVaultsResponse, BackupVault> response = backupDRClient.FetchUsableBackupVaultsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupVault item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchUsableBackupVaultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FetchUsableBackupVaultsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<FetchUsableBackupVaultsResponse, BackupVault> FetchUsableBackupVaultsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableFetchUsableBackupVaultsResponseBackupVault

A pageable asynchronous sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<FetchUsableBackupVaultsResponse, BackupVault> response = backupDRClient.FetchUsableBackupVaultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupVault item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchUsableBackupVaultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FinalizeBackup(DataSourceName, CallSettings)

public virtual Operation<Backup, OperationMetadata> FinalizeBackup(DataSourceName dataSource, CallSettings callSettings = null)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.FinalizeBackup(dataSource);

// 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 = backupDRClient.PollOnceFinalizeBackup(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;
}

FinalizeBackup(FinalizeBackupRequest, CallSettings)

public virtual Operation<Backup, OperationMetadata> FinalizeBackup(FinalizeBackupRequest request, CallSettings callSettings = null)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
request FinalizeBackupRequest

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
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
FinalizeBackupRequest request = new FinalizeBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Description = "",
    ConsistencyTime = new Timestamp(),
    RequestId = "",
    BackupId = "",
    RecoveryRangeStartTime = new Timestamp(),
    RecoveryRangeEndTime = new Timestamp(),
    RetentionDuration = new Duration(),
};
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.FinalizeBackup(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 = backupDRClient.PollOnceFinalizeBackup(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;
}

FinalizeBackup(string, CallSettings)

public virtual Operation<Backup, OperationMetadata> FinalizeBackup(string dataSource, CallSettings callSettings = null)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.FinalizeBackup(dataSource);

// 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 = backupDRClient.PollOnceFinalizeBackup(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;
}

FinalizeBackupAsync(DataSourceName, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> FinalizeBackupAsync(DataSourceName dataSource, CallSettings callSettings = null)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.FinalizeBackupAsync(dataSource);

// 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 backupDRClient.PollOnceFinalizeBackupAsync(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;
}

FinalizeBackupAsync(DataSourceName, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> FinalizeBackupAsync(DataSourceName dataSource, CancellationToken cancellationToken)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.FinalizeBackupAsync(dataSource);

// 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 backupDRClient.PollOnceFinalizeBackupAsync(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;
}

FinalizeBackupAsync(FinalizeBackupRequest, CallSettings)

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

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
request FinalizeBackupRequest

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
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
FinalizeBackupRequest request = new FinalizeBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Description = "",
    ConsistencyTime = new Timestamp(),
    RequestId = "",
    BackupId = "",
    RecoveryRangeStartTime = new Timestamp(),
    RecoveryRangeEndTime = new Timestamp(),
    RetentionDuration = new Duration(),
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.FinalizeBackupAsync(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 backupDRClient.PollOnceFinalizeBackupAsync(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;
}

FinalizeBackupAsync(FinalizeBackupRequest, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> FinalizeBackupAsync(FinalizeBackupRequest request, CancellationToken cancellationToken)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
request FinalizeBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
FinalizeBackupRequest request = new FinalizeBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Description = "",
    ConsistencyTime = new Timestamp(),
    RequestId = "",
    BackupId = "",
    RecoveryRangeStartTime = new Timestamp(),
    RecoveryRangeEndTime = new Timestamp(),
    RetentionDuration = new Duration(),
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.FinalizeBackupAsync(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 backupDRClient.PollOnceFinalizeBackupAsync(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;
}

FinalizeBackupAsync(string, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> FinalizeBackupAsync(string dataSource, CallSettings callSettings = null)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.FinalizeBackupAsync(dataSource);

// 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 backupDRClient.PollOnceFinalizeBackupAsync(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;
}

FinalizeBackupAsync(string, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> FinalizeBackupAsync(string dataSource, CancellationToken cancellationToken)

Internal only. Finalize a backup that was started by a call to InitiateBackup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.FinalizeBackupAsync(dataSource);

// 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 backupDRClient.PollOnceFinalizeBackupAsync(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;
}

GetBackup(BackupName, CallSettings)

public virtual Backup GetBackup(BackupName name, CallSettings callSettings = null)

Gets details of a Backup.

Parameters
Name Description
name BackupName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Backup

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Backup response = backupDRClient.GetBackup(name);

GetBackup(GetBackupRequest, CallSettings)

public virtual Backup GetBackup(GetBackupRequest request, CallSettings callSettings = null)

Gets details of a Backup.

Parameters
Name Description
request GetBackupRequest

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
Backup

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    View = BackupView.Unspecified,
};
// Make the request
Backup response = backupDRClient.GetBackup(request);

GetBackup(string, CallSettings)

public virtual Backup GetBackup(string name, CallSettings callSettings = null)

Gets details of a Backup.

Parameters
Name Description
name string

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Backup

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Backup response = backupDRClient.GetBackup(name);

GetBackupAsync(BackupName, CallSettings)

public virtual Task<Backup> GetBackupAsync(BackupName name, CallSettings callSettings = null)

Gets details of a Backup.

Parameters
Name Description
name BackupName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Backup response = await backupDRClient.GetBackupAsync(name);

GetBackupAsync(BackupName, CancellationToken)

public virtual Task<Backup> GetBackupAsync(BackupName name, CancellationToken cancellationToken)

Gets details of a Backup.

Parameters
Name Description
name BackupName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Backup response = await backupDRClient.GetBackupAsync(name);

GetBackupAsync(GetBackupRequest, CallSettings)

public virtual Task<Backup> GetBackupAsync(GetBackupRequest request, CallSettings callSettings = null)

Gets details of a Backup.

Parameters
Name Description
request GetBackupRequest

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
TaskBackup

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    View = BackupView.Unspecified,
};
// Make the request
Backup response = await backupDRClient.GetBackupAsync(request);

GetBackupAsync(GetBackupRequest, CancellationToken)

public virtual Task<Backup> GetBackupAsync(GetBackupRequest request, CancellationToken cancellationToken)

Gets details of a Backup.

Parameters
Name Description
request GetBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    View = BackupView.Unspecified,
};
// Make the request
Backup response = await backupDRClient.GetBackupAsync(request);

GetBackupAsync(string, CallSettings)

public virtual Task<Backup> GetBackupAsync(string name, CallSettings callSettings = null)

Gets details of a Backup.

Parameters
Name Description
name string

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Backup response = await backupDRClient.GetBackupAsync(name);

GetBackupAsync(string, CancellationToken)

public virtual Task<Backup> GetBackupAsync(string name, CancellationToken cancellationToken)

Gets details of a Backup.

Parameters
Name Description
name string

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Backup response = await backupDRClient.GetBackupAsync(name);

GetBackupPlan(BackupPlanName, CallSettings)

public virtual BackupPlan GetBackupPlan(BackupPlanName name, CallSettings callSettings = null)

Gets details of a single BackupPlan.

Parameters
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupPlan

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupPlanName name = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
// Make the request
BackupPlan response = backupDRClient.GetBackupPlan(name);

GetBackupPlan(GetBackupPlanRequest, CallSettings)

public virtual BackupPlan GetBackupPlan(GetBackupPlanRequest request, CallSettings callSettings = null)

Gets details of a single BackupPlan.

Parameters
Name Description
request GetBackupPlanRequest

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
BackupPlan

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
GetBackupPlanRequest request = new GetBackupPlanRequest
{
    BackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
};
// Make the request
BackupPlan response = backupDRClient.GetBackupPlan(request);

GetBackupPlan(string, CallSettings)

public virtual BackupPlan GetBackupPlan(string name, CallSettings callSettings = null)

Gets details of a single BackupPlan.

Parameters
Name Description
name string

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupPlan

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
// Make the request
BackupPlan response = backupDRClient.GetBackupPlan(name);

GetBackupPlanAssociation(BackupPlanAssociationName, CallSettings)

public virtual BackupPlanAssociation GetBackupPlanAssociation(BackupPlanAssociationName name, CallSettings callSettings = null)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupPlanAssociation

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
// Make the request
BackupPlanAssociation response = backupDRClient.GetBackupPlanAssociation(name);

GetBackupPlanAssociation(GetBackupPlanAssociationRequest, CallSettings)

public virtual BackupPlanAssociation GetBackupPlanAssociation(GetBackupPlanAssociationRequest request, CallSettings callSettings = null)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
request GetBackupPlanAssociationRequest

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
BackupPlanAssociation

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
GetBackupPlanAssociationRequest request = new GetBackupPlanAssociationRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
};
// Make the request
BackupPlanAssociation response = backupDRClient.GetBackupPlanAssociation(request);

GetBackupPlanAssociation(string, CallSettings)

public virtual BackupPlanAssociation GetBackupPlanAssociation(string name, CallSettings callSettings = null)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupPlanAssociation

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
// Make the request
BackupPlanAssociation response = backupDRClient.GetBackupPlanAssociation(name);

GetBackupPlanAssociationAsync(BackupPlanAssociationName, CallSettings)

public virtual Task<BackupPlanAssociation> GetBackupPlanAssociationAsync(BackupPlanAssociationName name, CallSettings callSettings = null)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupPlanAssociation

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
// Make the request
BackupPlanAssociation response = await backupDRClient.GetBackupPlanAssociationAsync(name);

GetBackupPlanAssociationAsync(BackupPlanAssociationName, CancellationToken)

public virtual Task<BackupPlanAssociation> GetBackupPlanAssociationAsync(BackupPlanAssociationName name, CancellationToken cancellationToken)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupPlanAssociation

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
// Make the request
BackupPlanAssociation response = await backupDRClient.GetBackupPlanAssociationAsync(name);

GetBackupPlanAssociationAsync(GetBackupPlanAssociationRequest, CallSettings)

public virtual Task<BackupPlanAssociation> GetBackupPlanAssociationAsync(GetBackupPlanAssociationRequest request, CallSettings callSettings = null)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
request GetBackupPlanAssociationRequest

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
TaskBackupPlanAssociation

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupPlanAssociationRequest request = new GetBackupPlanAssociationRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
};
// Make the request
BackupPlanAssociation response = await backupDRClient.GetBackupPlanAssociationAsync(request);

GetBackupPlanAssociationAsync(GetBackupPlanAssociationRequest, CancellationToken)

public virtual Task<BackupPlanAssociation> GetBackupPlanAssociationAsync(GetBackupPlanAssociationRequest request, CancellationToken cancellationToken)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
request GetBackupPlanAssociationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupPlanAssociation

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupPlanAssociationRequest request = new GetBackupPlanAssociationRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
};
// Make the request
BackupPlanAssociation response = await backupDRClient.GetBackupPlanAssociationAsync(request);

GetBackupPlanAssociationAsync(string, CallSettings)

public virtual Task<BackupPlanAssociation> GetBackupPlanAssociationAsync(string name, CallSettings callSettings = null)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupPlanAssociation

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
// Make the request
BackupPlanAssociation response = await backupDRClient.GetBackupPlanAssociationAsync(name);

GetBackupPlanAssociationAsync(string, CancellationToken)

public virtual Task<BackupPlanAssociation> GetBackupPlanAssociationAsync(string name, CancellationToken cancellationToken)

Gets details of a single BackupPlanAssociation.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupPlanAssociation

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
// Make the request
BackupPlanAssociation response = await backupDRClient.GetBackupPlanAssociationAsync(name);

GetBackupPlanAsync(BackupPlanName, CallSettings)

public virtual Task<BackupPlan> GetBackupPlanAsync(BackupPlanName name, CallSettings callSettings = null)

Gets details of a single BackupPlan.

Parameters
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupPlan

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanName name = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
// Make the request
BackupPlan response = await backupDRClient.GetBackupPlanAsync(name);

GetBackupPlanAsync(BackupPlanName, CancellationToken)

public virtual Task<BackupPlan> GetBackupPlanAsync(BackupPlanName name, CancellationToken cancellationToken)

Gets details of a single BackupPlan.

Parameters
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupPlan

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanName name = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
// Make the request
BackupPlan response = await backupDRClient.GetBackupPlanAsync(name);

GetBackupPlanAsync(GetBackupPlanRequest, CallSettings)

public virtual Task<BackupPlan> GetBackupPlanAsync(GetBackupPlanRequest request, CallSettings callSettings = null)

Gets details of a single BackupPlan.

Parameters
Name Description
request GetBackupPlanRequest

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
TaskBackupPlan

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupPlanRequest request = new GetBackupPlanRequest
{
    BackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
};
// Make the request
BackupPlan response = await backupDRClient.GetBackupPlanAsync(request);

GetBackupPlanAsync(GetBackupPlanRequest, CancellationToken)

public virtual Task<BackupPlan> GetBackupPlanAsync(GetBackupPlanRequest request, CancellationToken cancellationToken)

Gets details of a single BackupPlan.

Parameters
Name Description
request GetBackupPlanRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupPlan

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupPlanRequest request = new GetBackupPlanRequest
{
    BackupPlanName = BackupPlanName.FromProjectLocationBackupPlan("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"),
};
// Make the request
BackupPlan response = await backupDRClient.GetBackupPlanAsync(request);

GetBackupPlanAsync(string, CallSettings)

public virtual Task<BackupPlan> GetBackupPlanAsync(string name, CallSettings callSettings = null)

Gets details of a single BackupPlan.

Parameters
Name Description
name string

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupPlan

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
// Make the request
BackupPlan response = await backupDRClient.GetBackupPlanAsync(name);

GetBackupPlanAsync(string, CancellationToken)

public virtual Task<BackupPlan> GetBackupPlanAsync(string name, CancellationToken cancellationToken)

Gets details of a single BackupPlan.

Parameters
Name Description
name string

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupPlan

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlans/[BACKUP_PLAN]";
// Make the request
BackupPlan response = await backupDRClient.GetBackupPlanAsync(name);

GetBackupVault(BackupVaultName, CallSettings)

public virtual BackupVault GetBackupVault(BackupVaultName name, CallSettings callSettings = null)

Gets details of a BackupVault.

Parameters
Name Description
name BackupVaultName

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupVault

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupVaultName name = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
BackupVault response = backupDRClient.GetBackupVault(name);

GetBackupVault(GetBackupVaultRequest, CallSettings)

public virtual BackupVault GetBackupVault(GetBackupVaultRequest request, CallSettings callSettings = null)

Gets details of a BackupVault.

Parameters
Name Description
request GetBackupVaultRequest

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
BackupVault

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
GetBackupVaultRequest request = new GetBackupVaultRequest
{
    BackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    View = BackupVaultView.Unspecified,
};
// Make the request
BackupVault response = backupDRClient.GetBackupVault(request);

GetBackupVault(string, CallSettings)

public virtual BackupVault GetBackupVault(string name, CallSettings callSettings = null)

Gets details of a BackupVault.

Parameters
Name Description
name string

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BackupVault

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
BackupVault response = backupDRClient.GetBackupVault(name);

GetBackupVaultAsync(BackupVaultName, CallSettings)

public virtual Task<BackupVault> GetBackupVaultAsync(BackupVaultName name, CallSettings callSettings = null)

Gets details of a BackupVault.

Parameters
Name Description
name BackupVaultName

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupVault

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVaultName name = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
BackupVault response = await backupDRClient.GetBackupVaultAsync(name);

GetBackupVaultAsync(BackupVaultName, CancellationToken)

public virtual Task<BackupVault> GetBackupVaultAsync(BackupVaultName name, CancellationToken cancellationToken)

Gets details of a BackupVault.

Parameters
Name Description
name BackupVaultName

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupVault

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVaultName name = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
BackupVault response = await backupDRClient.GetBackupVaultAsync(name);

GetBackupVaultAsync(GetBackupVaultRequest, CallSettings)

public virtual Task<BackupVault> GetBackupVaultAsync(GetBackupVaultRequest request, CallSettings callSettings = null)

Gets details of a BackupVault.

Parameters
Name Description
request GetBackupVaultRequest

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
TaskBackupVault

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupVaultRequest request = new GetBackupVaultRequest
{
    BackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    View = BackupVaultView.Unspecified,
};
// Make the request
BackupVault response = await backupDRClient.GetBackupVaultAsync(request);

GetBackupVaultAsync(GetBackupVaultRequest, CancellationToken)

public virtual Task<BackupVault> GetBackupVaultAsync(GetBackupVaultRequest request, CancellationToken cancellationToken)

Gets details of a BackupVault.

Parameters
Name Description
request GetBackupVaultRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupVault

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetBackupVaultRequest request = new GetBackupVaultRequest
{
    BackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    View = BackupVaultView.Unspecified,
};
// Make the request
BackupVault response = await backupDRClient.GetBackupVaultAsync(request);

GetBackupVaultAsync(string, CallSettings)

public virtual Task<BackupVault> GetBackupVaultAsync(string name, CallSettings callSettings = null)

Gets details of a BackupVault.

Parameters
Name Description
name string

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBackupVault

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
BackupVault response = await backupDRClient.GetBackupVaultAsync(name);

GetBackupVaultAsync(string, CancellationToken)

public virtual Task<BackupVault> GetBackupVaultAsync(string name, CancellationToken cancellationToken)

Gets details of a BackupVault.

Parameters
Name Description
name string

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackupVault

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
BackupVault response = await backupDRClient.GetBackupVaultAsync(name);

GetDataSource(DataSourceName, CallSettings)

public virtual DataSource GetDataSource(DataSourceName name, CallSettings callSettings = null)

Gets details of a DataSource.

Parameters
Name Description
name DataSourceName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataSource

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
DataSource response = backupDRClient.GetDataSource(name);

GetDataSource(GetDataSourceRequest, CallSettings)

public virtual DataSource GetDataSource(GetDataSourceRequest request, CallSettings callSettings = null)

Gets details of a DataSource.

Parameters
Name Description
request GetDataSourceRequest

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
DataSource

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
GetDataSourceRequest request = new GetDataSourceRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
};
// Make the request
DataSource response = backupDRClient.GetDataSource(request);

GetDataSource(string, CallSettings)

public virtual DataSource GetDataSource(string name, CallSettings callSettings = null)

Gets details of a DataSource.

Parameters
Name Description
name string

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DataSource

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
DataSource response = backupDRClient.GetDataSource(name);

GetDataSourceAsync(DataSourceName, CallSettings)

public virtual Task<DataSource> GetDataSourceAsync(DataSourceName name, CallSettings callSettings = null)

Gets details of a DataSource.

Parameters
Name Description
name DataSourceName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDataSource

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
DataSource response = await backupDRClient.GetDataSourceAsync(name);

GetDataSourceAsync(DataSourceName, CancellationToken)

public virtual Task<DataSource> GetDataSourceAsync(DataSourceName name, CancellationToken cancellationToken)

Gets details of a DataSource.

Parameters
Name Description
name DataSourceName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataSource

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
DataSource response = await backupDRClient.GetDataSourceAsync(name);

GetDataSourceAsync(GetDataSourceRequest, CallSettings)

public virtual Task<DataSource> GetDataSourceAsync(GetDataSourceRequest request, CallSettings callSettings = null)

Gets details of a DataSource.

Parameters
Name Description
request GetDataSourceRequest

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
TaskDataSource

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetDataSourceRequest request = new GetDataSourceRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
};
// Make the request
DataSource response = await backupDRClient.GetDataSourceAsync(request);

GetDataSourceAsync(GetDataSourceRequest, CancellationToken)

public virtual Task<DataSource> GetDataSourceAsync(GetDataSourceRequest request, CancellationToken cancellationToken)

Gets details of a DataSource.

Parameters
Name Description
request GetDataSourceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataSource

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetDataSourceRequest request = new GetDataSourceRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
};
// Make the request
DataSource response = await backupDRClient.GetDataSourceAsync(request);

GetDataSourceAsync(string, CallSettings)

public virtual Task<DataSource> GetDataSourceAsync(string name, CallSettings callSettings = null)

Gets details of a DataSource.

Parameters
Name Description
name string

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDataSource

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
DataSource response = await backupDRClient.GetDataSourceAsync(name);

GetDataSourceAsync(string, CancellationToken)

public virtual Task<DataSource> GetDataSourceAsync(string name, CancellationToken cancellationToken)

Gets details of a DataSource.

Parameters
Name Description
name string

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDataSource

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
DataSource response = await backupDRClient.GetDataSourceAsync(name);

GetManagementServer(GetManagementServerRequest, CallSettings)

public virtual ManagementServer GetManagementServer(GetManagementServerRequest request, CallSettings callSettings = null)

Gets details of a single ManagementServer.

Parameters
Name Description
request GetManagementServerRequest

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
ManagementServer

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
GetManagementServerRequest request = new GetManagementServerRequest
{
    ManagementServerName = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"),
};
// Make the request
ManagementServer response = backupDRClient.GetManagementServer(request);

GetManagementServer(ManagementServerName, CallSettings)

public virtual ManagementServer GetManagementServer(ManagementServerName name, CallSettings callSettings = null)

Gets details of a single ManagementServer.

Parameters
Name Description
name ManagementServerName

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ManagementServer

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ManagementServerName name = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
// Make the request
ManagementServer response = backupDRClient.GetManagementServer(name);

GetManagementServer(string, CallSettings)

public virtual ManagementServer GetManagementServer(string name, CallSettings callSettings = null)

Gets details of a single ManagementServer.

Parameters
Name Description
name string

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ManagementServer

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/managementServers/[MANAGEMENTSERVER]";
// Make the request
ManagementServer response = backupDRClient.GetManagementServer(name);

GetManagementServerAsync(GetManagementServerRequest, CallSettings)

public virtual Task<ManagementServer> GetManagementServerAsync(GetManagementServerRequest request, CallSettings callSettings = null)

Gets details of a single ManagementServer.

Parameters
Name Description
request GetManagementServerRequest

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
TaskManagementServer

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetManagementServerRequest request = new GetManagementServerRequest
{
    ManagementServerName = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"),
};
// Make the request
ManagementServer response = await backupDRClient.GetManagementServerAsync(request);

GetManagementServerAsync(GetManagementServerRequest, CancellationToken)

public virtual Task<ManagementServer> GetManagementServerAsync(GetManagementServerRequest request, CancellationToken cancellationToken)

Gets details of a single ManagementServer.

Parameters
Name Description
request GetManagementServerRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagementServer

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
GetManagementServerRequest request = new GetManagementServerRequest
{
    ManagementServerName = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"),
};
// Make the request
ManagementServer response = await backupDRClient.GetManagementServerAsync(request);

GetManagementServerAsync(ManagementServerName, CallSettings)

public virtual Task<ManagementServer> GetManagementServerAsync(ManagementServerName name, CallSettings callSettings = null)

Gets details of a single ManagementServer.

Parameters
Name Description
name ManagementServerName

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskManagementServer

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ManagementServerName name = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
// Make the request
ManagementServer response = await backupDRClient.GetManagementServerAsync(name);

GetManagementServerAsync(ManagementServerName, CancellationToken)

public virtual Task<ManagementServer> GetManagementServerAsync(ManagementServerName name, CancellationToken cancellationToken)

Gets details of a single ManagementServer.

Parameters
Name Description
name ManagementServerName

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagementServer

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ManagementServerName name = ManagementServerName.FromProjectLocationManagementserver("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
// Make the request
ManagementServer response = await backupDRClient.GetManagementServerAsync(name);

GetManagementServerAsync(string, CallSettings)

public virtual Task<ManagementServer> GetManagementServerAsync(string name, CallSettings callSettings = null)

Gets details of a single ManagementServer.

Parameters
Name Description
name string

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskManagementServer

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/managementServers/[MANAGEMENTSERVER]";
// Make the request
ManagementServer response = await backupDRClient.GetManagementServerAsync(name);

GetManagementServerAsync(string, CancellationToken)

public virtual Task<ManagementServer> GetManagementServerAsync(string name, CancellationToken cancellationToken)

Gets details of a single ManagementServer.

Parameters
Name Description
name string

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskManagementServer

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/managementServers/[MANAGEMENTSERVER]";
// Make the request
ManagementServer response = await backupDRClient.GetManagementServerAsync(name);

InitiateBackup(DataSourceName, CallSettings)

public virtual InitiateBackupResponse InitiateBackup(DataSourceName dataSource, CallSettings callSettings = null)

Internal only. Initiates a backup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InitiateBackupResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
InitiateBackupResponse response = backupDRClient.InitiateBackup(dataSource);

InitiateBackup(InitiateBackupRequest, CallSettings)

public virtual InitiateBackupResponse InitiateBackup(InitiateBackupRequest request, CallSettings callSettings = null)

Internal only. Initiates a backup.

Parameters
Name Description
request InitiateBackupRequest

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
InitiateBackupResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
InitiateBackupRequest request = new InitiateBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
    BackupId = "",
};
// Make the request
InitiateBackupResponse response = backupDRClient.InitiateBackup(request);

InitiateBackup(string, CallSettings)

public virtual InitiateBackupResponse InitiateBackup(string dataSource, CallSettings callSettings = null)

Internal only. Initiates a backup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InitiateBackupResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
InitiateBackupResponse response = backupDRClient.InitiateBackup(dataSource);

InitiateBackupAsync(DataSourceName, CallSettings)

public virtual Task<InitiateBackupResponse> InitiateBackupAsync(DataSourceName dataSource, CallSettings callSettings = null)

Internal only. Initiates a backup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInitiateBackupResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
InitiateBackupResponse response = await backupDRClient.InitiateBackupAsync(dataSource);

InitiateBackupAsync(DataSourceName, CancellationToken)

public virtual Task<InitiateBackupResponse> InitiateBackupAsync(DataSourceName dataSource, CancellationToken cancellationToken)

Internal only. Initiates a backup.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInitiateBackupResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
InitiateBackupResponse response = await backupDRClient.InitiateBackupAsync(dataSource);

InitiateBackupAsync(InitiateBackupRequest, CallSettings)

public virtual Task<InitiateBackupResponse> InitiateBackupAsync(InitiateBackupRequest request, CallSettings callSettings = null)

Internal only. Initiates a backup.

Parameters
Name Description
request InitiateBackupRequest

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
TaskInitiateBackupResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
InitiateBackupRequest request = new InitiateBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
    BackupId = "",
};
// Make the request
InitiateBackupResponse response = await backupDRClient.InitiateBackupAsync(request);

InitiateBackupAsync(InitiateBackupRequest, CancellationToken)

public virtual Task<InitiateBackupResponse> InitiateBackupAsync(InitiateBackupRequest request, CancellationToken cancellationToken)

Internal only. Initiates a backup.

Parameters
Name Description
request InitiateBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInitiateBackupResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
InitiateBackupRequest request = new InitiateBackupRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
    BackupId = "",
};
// Make the request
InitiateBackupResponse response = await backupDRClient.InitiateBackupAsync(request);

InitiateBackupAsync(string, CallSettings)

public virtual Task<InitiateBackupResponse> InitiateBackupAsync(string dataSource, CallSettings callSettings = null)

Internal only. Initiates a backup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInitiateBackupResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
InitiateBackupResponse response = await backupDRClient.InitiateBackupAsync(dataSource);

InitiateBackupAsync(string, CancellationToken)

public virtual Task<InitiateBackupResponse> InitiateBackupAsync(string dataSource, CancellationToken cancellationToken)

Internal only. Initiates a backup.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInitiateBackupResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
InitiateBackupResponse response = await backupDRClient.InitiateBackupAsync(dataSource);

ListBackupPlanAssociations(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> ListBackupPlanAssociations(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlanAssociations in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve backup Plan Associations information, in the format projects/{project_id}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for example us-central1. To retrieve backup plan associations for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupPlanAssociationsResponseBackupPlanAssociation

A pageable sequence of BackupPlanAssociation resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> response = backupDRClient.ListBackupPlanAssociations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupPlanAssociation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupPlanAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlanAssociation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlanAssociation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlanAssociation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlanAssociations(ListBackupPlanAssociationsRequest, CallSettings)

public virtual PagedEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> ListBackupPlanAssociations(ListBackupPlanAssociationsRequest request, CallSettings callSettings = null)

Lists BackupPlanAssociations in a given project and location.

Parameters
Name Description
request ListBackupPlanAssociationsRequest

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
PagedEnumerableListBackupPlanAssociationsResponseBackupPlanAssociation

A pageable sequence of BackupPlanAssociation resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ListBackupPlanAssociationsRequest request = new ListBackupPlanAssociationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> response = backupDRClient.ListBackupPlanAssociations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupPlanAssociation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupPlanAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlanAssociation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlanAssociation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlanAssociation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlanAssociations(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> ListBackupPlanAssociations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlanAssociations in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backup Plan Associations information, in the format projects/{project_id}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for example us-central1. To retrieve backup plan associations for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupPlanAssociationsResponseBackupPlanAssociation

A pageable sequence of BackupPlanAssociation resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> response = backupDRClient.ListBackupPlanAssociations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupPlanAssociation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupPlanAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlanAssociation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlanAssociation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlanAssociation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlanAssociationsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> ListBackupPlanAssociationsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlanAssociations in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve backup Plan Associations information, in the format projects/{project_id}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for example us-central1. To retrieve backup plan associations for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupPlanAssociationsResponseBackupPlanAssociation

A pageable asynchronous sequence of BackupPlanAssociation resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> response = backupDRClient.ListBackupPlanAssociationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupPlanAssociation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupPlanAssociationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlanAssociation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlanAssociation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlanAssociation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlanAssociationsAsync(ListBackupPlanAssociationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> ListBackupPlanAssociationsAsync(ListBackupPlanAssociationsRequest request, CallSettings callSettings = null)

Lists BackupPlanAssociations in a given project and location.

Parameters
Name Description
request ListBackupPlanAssociationsRequest

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
PagedAsyncEnumerableListBackupPlanAssociationsResponseBackupPlanAssociation

A pageable asynchronous sequence of BackupPlanAssociation resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ListBackupPlanAssociationsRequest request = new ListBackupPlanAssociationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> response = backupDRClient.ListBackupPlanAssociationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupPlanAssociation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupPlanAssociationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlanAssociation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlanAssociation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlanAssociation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlanAssociationsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> ListBackupPlanAssociationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlanAssociations in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backup Plan Associations information, in the format projects/{project_id}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for example us-central1. To retrieve backup plan associations for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupPlanAssociationsResponseBackupPlanAssociation

A pageable asynchronous sequence of BackupPlanAssociation resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListBackupPlanAssociationsResponse, BackupPlanAssociation> response = backupDRClient.ListBackupPlanAssociationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupPlanAssociation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupPlanAssociationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlanAssociation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlanAssociation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlanAssociation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlans(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupPlansResponse, BackupPlan> ListBackupPlans(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlans in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for e.g. us-central1. To retrieve backup plans for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupPlansResponseBackupPlan

A pageable sequence of BackupPlan resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListBackupPlansResponse, BackupPlan> response = backupDRClient.ListBackupPlans(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupPlan item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupPlansResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlan item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlan> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlan item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlans(ListBackupPlansRequest, CallSettings)

public virtual PagedEnumerable<ListBackupPlansResponse, BackupPlan> ListBackupPlans(ListBackupPlansRequest request, CallSettings callSettings = null)

Lists BackupPlans in a given project and location.

Parameters
Name Description
request ListBackupPlansRequest

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
PagedEnumerableListBackupPlansResponseBackupPlan

A pageable sequence of BackupPlan resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ListBackupPlansRequest request = new ListBackupPlansRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListBackupPlansResponse, BackupPlan> response = backupDRClient.ListBackupPlans(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupPlan item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupPlansResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlan item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlan> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlan item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlans(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupPlansResponse, BackupPlan> ListBackupPlans(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlans in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for e.g. us-central1. To retrieve backup plans for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupPlansResponseBackupPlan

A pageable sequence of BackupPlan resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListBackupPlansResponse, BackupPlan> response = backupDRClient.ListBackupPlans(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupPlan item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupPlansResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlan item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlan> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlan item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlansAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupPlansResponse, BackupPlan> ListBackupPlansAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlans in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for e.g. us-central1. To retrieve backup plans for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupPlansResponseBackupPlan

A pageable asynchronous sequence of BackupPlan resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListBackupPlansResponse, BackupPlan> response = backupDRClient.ListBackupPlansAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupPlan item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupPlansResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlan item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlan> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlan item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlansAsync(ListBackupPlansRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupPlansResponse, BackupPlan> ListBackupPlansAsync(ListBackupPlansRequest request, CallSettings callSettings = null)

Lists BackupPlans in a given project and location.

Parameters
Name Description
request ListBackupPlansRequest

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
PagedAsyncEnumerableListBackupPlansResponseBackupPlan

A pageable asynchronous sequence of BackupPlan resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ListBackupPlansRequest request = new ListBackupPlansRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListBackupPlansResponse, BackupPlan> response = backupDRClient.ListBackupPlansAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupPlan item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupPlansResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlan item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlan> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlan item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupPlansAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupPlansResponse, BackupPlan> ListBackupPlansAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupPlans in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for e.g. us-central1. To retrieve backup plans for all locations, use "-" for the {location} value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupPlansResponseBackupPlan

A pageable asynchronous sequence of BackupPlan resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListBackupPlansResponse, BackupPlan> response = backupDRClient.ListBackupPlansAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupPlan item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupPlansResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupPlan item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupPlan> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupPlan item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupVaults(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupVaultsResponse, BackupVault> ListBackupVaults(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupVaults in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupVaultsResponseBackupVault

A pageable sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListBackupVaultsResponse, BackupVault> response = backupDRClient.ListBackupVaults(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupVault item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupVaultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupVaults(ListBackupVaultsRequest, CallSettings)

public virtual PagedEnumerable<ListBackupVaultsResponse, BackupVault> ListBackupVaults(ListBackupVaultsRequest request, CallSettings callSettings = null)

Lists BackupVaults in a given project and location.

Parameters
Name Description
request ListBackupVaultsRequest

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
PagedEnumerableListBackupVaultsResponseBackupVault

A pageable sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ListBackupVaultsRequest request = new ListBackupVaultsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
    View = BackupVaultView.Unspecified,
};
// Make the request
PagedEnumerable<ListBackupVaultsResponse, BackupVault> response = backupDRClient.ListBackupVaults(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupVault item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupVaultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupVaults(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupVaultsResponse, BackupVault> ListBackupVaults(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupVaults in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupVaultsResponseBackupVault

A pageable sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListBackupVaultsResponse, BackupVault> response = backupDRClient.ListBackupVaults(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (BackupVault item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupVaultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupVaultsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupVaultsResponse, BackupVault> ListBackupVaultsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupVaults in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupVaultsResponseBackupVault

A pageable asynchronous sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListBackupVaultsResponse, BackupVault> response = backupDRClient.ListBackupVaultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupVault item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupVaultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupVaultsAsync(ListBackupVaultsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupVaultsResponse, BackupVault> ListBackupVaultsAsync(ListBackupVaultsRequest request, CallSettings callSettings = null)

Lists BackupVaults in a given project and location.

Parameters
Name Description
request ListBackupVaultsRequest

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
PagedAsyncEnumerableListBackupVaultsResponseBackupVault

A pageable asynchronous sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ListBackupVaultsRequest request = new ListBackupVaultsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
    View = BackupVaultView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListBackupVaultsResponse, BackupVault> response = backupDRClient.ListBackupVaultsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupVault item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupVaultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupVaultsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupVaultsResponse, BackupVault> ListBackupVaultsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists BackupVaults in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupVaultsResponseBackupVault

A pageable asynchronous sequence of BackupVault resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListBackupVaultsResponse, BackupVault> response = backupDRClient.ListBackupVaultsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((BackupVault item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupVaultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (BackupVault item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<BackupVault> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (BackupVault item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackups(DataSourceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(DataSourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
parent DataSourceName

Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupsResponseBackup

A pageable sequence of Backup resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName parent = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = backupDRClient.ListBackups(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Backup item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Backup> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Backup item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackups(ListBackupsRequest, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(ListBackupsRequest request, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
request ListBackupsRequest

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
PagedEnumerableListBackupsResponseBackup

A pageable sequence of Backup resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ListBackupsRequest request = new ListBackupsRequest
{
    ParentAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Filter = "",
    OrderBy = "",
    View = BackupView.Unspecified,
};
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = backupDRClient.ListBackups(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Backup item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Backup> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Backup item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackups(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListBackupsResponseBackup

A pageable sequence of Backup resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = backupDRClient.ListBackups(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Backup item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListBackupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Backup> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Backup item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupsAsync(DataSourceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(DataSourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
parent DataSourceName

Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupsResponseBackup

A pageable asynchronous sequence of Backup resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName parent = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = backupDRClient.ListBackupsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Backup item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Backup> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Backup item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupsAsync(ListBackupsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(ListBackupsRequest request, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
request ListBackupsRequest

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
PagedAsyncEnumerableListBackupsResponseBackup

A pageable asynchronous sequence of Backup resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ListBackupsRequest request = new ListBackupsRequest
{
    ParentAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Filter = "",
    OrderBy = "",
    View = BackupView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = backupDRClient.ListBackupsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Backup item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Backup> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Backup item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListBackupsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListBackupsResponseBackup

A pageable asynchronous sequence of Backup resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = backupDRClient.ListBackupsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Backup item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListBackupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Backup item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Backup> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Backup item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDataSources(BackupVaultName, string, int?, CallSettings)

public virtual PagedEnumerable<ListDataSourcesResponse, DataSource> ListDataSources(BackupVaultName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DataSources in a given project and location.

Parameters
Name Description
parent BackupVaultName

Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDataSourcesResponseDataSource

A pageable sequence of DataSource resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupVaultName parent = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
PagedEnumerable<ListDataSourcesResponse, DataSource> response = backupDRClient.ListDataSources(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DataSource item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDataSourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataSource item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DataSource> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DataSource item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDataSources(ListDataSourcesRequest, CallSettings)

public virtual PagedEnumerable<ListDataSourcesResponse, DataSource> ListDataSources(ListDataSourcesRequest request, CallSettings callSettings = null)

Lists DataSources in a given project and location.

Parameters
Name Description
request ListDataSourcesRequest

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
PagedEnumerableListDataSourcesResponseDataSource

A pageable sequence of DataSource resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ListDataSourcesRequest request = new ListDataSourcesRequest
{
    ParentAsBackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListDataSourcesResponse, DataSource> response = backupDRClient.ListDataSources(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (DataSource item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDataSourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataSource item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DataSource> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DataSource item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDataSources(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListDataSourcesResponse, DataSource> ListDataSources(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DataSources in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDataSourcesResponseDataSource

A pageable sequence of DataSource resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
PagedEnumerable<ListDataSourcesResponse, DataSource> response = backupDRClient.ListDataSources(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DataSource item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDataSourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataSource item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DataSource> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DataSource item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDataSourcesAsync(BackupVaultName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDataSourcesResponse, DataSource> ListDataSourcesAsync(BackupVaultName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DataSources in a given project and location.

Parameters
Name Description
parent BackupVaultName

Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDataSourcesResponseDataSource

A pageable asynchronous sequence of DataSource resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVaultName parent = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
// Make the request
PagedAsyncEnumerable<ListDataSourcesResponse, DataSource> response = backupDRClient.ListDataSourcesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DataSource item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDataSourcesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataSource item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DataSource> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DataSource item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDataSourcesAsync(ListDataSourcesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListDataSourcesResponse, DataSource> ListDataSourcesAsync(ListDataSourcesRequest request, CallSettings callSettings = null)

Lists DataSources in a given project and location.

Parameters
Name Description
request ListDataSourcesRequest

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
PagedAsyncEnumerableListDataSourcesResponseDataSource

A pageable asynchronous sequence of DataSource resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ListDataSourcesRequest request = new ListDataSourcesRequest
{
    ParentAsBackupVaultName = BackupVaultName.FromProjectLocationBackupvault("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListDataSourcesResponse, DataSource> response = backupDRClient.ListDataSourcesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DataSource item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDataSourcesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataSource item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DataSource> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DataSource item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDataSourcesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDataSourcesResponse, DataSource> ListDataSourcesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DataSources in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDataSourcesResponseDataSource

A pageable asynchronous sequence of DataSource resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]";
// Make the request
PagedAsyncEnumerable<ListDataSourcesResponse, DataSource> response = backupDRClient.ListDataSourcesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DataSource item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDataSourcesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DataSource item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DataSource> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DataSource item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListManagementServers(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListManagementServersResponse, ManagementServer> ListManagementServers(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ManagementServers in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example us-central1. To retrieve management servers for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListManagementServersResponseManagementServer

A pageable sequence of ManagementServer resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListManagementServersResponse, ManagementServer> response = backupDRClient.ListManagementServers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ManagementServer item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListManagementServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ManagementServer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ManagementServer> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ManagementServer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListManagementServers(ListManagementServersRequest, CallSettings)

public virtual PagedEnumerable<ListManagementServersResponse, ManagementServer> ListManagementServers(ListManagementServersRequest request, CallSettings callSettings = null)

Lists ManagementServers in a given project and location.

Parameters
Name Description
request ListManagementServersRequest

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
PagedEnumerableListManagementServersResponseManagementServer

A pageable sequence of ManagementServer resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
ListManagementServersRequest request = new ListManagementServersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListManagementServersResponse, ManagementServer> response = backupDRClient.ListManagementServers(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ManagementServer item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListManagementServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ManagementServer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ManagementServer> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ManagementServer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListManagementServers(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListManagementServersResponse, ManagementServer> ListManagementServers(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ManagementServers in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example us-central1. To retrieve management servers for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListManagementServersResponseManagementServer

A pageable sequence of ManagementServer resources.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListManagementServersResponse, ManagementServer> response = backupDRClient.ListManagementServers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ManagementServer item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListManagementServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ManagementServer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ManagementServer> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ManagementServer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListManagementServersAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListManagementServersResponse, ManagementServer> ListManagementServersAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ManagementServers in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example us-central1. To retrieve management servers for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListManagementServersResponseManagementServer

A pageable asynchronous sequence of ManagementServer resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListManagementServersResponse, ManagementServer> response = backupDRClient.ListManagementServersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ManagementServer item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListManagementServersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ManagementServer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ManagementServer> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ManagementServer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListManagementServersAsync(ListManagementServersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListManagementServersResponse, ManagementServer> ListManagementServersAsync(ListManagementServersRequest request, CallSettings callSettings = null)

Lists ManagementServers in a given project and location.

Parameters
Name Description
request ListManagementServersRequest

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
PagedAsyncEnumerableListManagementServersResponseManagementServer

A pageable asynchronous sequence of ManagementServer resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
ListManagementServersRequest request = new ListManagementServersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListManagementServersResponse, ManagementServer> response = backupDRClient.ListManagementServersAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ManagementServer item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListManagementServersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ManagementServer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ManagementServer> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ManagementServer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListManagementServersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListManagementServersResponse, ManagementServer> ListManagementServersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ManagementServers in a given project and location.

Parameters
Name Description
parent string

Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example us-central1. To retrieve management servers for all locations, use "-" for the '{location}' value.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListManagementServersResponseManagementServer

A pageable asynchronous sequence of ManagementServer resources.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListManagementServersResponse, ManagementServer> response = backupDRClient.ListManagementServersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ManagementServer item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListManagementServersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ManagementServer item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ManagementServer> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ManagementServer item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceAbandonBackup(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceAbandonBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceAbandonBackupAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceAbandonBackupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateBackupPlan(string, CallSettings)

public virtual Operation<BackupPlan, OperationMetadata> PollOnceCreateBackupPlan(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanOperationMetadata

The result of polling the operation.

PollOnceCreateBackupPlanAssociation(string, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> PollOnceCreateBackupPlanAssociation(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanAssociationOperationMetadata

The result of polling the operation.

PollOnceCreateBackupPlanAssociationAsync(string, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> PollOnceCreateBackupPlanAssociationAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateBackupPlanAsync(string, CallSettings)

public virtual Task<Operation<BackupPlan, OperationMetadata>> PollOnceCreateBackupPlanAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateBackupVault(string, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> PollOnceCreateBackupVault(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupVaultOperationMetadata

The result of polling the operation.

PollOnceCreateBackupVaultAsync(string, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> PollOnceCreateBackupVaultAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateManagementServer(string, CallSettings)

public virtual Operation<ManagementServer, OperationMetadata> PollOnceCreateManagementServer(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationManagementServerOperationMetadata

The result of polling the operation.

PollOnceCreateManagementServerAsync(string, CallSettings)

public virtual Task<Operation<ManagementServer, OperationMetadata>> PollOnceCreateManagementServerAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationManagementServerOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteBackup(string, CallSettings)

public virtual Operation<Backup, OperationMetadata> PollOnceDeleteBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The result of polling the operation.

PollOnceDeleteBackupAsync(string, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> PollOnceDeleteBackupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteBackupPlan(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteBackupPlan(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteBackupPlanAssociation(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteBackupPlanAssociation(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteBackupPlanAssociationAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteBackupPlanAssociationAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteBackupPlanAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteBackupPlanAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteBackupVault(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteBackupVault(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteBackupVaultAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteBackupVaultAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteManagementServer(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteManagementServer(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteManagementServerAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteManagementServerAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceFinalizeBackup(string, CallSettings)

public virtual Operation<Backup, OperationMetadata> PollOnceFinalizeBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The result of polling the operation.

PollOnceFinalizeBackupAsync(string, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> PollOnceFinalizeBackupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A task representing the result of polling the operation.

PollOnceRemoveDataSource(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceRemoveDataSource(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceRemoveDataSourceAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> PollOnceRemoveDataSourceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceRestoreBackup(string, CallSettings)

public virtual Operation<RestoreBackupResponse, OperationMetadata> PollOnceRestoreBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRestoreBackupResponseOperationMetadata

The result of polling the operation.

PollOnceRestoreBackupAsync(string, CallSettings)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> PollOnceRestoreBackupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRestoreBackupResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceSetInternalStatus(string, CallSettings)

public virtual Operation<SetInternalStatusResponse, OperationMetadata> PollOnceSetInternalStatus(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationSetInternalStatusResponseOperationMetadata

The result of polling the operation.

PollOnceSetInternalStatusAsync(string, CallSettings)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> PollOnceSetInternalStatusAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationSetInternalStatusResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceTriggerBackup(string, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> PollOnceTriggerBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanAssociationOperationMetadata

The result of polling the operation.

PollOnceTriggerBackupAsync(string, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> PollOnceTriggerBackupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateBackup(string, CallSettings)

public virtual Operation<Backup, OperationMetadata> PollOnceUpdateBackup(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The result of polling the operation.

PollOnceUpdateBackupAsync(string, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> PollOnceUpdateBackupAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateBackupVault(string, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> PollOnceUpdateBackupVault(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupVaultOperationMetadata

The result of polling the operation.

PollOnceUpdateBackupVaultAsync(string, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> PollOnceUpdateBackupVaultAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateDataSource(string, CallSettings)

public virtual Operation<DataSource, OperationMetadata> PollOnceUpdateDataSource(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDataSourceOperationMetadata

The result of polling the operation.

PollOnceUpdateDataSourceAsync(string, CallSettings)

public virtual Task<Operation<DataSource, OperationMetadata>> PollOnceUpdateDataSourceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDataSourceOperationMetadata

A task representing the result of polling the operation.

RemoveDataSource(DataSourceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> RemoveDataSource(DataSourceName name, CallSettings callSettings = null)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
name DataSourceName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.RemoveDataSource(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceRemoveDataSource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSource(RemoveDataSourceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> RemoveDataSource(RemoveDataSourceRequest request, CallSettings callSettings = null)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
request RemoveDataSourceRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
RemoveDataSourceRequest request = new RemoveDataSourceRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.RemoveDataSource(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceRemoveDataSource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSource(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> RemoveDataSource(string name, CallSettings callSettings = null)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Empty, OperationMetadata> response = backupDRClient.RemoveDataSource(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = backupDRClient.PollOnceRemoveDataSource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSourceAsync(DataSourceName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> RemoveDataSourceAsync(DataSourceName name, CallSettings callSettings = null)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
name DataSourceName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.RemoveDataSourceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceRemoveDataSourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSourceAsync(DataSourceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> RemoveDataSourceAsync(DataSourceName name, CancellationToken cancellationToken)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
name DataSourceName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName name = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.RemoveDataSourceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceRemoveDataSourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSourceAsync(RemoveDataSourceRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> RemoveDataSourceAsync(RemoveDataSourceRequest request, CallSettings callSettings = null)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
request RemoveDataSourceRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
RemoveDataSourceRequest request = new RemoveDataSourceRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.RemoveDataSourceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceRemoveDataSourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSourceAsync(RemoveDataSourceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> RemoveDataSourceAsync(RemoveDataSourceRequest request, CancellationToken cancellationToken)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
request RemoveDataSourceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
RemoveDataSourceRequest request = new RemoveDataSourceRequest
{
    DataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.RemoveDataSourceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceRemoveDataSourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSourceAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> RemoveDataSourceAsync(string name, CallSettings callSettings = null)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.RemoveDataSourceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceRemoveDataSourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RemoveDataSourceAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> RemoveDataSourceAsync(string name, CancellationToken cancellationToken)

Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await backupDRClient.RemoveDataSourceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await backupDRClient.PollOnceRemoveDataSourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

RestoreBackup(BackupName, CallSettings)

public virtual Operation<RestoreBackupResponse, OperationMetadata> RestoreBackup(BackupName name, CallSettings callSettings = null)

Restore from a Backup

Parameters
Name Description
name BackupName

Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRestoreBackupResponseOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = backupDRClient.RestoreBackup(name);

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

RestoreBackup(RestoreBackupRequest, CallSettings)

public virtual Operation<RestoreBackupResponse, OperationMetadata> RestoreBackup(RestoreBackupRequest request, CallSettings callSettings = null)

Restore from a Backup

Parameters
Name Description
request RestoreBackupRequest

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
OperationRestoreBackupResponseOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
RestoreBackupRequest request = new RestoreBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    RequestId = "",
    ComputeInstanceTargetEnvironment = new ComputeInstanceTargetEnvironment(),
    ComputeInstanceRestoreProperties = new ComputeInstanceRestoreProperties(),
};
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = backupDRClient.RestoreBackup(request);

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

RestoreBackup(string, CallSettings)

public virtual Operation<RestoreBackupResponse, OperationMetadata> RestoreBackup(string name, CallSettings callSettings = null)

Restore from a Backup

Parameters
Name Description
name string

Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRestoreBackupResponseOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = backupDRClient.RestoreBackup(name);

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

RestoreBackupAsync(BackupName, CallSettings)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> RestoreBackupAsync(BackupName name, CallSettings callSettings = null)

Restore from a Backup

Parameters
Name Description
name BackupName

Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRestoreBackupResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = await backupDRClient.RestoreBackupAsync(name);

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

RestoreBackupAsync(BackupName, CancellationToken)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> RestoreBackupAsync(BackupName name, CancellationToken cancellationToken)

Restore from a Backup

Parameters
Name Description
name BackupName

Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRestoreBackupResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = await backupDRClient.RestoreBackupAsync(name);

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

RestoreBackupAsync(RestoreBackupRequest, CallSettings)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> RestoreBackupAsync(RestoreBackupRequest request, CallSettings callSettings = null)

Restore from a Backup

Parameters
Name Description
request RestoreBackupRequest

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
TaskOperationRestoreBackupResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
RestoreBackupRequest request = new RestoreBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    RequestId = "",
    ComputeInstanceTargetEnvironment = new ComputeInstanceTargetEnvironment(),
    ComputeInstanceRestoreProperties = new ComputeInstanceRestoreProperties(),
};
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = await backupDRClient.RestoreBackupAsync(request);

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

RestoreBackupAsync(RestoreBackupRequest, CancellationToken)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> RestoreBackupAsync(RestoreBackupRequest request, CancellationToken cancellationToken)

Restore from a Backup

Parameters
Name Description
request RestoreBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRestoreBackupResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
RestoreBackupRequest request = new RestoreBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackupvaultDatasourceBackup("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"),
    RequestId = "",
    ComputeInstanceTargetEnvironment = new ComputeInstanceTargetEnvironment(),
    ComputeInstanceRestoreProperties = new ComputeInstanceRestoreProperties(),
};
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = await backupDRClient.RestoreBackupAsync(request);

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

RestoreBackupAsync(string, CallSettings)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> RestoreBackupAsync(string name, CallSettings callSettings = null)

Restore from a Backup

Parameters
Name Description
name string

Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRestoreBackupResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = await backupDRClient.RestoreBackupAsync(name);

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

RestoreBackupAsync(string, CancellationToken)

public virtual Task<Operation<RestoreBackupResponse, OperationMetadata>> RestoreBackupAsync(string name, CancellationToken cancellationToken)

Restore from a Backup

Parameters
Name Description
name string

Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRestoreBackupResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]/backups/[BACKUP]";
// Make the request
Operation<RestoreBackupResponse, OperationMetadata> response = await backupDRClient.RestoreBackupAsync(name);

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

SetInternalStatus(DataSourceName, CallSettings)

public virtual Operation<SetInternalStatusResponse, OperationMetadata> SetInternalStatus(DataSourceName dataSource, CallSettings callSettings = null)

Sets the internal status of a DataSource.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationSetInternalStatusResponseOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = backupDRClient.SetInternalStatus(dataSource);

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

SetInternalStatus(SetInternalStatusRequest, CallSettings)

public virtual Operation<SetInternalStatusResponse, OperationMetadata> SetInternalStatus(SetInternalStatusRequest request, CallSettings callSettings = null)

Sets the internal status of a DataSource.

Parameters
Name Description
request SetInternalStatusRequest

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
OperationSetInternalStatusResponseOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
SetInternalStatusRequest request = new SetInternalStatusRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Value = ByteString.Empty,
    BackupConfigState = BackupConfigState.Unspecified,
    RequestId = "",
};
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = backupDRClient.SetInternalStatus(request);

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

SetInternalStatus(string, CallSettings)

public virtual Operation<SetInternalStatusResponse, OperationMetadata> SetInternalStatus(string dataSource, CallSettings callSettings = null)

Sets the internal status of a DataSource.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationSetInternalStatusResponseOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = backupDRClient.SetInternalStatus(dataSource);

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

SetInternalStatusAsync(DataSourceName, CallSettings)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> SetInternalStatusAsync(DataSourceName dataSource, CallSettings callSettings = null)

Sets the internal status of a DataSource.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationSetInternalStatusResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = await backupDRClient.SetInternalStatusAsync(dataSource);

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

SetInternalStatusAsync(DataSourceName, CancellationToken)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> SetInternalStatusAsync(DataSourceName dataSource, CancellationToken cancellationToken)

Sets the internal status of a DataSource.

Parameters
Name Description
dataSource DataSourceName

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationSetInternalStatusResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSourceName dataSource = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = await backupDRClient.SetInternalStatusAsync(dataSource);

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

SetInternalStatusAsync(SetInternalStatusRequest, CallSettings)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> SetInternalStatusAsync(SetInternalStatusRequest request, CallSettings callSettings = null)

Sets the internal status of a DataSource.

Parameters
Name Description
request SetInternalStatusRequest

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
TaskOperationSetInternalStatusResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
SetInternalStatusRequest request = new SetInternalStatusRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Value = ByteString.Empty,
    BackupConfigState = BackupConfigState.Unspecified,
    RequestId = "",
};
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = await backupDRClient.SetInternalStatusAsync(request);

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

SetInternalStatusAsync(SetInternalStatusRequest, CancellationToken)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> SetInternalStatusAsync(SetInternalStatusRequest request, CancellationToken cancellationToken)

Sets the internal status of a DataSource.

Parameters
Name Description
request SetInternalStatusRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationSetInternalStatusResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
SetInternalStatusRequest request = new SetInternalStatusRequest
{
    DataSourceAsDataSourceName = DataSourceName.FromProjectLocationBackupvaultDatasource("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"),
    Value = ByteString.Empty,
    BackupConfigState = BackupConfigState.Unspecified,
    RequestId = "",
};
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = await backupDRClient.SetInternalStatusAsync(request);

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

SetInternalStatusAsync(string, CallSettings)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> SetInternalStatusAsync(string dataSource, CallSettings callSettings = null)

Sets the internal status of a DataSource.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationSetInternalStatusResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = await backupDRClient.SetInternalStatusAsync(dataSource);

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

SetInternalStatusAsync(string, CancellationToken)

public virtual Task<Operation<SetInternalStatusResponse, OperationMetadata>> SetInternalStatusAsync(string dataSource, CancellationToken cancellationToken)

Sets the internal status of a DataSource.

Parameters
Name Description
dataSource string

Required. The resource name of the instance, in the format 'projects//locations//backupVaults/*/dataSources/'.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationSetInternalStatusResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string dataSource = "projects/[PROJECT]/locations/[LOCATION]/backupVaults/[BACKUPVAULT]/dataSources/[DATASOURCE]";
// Make the request
Operation<SetInternalStatusResponse, OperationMetadata> response = await backupDRClient.SetInternalStatusAsync(dataSource);

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

TestIamPermissions(IResourceName, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = backupDRClient.TestIamPermissions(resource, permissions);

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
request TestIamPermissionsRequest

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
TestIamPermissionsResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = backupDRClient.TestIamPermissions(request);

TestIamPermissions(string, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = backupDRClient.TestIamPermissions(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await backupDRClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await backupDRClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
request TestIamPermissionsRequest

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
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await backupDRClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
request TestIamPermissionsRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await backupDRClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await backupDRClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(string, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns the caller's permissions on a BackupVault resource.

A caller is not required to have Google IAM permission to make this request.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await backupDRClient.TestIamPermissionsAsync(resource, permissions);

TriggerBackup(BackupPlanAssociationName, string, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> TriggerBackup(BackupPlanAssociationName name, string ruleId, CallSettings callSettings = null)

Triggers a new Backup.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId string

Required. backup rule_id for which a backup needs to be triggered.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanAssociationOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
string ruleId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = backupDRClient.TriggerBackup(name, ruleId);

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

TriggerBackup(TriggerBackupRequest, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> TriggerBackup(TriggerBackupRequest request, CallSettings callSettings = null)

Triggers a new Backup.

Parameters
Name Description
request TriggerBackupRequest

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
OperationBackupPlanAssociationOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
TriggerBackupRequest request = new TriggerBackupRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
    RuleId = "",
    RequestId = "",
};
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = backupDRClient.TriggerBackup(request);

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

TriggerBackup(string, string, CallSettings)

public virtual Operation<BackupPlanAssociation, OperationMetadata> TriggerBackup(string name, string ruleId, CallSettings callSettings = null)

Triggers a new Backup.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId string

Required. backup rule_id for which a backup needs to be triggered.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupPlanAssociationOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
string ruleId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = backupDRClient.TriggerBackup(name, ruleId);

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

TriggerBackupAsync(BackupPlanAssociationName, string, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> TriggerBackupAsync(BackupPlanAssociationName name, string ruleId, CallSettings callSettings = null)

Triggers a new Backup.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId string

Required. backup rule_id for which a backup needs to be triggered.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
string ruleId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.TriggerBackupAsync(name, ruleId);

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

TriggerBackupAsync(BackupPlanAssociationName, string, CancellationToken)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> TriggerBackupAsync(BackupPlanAssociationName name, string ruleId, CancellationToken cancellationToken)

Triggers a new Backup.

Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId string

Required. backup rule_id for which a backup needs to be triggered.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupPlanAssociationName name = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
string ruleId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.TriggerBackupAsync(name, ruleId);

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

TriggerBackupAsync(TriggerBackupRequest, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> TriggerBackupAsync(TriggerBackupRequest request, CallSettings callSettings = null)

Triggers a new Backup.

Parameters
Name Description
request TriggerBackupRequest

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
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
TriggerBackupRequest request = new TriggerBackupRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
    RuleId = "",
    RequestId = "",
};
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.TriggerBackupAsync(request);

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

TriggerBackupAsync(TriggerBackupRequest, CancellationToken)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> TriggerBackupAsync(TriggerBackupRequest request, CancellationToken cancellationToken)

Triggers a new Backup.

Parameters
Name Description
request TriggerBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
TriggerBackupRequest request = new TriggerBackupRequest
{
    BackupPlanAssociationName = BackupPlanAssociationName.FromProjectLocationBackupPlanAssociation("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"),
    RuleId = "",
    RequestId = "",
};
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.TriggerBackupAsync(request);

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

TriggerBackupAsync(string, string, CallSettings)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> TriggerBackupAsync(string name, string ruleId, CallSettings callSettings = null)

Triggers a new Backup.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId string

Required. backup rule_id for which a backup needs to be triggered.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
string ruleId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.TriggerBackupAsync(name, ruleId);

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

TriggerBackupAsync(string, string, CancellationToken)

public virtual Task<Operation<BackupPlanAssociation, OperationMetadata>> TriggerBackupAsync(string name, string ruleId, CancellationToken cancellationToken)

Triggers a new Backup.

Parameters
Name Description
name string

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId string

Required. backup rule_id for which a backup needs to be triggered.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupPlanAssociationOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backupPlanAssociations/[BACKUP_PLAN_ASSOCIATION]";
string ruleId = "";
// Make the request
Operation<BackupPlanAssociation, OperationMetadata> response = await backupDRClient.TriggerBackupAsync(name, ruleId);

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

UpdateBackup(Backup, FieldMask, CallSettings)

public virtual Operation<Backup, OperationMetadata> UpdateBackup(Backup backup, FieldMask updateMask, CallSettings callSettings = null)

Updates the settings of a Backup.

Parameters
Name Description
backup Backup

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
Backup backup = new Backup();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.UpdateBackup(backup, updateMask);

// 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 = backupDRClient.PollOnceUpdateBackup(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;
}

UpdateBackup(UpdateBackupRequest, CallSettings)

public virtual Operation<Backup, OperationMetadata> UpdateBackup(UpdateBackupRequest request, CallSettings callSettings = null)

Updates the settings of a Backup.

Parameters
Name Description
request UpdateBackupRequest

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
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
UpdateBackupRequest request = new UpdateBackupRequest
{
    UpdateMask = new FieldMask(),
    Backup = new Backup(),
    RequestId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = backupDRClient.UpdateBackup(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 = backupDRClient.PollOnceUpdateBackup(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;
}

UpdateBackupAsync(Backup, FieldMask, CallSettings)

public virtual Task<Operation<Backup, OperationMetadata>> UpdateBackupAsync(Backup backup, FieldMask updateMask, CallSettings callSettings = null)

Updates the settings of a Backup.

Parameters
Name Description
backup Backup

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
Backup backup = new Backup();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.UpdateBackupAsync(backup, updateMask);

// 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 backupDRClient.PollOnceUpdateBackupAsync(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;
}

UpdateBackupAsync(Backup, FieldMask, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> UpdateBackupAsync(Backup backup, FieldMask updateMask, CancellationToken cancellationToken)

Updates the settings of a Backup.

Parameters
Name Description
backup Backup

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
Backup backup = new Backup();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.UpdateBackupAsync(backup, updateMask);

// 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 backupDRClient.PollOnceUpdateBackupAsync(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;
}

UpdateBackupAsync(UpdateBackupRequest, CallSettings)

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

Updates the settings of a Backup.

Parameters
Name Description
request UpdateBackupRequest

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
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
UpdateBackupRequest request = new UpdateBackupRequest
{
    UpdateMask = new FieldMask(),
    Backup = new Backup(),
    RequestId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.UpdateBackupAsync(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 backupDRClient.PollOnceUpdateBackupAsync(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;
}

UpdateBackupAsync(UpdateBackupRequest, CancellationToken)

public virtual Task<Operation<Backup, OperationMetadata>> UpdateBackupAsync(UpdateBackupRequest request, CancellationToken cancellationToken)

Updates the settings of a Backup.

Parameters
Name Description
request UpdateBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
UpdateBackupRequest request = new UpdateBackupRequest
{
    UpdateMask = new FieldMask(),
    Backup = new Backup(),
    RequestId = "",
};
// Make the request
Operation<Backup, OperationMetadata> response = await backupDRClient.UpdateBackupAsync(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 backupDRClient.PollOnceUpdateBackupAsync(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;
}

UpdateBackupVault(BackupVault, FieldMask, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> UpdateBackupVault(BackupVault backupVault, FieldMask updateMask, CallSettings callSettings = null)

Updates the settings of a BackupVault.

Parameters
Name Description
backupVault BackupVault

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the BackupVault resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupVaultOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
BackupVault backupVault = new BackupVault();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<BackupVault, OperationMetadata> response = backupDRClient.UpdateBackupVault(backupVault, updateMask);

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

UpdateBackupVault(UpdateBackupVaultRequest, CallSettings)

public virtual Operation<BackupVault, OperationMetadata> UpdateBackupVault(UpdateBackupVaultRequest request, CallSettings callSettings = null)

Updates the settings of a BackupVault.

Parameters
Name Description
request UpdateBackupVaultRequest

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
OperationBackupVaultOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
UpdateBackupVaultRequest request = new UpdateBackupVaultRequest
{
    UpdateMask = new FieldMask(),
    BackupVault = new BackupVault(),
    RequestId = "",
    ValidateOnly = false,
    Force = false,
};
// Make the request
Operation<BackupVault, OperationMetadata> response = backupDRClient.UpdateBackupVault(request);

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

UpdateBackupVaultAsync(BackupVault, FieldMask, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> UpdateBackupVaultAsync(BackupVault backupVault, FieldMask updateMask, CallSettings callSettings = null)

Updates the settings of a BackupVault.

Parameters
Name Description
backupVault BackupVault

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the BackupVault resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVault backupVault = new BackupVault();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.UpdateBackupVaultAsync(backupVault, updateMask);

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

UpdateBackupVaultAsync(BackupVault, FieldMask, CancellationToken)

public virtual Task<Operation<BackupVault, OperationMetadata>> UpdateBackupVaultAsync(BackupVault backupVault, FieldMask updateMask, CancellationToken cancellationToken)

Updates the settings of a BackupVault.

Parameters
Name Description
backupVault BackupVault

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the BackupVault resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
BackupVault backupVault = new BackupVault();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.UpdateBackupVaultAsync(backupVault, updateMask);

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

UpdateBackupVaultAsync(UpdateBackupVaultRequest, CallSettings)

public virtual Task<Operation<BackupVault, OperationMetadata>> UpdateBackupVaultAsync(UpdateBackupVaultRequest request, CallSettings callSettings = null)

Updates the settings of a BackupVault.

Parameters
Name Description
request UpdateBackupVaultRequest

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
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
UpdateBackupVaultRequest request = new UpdateBackupVaultRequest
{
    UpdateMask = new FieldMask(),
    BackupVault = new BackupVault(),
    RequestId = "",
    ValidateOnly = false,
    Force = false,
};
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.UpdateBackupVaultAsync(request);

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

UpdateBackupVaultAsync(UpdateBackupVaultRequest, CancellationToken)

public virtual Task<Operation<BackupVault, OperationMetadata>> UpdateBackupVaultAsync(UpdateBackupVaultRequest request, CancellationToken cancellationToken)

Updates the settings of a BackupVault.

Parameters
Name Description
request UpdateBackupVaultRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupVaultOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
UpdateBackupVaultRequest request = new UpdateBackupVaultRequest
{
    UpdateMask = new FieldMask(),
    BackupVault = new BackupVault(),
    RequestId = "",
    ValidateOnly = false,
    Force = false,
};
// Make the request
Operation<BackupVault, OperationMetadata> response = await backupDRClient.UpdateBackupVaultAsync(request);

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

UpdateDataSource(DataSource, FieldMask, CallSettings)

public virtual Operation<DataSource, OperationMetadata> UpdateDataSource(DataSource dataSource, FieldMask updateMask, CallSettings callSettings = null)

Updates the settings of a DataSource.

Parameters
Name Description
dataSource DataSource

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the DataSource resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDataSourceOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
DataSource dataSource = new DataSource();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<DataSource, OperationMetadata> response = backupDRClient.UpdateDataSource(dataSource, updateMask);

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

UpdateDataSource(UpdateDataSourceRequest, CallSettings)

public virtual Operation<DataSource, OperationMetadata> UpdateDataSource(UpdateDataSourceRequest request, CallSettings callSettings = null)

Updates the settings of a DataSource.

Parameters
Name Description
request UpdateDataSourceRequest

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
OperationDataSourceOperationMetadata

The RPC response.

Example
// Create client
BackupDRClient backupDRClient = BackupDRClient.Create();
// Initialize request argument(s)
UpdateDataSourceRequest request = new UpdateDataSourceRequest
{
    UpdateMask = new FieldMask(),
    DataSource = new DataSource(),
    RequestId = "",
    AllowMissing = false,
};
// Make the request
Operation<DataSource, OperationMetadata> response = backupDRClient.UpdateDataSource(request);

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

UpdateDataSourceAsync(DataSource, FieldMask, CallSettings)

public virtual Task<Operation<DataSource, OperationMetadata>> UpdateDataSourceAsync(DataSource dataSource, FieldMask updateMask, CallSettings callSettings = null)

Updates the settings of a DataSource.

Parameters
Name Description
dataSource DataSource

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the DataSource resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDataSourceOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSource dataSource = new DataSource();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<DataSource, OperationMetadata> response = await backupDRClient.UpdateDataSourceAsync(dataSource, updateMask);

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

UpdateDataSourceAsync(DataSource, FieldMask, CancellationToken)

public virtual Task<Operation<DataSource, OperationMetadata>> UpdateDataSourceAsync(DataSource dataSource, FieldMask updateMask, CancellationToken cancellationToken)

Updates the settings of a DataSource.

Parameters
Name Description
dataSource DataSource

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the DataSource resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDataSourceOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
DataSource dataSource = new DataSource();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<DataSource, OperationMetadata> response = await backupDRClient.UpdateDataSourceAsync(dataSource, updateMask);

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

UpdateDataSourceAsync(UpdateDataSourceRequest, CallSettings)

public virtual Task<Operation<DataSource, OperationMetadata>> UpdateDataSourceAsync(UpdateDataSourceRequest request, CallSettings callSettings = null)

Updates the settings of a DataSource.

Parameters
Name Description
request UpdateDataSourceRequest

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
TaskOperationDataSourceOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
UpdateDataSourceRequest request = new UpdateDataSourceRequest
{
    UpdateMask = new FieldMask(),
    DataSource = new DataSource(),
    RequestId = "",
    AllowMissing = false,
};
// Make the request
Operation<DataSource, OperationMetadata> response = await backupDRClient.UpdateDataSourceAsync(request);

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

UpdateDataSourceAsync(UpdateDataSourceRequest, CancellationToken)

public virtual Task<Operation<DataSource, OperationMetadata>> UpdateDataSourceAsync(UpdateDataSourceRequest request, CancellationToken cancellationToken)

Updates the settings of a DataSource.

Parameters
Name Description
request UpdateDataSourceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDataSourceOperationMetadata

A Task containing the RPC response.

Example
// Create client
BackupDRClient backupDRClient = await BackupDRClient.CreateAsync();
// Initialize request argument(s)
UpdateDataSourceRequest request = new UpdateDataSourceRequest
{
    UpdateMask = new FieldMask(),
    DataSource = new DataSource(),
    RequestId = "",
    AllowMissing = false,
};
// Make the request
Operation<DataSource, OperationMetadata> response = await backupDRClient.UpdateDataSourceAsync(request);

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