AlloyDB v1alpha API - Class AlloyDBAdminClient (1.0.0-alpha08)

public abstract class AlloyDBAdminClient

Reference documentation and code samples for the AlloyDB v1alpha API class AlloyDBAdminClient.

AlloyDBAdmin client wrapper, for convenient use.

Inheritance

object > AlloyDBAdminClient

Derived Types

Namespace

Google.Cloud.AlloyDb.V1Alpha

Assembly

Google.Cloud.AlloyDb.V1Alpha.dll

Remarks

Service describing handlers for resources

Properties

BatchCreateInstancesOperationsClient

public virtual OperationsClient BatchCreateInstancesOperationsClient { get; }

The long-running operations client for BatchCreateInstances.

Property Value
Type Description
OperationsClient

CreateBackupOperationsClient

public virtual OperationsClient CreateBackupOperationsClient { get; }

The long-running operations client for CreateBackup.

Property Value
Type Description
OperationsClient

CreateClusterOperationsClient

public virtual OperationsClient CreateClusterOperationsClient { get; }

The long-running operations client for CreateCluster.

Property Value
Type Description
OperationsClient

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
Type Description
OperationsClient

CreateSecondaryClusterOperationsClient

public virtual OperationsClient CreateSecondaryClusterOperationsClient { get; }

The long-running operations client for CreateSecondaryCluster.

Property Value
Type Description
OperationsClient

CreateSecondaryInstanceOperationsClient

public virtual OperationsClient CreateSecondaryInstanceOperationsClient { get; }

The long-running operations client for CreateSecondaryInstance.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AlloyDBAdmin scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default AlloyDBAdmin scopes are:

DeleteBackupOperationsClient

public virtual OperationsClient DeleteBackupOperationsClient { get; }

The long-running operations client for DeleteBackup.

Property Value
Type Description
OperationsClient

DeleteClusterOperationsClient

public virtual OperationsClient DeleteClusterOperationsClient { get; }

The long-running operations client for DeleteCluster.

Property Value
Type Description
OperationsClient

DeleteInstanceOperationsClient

public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
Type Description
OperationsClient

FailoverInstanceOperationsClient

public virtual OperationsClient FailoverInstanceOperationsClient { get; }

The long-running operations client for FailoverInstance.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual AlloyDBAdmin.AlloyDBAdminClient GrpcClient { get; }

The underlying gRPC AlloyDBAdmin client

Property Value
Type Description
AlloyDBAdminAlloyDBAdminClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

InjectFaultOperationsClient

public virtual OperationsClient InjectFaultOperationsClient { get; }

The long-running operations client for InjectFault.

Property Value
Type Description
OperationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

PromoteClusterOperationsClient

public virtual OperationsClient PromoteClusterOperationsClient { get; }

The long-running operations client for PromoteCluster.

Property Value
Type Description
OperationsClient

RestartInstanceOperationsClient

public virtual OperationsClient RestartInstanceOperationsClient { get; }

The long-running operations client for RestartInstance.

Property Value
Type Description
OperationsClient

RestoreClusterOperationsClient

public virtual OperationsClient RestoreClusterOperationsClient { get; }

The long-running operations client for RestoreCluster.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateBackupOperationsClient

public virtual OperationsClient UpdateBackupOperationsClient { get; }

The long-running operations client for UpdateBackup.

Property Value
Type Description
OperationsClient

UpdateClusterOperationsClient

public virtual OperationsClient UpdateClusterOperationsClient { get; }

The long-running operations client for UpdateCluster.

Property Value
Type Description
OperationsClient

UpdateInstanceOperationsClient

public virtual OperationsClient UpdateInstanceOperationsClient { get; }

The long-running operations client for UpdateInstance.

Property Value
Type Description
OperationsClient

Methods

BatchCreateInstances(BatchCreateInstancesRequest, CallSettings)

public virtual Operation<BatchCreateInstancesResponse, OperationMetadata> BatchCreateInstances(BatchCreateInstancesRequest request, CallSettings callSettings = null)

Creates new instances under the given project, location and cluster. There can be only one primary instance in a cluster. If the primary instance exists in the cluster as well as this request, then API will throw an error. The primary instance should exist before any read pool instance is created. If the primary instance is a part of the request payload, then the API will take care of creating instances in the correct order. This method is here to support Google-internal use cases, and is not meant for external customers to consume. Please do not start relying on it; its behavior is subject to change without notice.

Parameters
Name Description
request BatchCreateInstancesRequest

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
OperationBatchCreateInstancesResponseOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
BatchCreateInstancesRequest request = new BatchCreateInstancesRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    Requests = new CreateInstanceRequests(),
    RequestId = "",
};
// Make the request
Operation<BatchCreateInstancesResponse, OperationMetadata> response = alloyDBAdminClient.BatchCreateInstances(request);

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

BatchCreateInstancesAsync(BatchCreateInstancesRequest, CallSettings)

public virtual Task<Operation<BatchCreateInstancesResponse, OperationMetadata>> BatchCreateInstancesAsync(BatchCreateInstancesRequest request, CallSettings callSettings = null)

Creates new instances under the given project, location and cluster. There can be only one primary instance in a cluster. If the primary instance exists in the cluster as well as this request, then API will throw an error. The primary instance should exist before any read pool instance is created. If the primary instance is a part of the request payload, then the API will take care of creating instances in the correct order. This method is here to support Google-internal use cases, and is not meant for external customers to consume. Please do not start relying on it; its behavior is subject to change without notice.

Parameters
Name Description
request BatchCreateInstancesRequest

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
TaskOperationBatchCreateInstancesResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
BatchCreateInstancesRequest request = new BatchCreateInstancesRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    Requests = new CreateInstanceRequests(),
    RequestId = "",
};
// Make the request
Operation<BatchCreateInstancesResponse, OperationMetadata> response = await alloyDBAdminClient.BatchCreateInstancesAsync(request);

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

BatchCreateInstancesAsync(BatchCreateInstancesRequest, CancellationToken)

public virtual Task<Operation<BatchCreateInstancesResponse, OperationMetadata>> BatchCreateInstancesAsync(BatchCreateInstancesRequest request, CancellationToken cancellationToken)

Creates new instances under the given project, location and cluster. There can be only one primary instance in a cluster. If the primary instance exists in the cluster as well as this request, then API will throw an error. The primary instance should exist before any read pool instance is created. If the primary instance is a part of the request payload, then the API will take care of creating instances in the correct order. This method is here to support Google-internal use cases, and is not meant for external customers to consume. Please do not start relying on it; its behavior is subject to change without notice.

Parameters
Name Description
request BatchCreateInstancesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBatchCreateInstancesResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
BatchCreateInstancesRequest request = new BatchCreateInstancesRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    Requests = new CreateInstanceRequests(),
    RequestId = "",
};
// Make the request
Operation<BatchCreateInstancesResponse, OperationMetadata> response = await alloyDBAdminClient.BatchCreateInstancesAsync(request);

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

Create()

public static AlloyDBAdminClient Create()

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

Returns
Type Description
AlloyDBAdminClient

The created AlloyDBAdminClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskAlloyDBAdminClient

The task representing the created AlloyDBAdminClient.

CreateBackup(LocationName, Backup, string, CallSettings)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

backup Backup

Required. The resource being created

backupId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = alloyDBAdminClient.CreateBackup(parent, backup, backupId);

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

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

CreateBackup(CreateBackupRequest, CallSettings)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
request CreateBackupRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupId = "",
    Backup = new Backup(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Backup, OperationMetadata> response = alloyDBAdminClient.CreateBackup(request);

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

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

CreateBackup(string, Backup, string, CallSettings)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

backup Backup

Required. The resource being created

backupId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBackupOperationMetadata

The RPC response.

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

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

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

CreateBackupAsync(LocationName, Backup, string, CallSettings)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

backup Backup

Required. The resource being created

backupId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await alloyDBAdminClient.CreateBackupAsync(parent, backup, backupId);

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

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

CreateBackupAsync(LocationName, Backup, string, CancellationToken)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

backup Backup

Required. The resource being created

backupId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Backup backup = new Backup();
string backupId = "";
// Make the request
Operation<Backup, OperationMetadata> response = await alloyDBAdminClient.CreateBackupAsync(parent, backup, backupId);

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

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

CreateBackupAsync(CreateBackupRequest, CallSettings)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
request CreateBackupRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupId = "",
    Backup = new Backup(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Backup, OperationMetadata> response = await alloyDBAdminClient.CreateBackupAsync(request);

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

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

CreateBackupAsync(CreateBackupRequest, CancellationToken)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
request CreateBackupRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateBackupRequest request = new CreateBackupRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BackupId = "",
    Backup = new Backup(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Backup, OperationMetadata> response = await alloyDBAdminClient.CreateBackupAsync(request);

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

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

CreateBackupAsync(string, Backup, string, CallSettings)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

backup Backup

Required. The resource being created

backupId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

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

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

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

CreateBackupAsync(string, Backup, string, CancellationToken)

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

Creates a new Backup in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

backup Backup

Required. The resource being created

backupId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBackupOperationMetadata

A Task containing the RPC response.

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

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

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

CreateCluster(LocationName, Cluster, string, CallSettings)

public virtual Operation<Cluster, OperationMetadata> CreateCluster(LocationName parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a new Cluster in a given project and location.

Parameters
Name Description
parent LocationName

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. The resource being created

clusterId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = alloyDBAdminClient.CreateCluster(parent, cluster, clusterId);

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

CreateCluster(CreateClusterRequest, CallSettings)

public virtual Operation<Cluster, OperationMetadata> CreateCluster(CreateClusterRequest request, CallSettings callSettings = null)

Creates a new Cluster in a given project and location.

Parameters
Name Description
request CreateClusterRequest

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
OperationClusterOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Cluster, OperationMetadata> response = alloyDBAdminClient.CreateCluster(request);

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

CreateCluster(string, Cluster, string, CallSettings)

public virtual Operation<Cluster, OperationMetadata> CreateCluster(string parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a new Cluster in a given project and location.

Parameters
Name Description
parent string

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. The resource being created

clusterId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = alloyDBAdminClient.CreateCluster(parent, cluster, clusterId);

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

CreateClusterAsync(LocationName, Cluster, string, CallSettings)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateClusterAsync(LocationName parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a new Cluster in a given project and location.

Parameters
Name Description
parent LocationName

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. The resource being created

clusterId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateClusterAsync(parent, cluster, clusterId);

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

CreateClusterAsync(LocationName, Cluster, string, CancellationToken)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateClusterAsync(LocationName parent, Cluster cluster, string clusterId, CancellationToken cancellationToken)

Creates a new Cluster in a given project and location.

Parameters
Name Description
parent LocationName

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. The resource being created

clusterId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateClusterAsync(parent, cluster, clusterId);

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

CreateClusterAsync(CreateClusterRequest, CallSettings)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateClusterAsync(CreateClusterRequest request, CallSettings callSettings = null)

Creates a new Cluster in a given project and location.

Parameters
Name Description
request CreateClusterRequest

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
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateClusterAsync(request);

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

CreateClusterAsync(CreateClusterRequest, CancellationToken)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateClusterAsync(CreateClusterRequest request, CancellationToken cancellationToken)

Creates a new Cluster in a given project and location.

Parameters
Name Description
request CreateClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateClusterAsync(request);

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

CreateClusterAsync(string, Cluster, string, CallSettings)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateClusterAsync(string parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a new Cluster in a given project and location.

Parameters
Name Description
parent string

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. The resource being created

clusterId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateClusterAsync(parent, cluster, clusterId);

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

CreateClusterAsync(string, Cluster, string, CancellationToken)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateClusterAsync(string parent, Cluster cluster, string clusterId, CancellationToken cancellationToken)

Creates a new Cluster in a given project and location.

Parameters
Name Description
parent string

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. The resource being created

clusterId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateClusterAsync(parent, cluster, clusterId);

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

CreateInstance(ClusterName, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(ClusterName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.CreateInstance(parent, instance, instanceId);

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

CreateInstance(CreateInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
request CreateInstanceRequest

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
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.CreateInstance(request);

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

CreateInstance(string, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent string

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.CreateInstance(parent, instance, instanceId);

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

CreateInstanceAsync(ClusterName, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(ClusterName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateInstanceAsync(parent, instance, instanceId);

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

CreateInstanceAsync(ClusterName, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(ClusterName parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateInstanceAsync(parent, instance, instanceId);

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

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
request CreateInstanceRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateInstanceAsync(request);

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

CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
Name Description
request CreateInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateInstanceAsync(request);

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

CreateInstanceAsync(string, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent string

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateInstanceAsync(parent, instance, instanceId);

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

CreateInstanceAsync(string, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new Instance in a given project and location.

Parameters
Name Description
parent string

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateInstanceAsync(parent, instance, instanceId);

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

CreateSecondaryCluster(LocationName, Cluster, string, CallSettings)

public virtual Operation<Cluster, OperationMetadata> CreateSecondaryCluster(LocationName parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
parent LocationName

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. Configuration of the requesting object (the secondary cluster).

clusterId string

Required. ID of the requesting object (the secondary cluster).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = alloyDBAdminClient.CreateSecondaryCluster(parent, cluster, clusterId);

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

CreateSecondaryCluster(CreateSecondaryClusterRequest, CallSettings)

public virtual Operation<Cluster, OperationMetadata> CreateSecondaryCluster(CreateSecondaryClusterRequest request, CallSettings callSettings = null)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
request CreateSecondaryClusterRequest

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
OperationClusterOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateSecondaryClusterRequest request = new CreateSecondaryClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Cluster, OperationMetadata> response = alloyDBAdminClient.CreateSecondaryCluster(request);

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

CreateSecondaryCluster(string, Cluster, string, CallSettings)

public virtual Operation<Cluster, OperationMetadata> CreateSecondaryCluster(string parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
parent string

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. Configuration of the requesting object (the secondary cluster).

clusterId string

Required. ID of the requesting object (the secondary cluster).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = alloyDBAdminClient.CreateSecondaryCluster(parent, cluster, clusterId);

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

CreateSecondaryClusterAsync(LocationName, Cluster, string, CallSettings)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateSecondaryClusterAsync(LocationName parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
parent LocationName

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. Configuration of the requesting object (the secondary cluster).

clusterId string

Required. ID of the requesting object (the secondary cluster).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryClusterAsync(parent, cluster, clusterId);

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

CreateSecondaryClusterAsync(LocationName, Cluster, string, CancellationToken)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateSecondaryClusterAsync(LocationName parent, Cluster cluster, string clusterId, CancellationToken cancellationToken)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
parent LocationName

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. Configuration of the requesting object (the secondary cluster).

clusterId string

Required. ID of the requesting object (the secondary cluster).

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryClusterAsync(parent, cluster, clusterId);

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

CreateSecondaryClusterAsync(CreateSecondaryClusterRequest, CallSettings)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateSecondaryClusterAsync(CreateSecondaryClusterRequest request, CallSettings callSettings = null)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
request CreateSecondaryClusterRequest

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
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateSecondaryClusterRequest request = new CreateSecondaryClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryClusterAsync(request);

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

CreateSecondaryClusterAsync(CreateSecondaryClusterRequest, CancellationToken)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateSecondaryClusterAsync(CreateSecondaryClusterRequest request, CancellationToken cancellationToken)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
request CreateSecondaryClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateSecondaryClusterRequest request = new CreateSecondaryClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryClusterAsync(request);

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

CreateSecondaryClusterAsync(string, Cluster, string, CallSettings)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateSecondaryClusterAsync(string parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
parent string

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. Configuration of the requesting object (the secondary cluster).

clusterId string

Required. ID of the requesting object (the secondary cluster).

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryClusterAsync(parent, cluster, clusterId);

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

CreateSecondaryClusterAsync(string, Cluster, string, CancellationToken)

public virtual Task<Operation<Cluster, OperationMetadata>> CreateSecondaryClusterAsync(string parent, Cluster cluster, string clusterId, CancellationToken cancellationToken)

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.

Parameters
Name Description
parent string

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

cluster Cluster

Required. Configuration of the requesting object (the secondary cluster).

clusterId string

Required. ID of the requesting object (the secondary cluster).

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryClusterAsync(parent, cluster, clusterId);

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

CreateSecondaryInstance(ClusterName, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateSecondaryInstance(ClusterName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.CreateSecondaryInstance(parent, instance, instanceId);

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

CreateSecondaryInstance(CreateSecondaryInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateSecondaryInstance(CreateSecondaryInstanceRequest request, CallSettings callSettings = null)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
request CreateSecondaryInstanceRequest

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
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateSecondaryInstanceRequest request = new CreateSecondaryInstanceRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.CreateSecondaryInstance(request);

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

CreateSecondaryInstance(string, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateSecondaryInstance(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
parent string

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.CreateSecondaryInstance(parent, instance, instanceId);

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

CreateSecondaryInstanceAsync(ClusterName, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateSecondaryInstanceAsync(ClusterName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryInstanceAsync(parent, instance, instanceId);

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

CreateSecondaryInstanceAsync(ClusterName, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateSecondaryInstanceAsync(ClusterName parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryInstanceAsync(parent, instance, instanceId);

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

CreateSecondaryInstanceAsync(CreateSecondaryInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateSecondaryInstanceAsync(CreateSecondaryInstanceRequest request, CallSettings callSettings = null)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
request CreateSecondaryInstanceRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateSecondaryInstanceRequest request = new CreateSecondaryInstanceRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryInstanceAsync(request);

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

CreateSecondaryInstanceAsync(CreateSecondaryInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateSecondaryInstanceAsync(CreateSecondaryInstanceRequest request, CancellationToken cancellationToken)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
request CreateSecondaryInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateSecondaryInstanceRequest request = new CreateSecondaryInstanceRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    InstanceId = "",
    Instance = new Instance(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryInstanceAsync(request);

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

CreateSecondaryInstanceAsync(string, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateSecondaryInstanceAsync(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
parent string

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryInstanceAsync(parent, instance, instanceId);

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

CreateSecondaryInstanceAsync(string, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateSecondaryInstanceAsync(string parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Creates a new SECONDARY Instance in a given project and location.

Parameters
Name Description
parent string

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.

instance Instance

Required. The resource being created

instanceId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
Instance instance = new Instance();
string instanceId = "";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.CreateSecondaryInstanceAsync(parent, instance, instanceId);

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

CreateUser(ClusterName, User, string, CallSettings)

public virtual User CreateUser(ClusterName parent, User user, string userId, CallSettings callSettings = null)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
parent ClusterName

Required. Value for parent.

user User

Required. The resource being created

userId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
User

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
User user = new User();
string userId = "";
// Make the request
User response = alloyDBAdminClient.CreateUser(parent, user, userId);

CreateUser(CreateUserRequest, CallSettings)

public virtual User CreateUser(CreateUserRequest request, CallSettings callSettings = null)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
request CreateUserRequest

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
User

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
CreateUserRequest request = new CreateUserRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    UserId = "",
    User = new User(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
User response = alloyDBAdminClient.CreateUser(request);

CreateUser(string, User, string, CallSettings)

public virtual User CreateUser(string parent, User user, string userId, CallSettings callSettings = null)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
parent string

Required. Value for parent.

user User

Required. The resource being created

userId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
User

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
User user = new User();
string userId = "";
// Make the request
User response = alloyDBAdminClient.CreateUser(parent, user, userId);

CreateUserAsync(ClusterName, User, string, CallSettings)

public virtual Task<User> CreateUserAsync(ClusterName parent, User user, string userId, CallSettings callSettings = null)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
parent ClusterName

Required. Value for parent.

user User

Required. The resource being created

userId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
User user = new User();
string userId = "";
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(parent, user, userId);

CreateUserAsync(ClusterName, User, string, CancellationToken)

public virtual Task<User> CreateUserAsync(ClusterName parent, User user, string userId, CancellationToken cancellationToken)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
parent ClusterName

Required. Value for parent.

user User

Required. The resource being created

userId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
User user = new User();
string userId = "";
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(parent, user, userId);

CreateUserAsync(CreateUserRequest, CallSettings)

public virtual Task<User> CreateUserAsync(CreateUserRequest request, CallSettings callSettings = null)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
request CreateUserRequest

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
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateUserRequest request = new CreateUserRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    UserId = "",
    User = new User(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(request);

CreateUserAsync(CreateUserRequest, CancellationToken)

public virtual Task<User> CreateUserAsync(CreateUserRequest request, CancellationToken cancellationToken)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
request CreateUserRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
CreateUserRequest request = new CreateUserRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    UserId = "",
    User = new User(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(request);

CreateUserAsync(string, User, string, CallSettings)

public virtual Task<User> CreateUserAsync(string parent, User user, string userId, CallSettings callSettings = null)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
parent string

Required. Value for parent.

user User

Required. The resource being created

userId string

Required. ID of the requesting object.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
User user = new User();
string userId = "";
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(parent, user, userId);

CreateUserAsync(string, User, string, CancellationToken)

public virtual Task<User> CreateUserAsync(string parent, User user, string userId, CancellationToken cancellationToken)

Creates a new User in a given project, location, and cluster.

Parameters
Name Description
parent string

Required. Value for parent.

user User

Required. The resource being created

userId string

Required. ID of the requesting object.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
User user = new User();
string userId = "";
// Make the request
User response = await alloyDBAdminClient.CreateUserAsync(parent, user, userId);

DeleteBackup(BackupName, CallSettings)

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

Deletes a single Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource. For the required format, see the comment on the Backup.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]");
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteBackup(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 = alloyDBAdminClient.PollOnceDeleteBackup(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;
}

DeleteBackup(DeleteBackupRequest, CallSettings)

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

Deletes a single 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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]"),
    RequestId = "",
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteBackup(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 = alloyDBAdminClient.PollOnceDeleteBackup(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;
}

DeleteBackup(string, CallSettings)

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

Deletes a single Backup.

Parameters
Name Description
name string

Required. Name of the resource. For the required format, see the comment on the Backup.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backups/[BACKUP]";
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteBackup(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 = alloyDBAdminClient.PollOnceDeleteBackup(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;
}

DeleteBackupAsync(BackupName, CallSettings)

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

Deletes a single Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource. For the required format, see the comment on the Backup.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]");
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteBackupAsync(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 alloyDBAdminClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(BackupName, CancellationToken)

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

Deletes a single Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource. For the required format, see the comment on the Backup.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]");
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteBackupAsync(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 alloyDBAdminClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(DeleteBackupRequest, CallSettings)

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

Deletes a single 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]"),
    RequestId = "",
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteBackupAsync(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 alloyDBAdminClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(DeleteBackupRequest, CancellationToken)

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

Deletes a single 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteBackupRequest request = new DeleteBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]"),
    RequestId = "",
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteBackupAsync(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 alloyDBAdminClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(string, CallSettings)

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

Deletes a single Backup.

Parameters
Name Description
name string

Required. Name of the resource. For the required format, see the comment on the Backup.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backups/[BACKUP]";
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteBackupAsync(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 alloyDBAdminClient.PollOnceDeleteBackupAsync(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;
}

DeleteBackupAsync(string, CancellationToken)

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

Deletes a single Backup.

Parameters
Name Description
name string

Required. Name of the resource. For the required format, see the comment on the Backup.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backups/[BACKUP]";
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteBackupAsync(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 alloyDBAdminClient.PollOnceDeleteBackupAsync(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;
}

DeleteCluster(ClusterName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteCluster(ClusterName name, CallSettings callSettings = null)

Deletes a single Cluster.

Parameters
Name Description
name ClusterName

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteCluster(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 = alloyDBAdminClient.PollOnceDeleteCluster(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;
}

DeleteCluster(DeleteClusterRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteCluster(DeleteClusterRequest request, CallSettings callSettings = null)

Deletes a single Cluster.

Parameters
Name Description
request DeleteClusterRequest

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
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
    Etag = "",
    ValidateOnly = false,
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteCluster(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 = alloyDBAdminClient.PollOnceDeleteCluster(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;
}

DeleteCluster(string, CallSettings)

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

Deletes a single Cluster.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteCluster(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 = alloyDBAdminClient.PollOnceDeleteCluster(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;
}

DeleteClusterAsync(ClusterName, CallSettings)

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

Deletes a single Cluster.

Parameters
Name Description
name ClusterName

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteClusterAsync(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 alloyDBAdminClient.PollOnceDeleteClusterAsync(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;
}

DeleteClusterAsync(ClusterName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteClusterAsync(ClusterName name, CancellationToken cancellationToken)

Deletes a single Cluster.

Parameters
Name Description
name ClusterName

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteClusterAsync(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 alloyDBAdminClient.PollOnceDeleteClusterAsync(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;
}

DeleteClusterAsync(DeleteClusterRequest, CallSettings)

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

Deletes a single Cluster.

Parameters
Name Description
request DeleteClusterRequest

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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
    Etag = "",
    ValidateOnly = false,
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteClusterAsync(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 alloyDBAdminClient.PollOnceDeleteClusterAsync(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;
}

DeleteClusterAsync(DeleteClusterRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteClusterAsync(DeleteClusterRequest request, CancellationToken cancellationToken)

Deletes a single Cluster.

Parameters
Name Description
request DeleteClusterRequest

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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
    Etag = "",
    ValidateOnly = false,
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteClusterAsync(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 alloyDBAdminClient.PollOnceDeleteClusterAsync(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;
}

DeleteClusterAsync(string, CallSettings)

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

Deletes a single Cluster.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteClusterAsync(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 alloyDBAdminClient.PollOnceDeleteClusterAsync(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;
}

DeleteClusterAsync(string, CancellationToken)

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

Deletes a single Cluster.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteClusterAsync(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 alloyDBAdminClient.PollOnceDeleteClusterAsync(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;
}

DeleteInstance(DeleteInstanceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a single Instance.

Parameters
Name Description
request DeleteInstanceRequest

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
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    Etag = "",
    ValidateOnly = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteInstance(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 = alloyDBAdminClient.PollOnceDeleteInstance(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;
}

DeleteInstance(InstanceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(InstanceName name, CallSettings callSettings = null)

Deletes a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteInstance(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 = alloyDBAdminClient.PollOnceDeleteInstance(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;
}

DeleteInstance(string, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = alloyDBAdminClient.DeleteInstance(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 = alloyDBAdminClient.PollOnceDeleteInstance(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
request DeleteInstanceRequest

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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    Etag = "",
    ValidateOnly = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteInstanceAsync(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 alloyDBAdminClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes a single Instance.

Parameters
Name Description
request DeleteInstanceRequest

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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    Etag = "",
    ValidateOnly = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteInstanceAsync(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 alloyDBAdminClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(InstanceName, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteInstanceAsync(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 alloyDBAdminClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Deletes a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteInstanceAsync(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 alloyDBAdminClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(string, CallSettings)

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

Deletes a single Instance.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteInstanceAsync(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 alloyDBAdminClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(string, CancellationToken)

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

Deletes a single Instance.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await alloyDBAdminClient.DeleteInstanceAsync(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 alloyDBAdminClient.PollOnceDeleteInstanceAsync(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;
}

DeleteUser(DeleteUserRequest, CallSettings)

public virtual void DeleteUser(DeleteUserRequest request, CallSettings callSettings = null)

Deletes a single User.

Parameters
Name Description
request DeleteUserRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
DeleteUserRequest request = new DeleteUserRequest
{
    UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
alloyDBAdminClient.DeleteUser(request);

DeleteUser(UserName, CallSettings)

public virtual void DeleteUser(UserName name, CallSettings callSettings = null)

Deletes a single User.

Parameters
Name Description
name UserName

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
UserName name = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
// Make the request
alloyDBAdminClient.DeleteUser(name);

DeleteUser(string, CallSettings)

public virtual void DeleteUser(string name, CallSettings callSettings = null)

Deletes a single User.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
alloyDBAdminClient.DeleteUser(name);

DeleteUserAsync(DeleteUserRequest, CallSettings)

public virtual Task DeleteUserAsync(DeleteUserRequest request, CallSettings callSettings = null)

Deletes a single User.

Parameters
Name Description
request DeleteUserRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteUserRequest request = new DeleteUserRequest
{
    UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
await alloyDBAdminClient.DeleteUserAsync(request);

DeleteUserAsync(DeleteUserRequest, CancellationToken)

public virtual Task DeleteUserAsync(DeleteUserRequest request, CancellationToken cancellationToken)

Deletes a single User.

Parameters
Name Description
request DeleteUserRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteUserRequest request = new DeleteUserRequest
{
    UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
await alloyDBAdminClient.DeleteUserAsync(request);

DeleteUserAsync(UserName, CallSettings)

public virtual Task DeleteUserAsync(UserName name, CallSettings callSettings = null)

Deletes a single User.

Parameters
Name Description
name UserName

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
UserName name = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
// Make the request
await alloyDBAdminClient.DeleteUserAsync(name);

DeleteUserAsync(UserName, CancellationToken)

public virtual Task DeleteUserAsync(UserName name, CancellationToken cancellationToken)

Deletes a single User.

Parameters
Name Description
name UserName

Required. The name of the resource. For the required format, see the comment on the User.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
UserName name = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
// Make the request
await alloyDBAdminClient.DeleteUserAsync(name);

DeleteUserAsync(string, CallSettings)

public virtual Task DeleteUserAsync(string name, CallSettings callSettings = null)

Deletes a single User.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
await alloyDBAdminClient.DeleteUserAsync(name);

DeleteUserAsync(string, CancellationToken)

public virtual Task DeleteUserAsync(string name, CancellationToken cancellationToken)

Deletes a single User.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the User.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
await alloyDBAdminClient.DeleteUserAsync(name);

FailoverInstance(FailoverInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> FailoverInstance(FailoverInstanceRequest request, CallSettings callSettings = null)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
request FailoverInstanceRequest

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
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
FailoverInstanceRequest request = new FailoverInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.FailoverInstance(request);

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

FailoverInstance(InstanceName, CallSettings)

public virtual Operation<Instance, OperationMetadata> FailoverInstance(InstanceName name, CallSettings callSettings = null)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.FailoverInstance(name);

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

FailoverInstance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> FailoverInstance(string name, CallSettings callSettings = null)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.FailoverInstance(name);

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

FailoverInstanceAsync(FailoverInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(FailoverInstanceRequest request, CallSettings callSettings = null)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
request FailoverInstanceRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
FailoverInstanceRequest request = new FailoverInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.FailoverInstanceAsync(request);

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

FailoverInstanceAsync(FailoverInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(FailoverInstanceRequest request, CancellationToken cancellationToken)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
request FailoverInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
FailoverInstanceRequest request = new FailoverInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.FailoverInstanceAsync(request);

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

FailoverInstanceAsync(InstanceName, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(InstanceName name, CallSettings callSettings = null)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.FailoverInstanceAsync(name);

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

FailoverInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.FailoverInstanceAsync(name);

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

FailoverInstanceAsync(string, CallSettings)

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

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.FailoverInstanceAsync(name);

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

FailoverInstanceAsync(string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(string name, CancellationToken cancellationToken)

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.FailoverInstanceAsync(name);

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

GenerateClientCertificate(ClusterName, CallSettings)

public virtual GenerateClientCertificateResponse GenerateClientCertificate(ClusterName parent, CallSettings callSettings = null)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. The required format is:

  • projects/{project}/locations/{location}/clusters/{cluster}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GenerateClientCertificateResponse

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
GenerateClientCertificateResponse response = alloyDBAdminClient.GenerateClientCertificate(parent);

GenerateClientCertificate(GenerateClientCertificateRequest, CallSettings)

public virtual GenerateClientCertificateResponse GenerateClientCertificate(GenerateClientCertificateRequest request, CallSettings callSettings = null)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
request GenerateClientCertificateRequest

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
GenerateClientCertificateResponse

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
GenerateClientCertificateRequest request = new GenerateClientCertificateRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
    CertDuration = new Duration(),
    PublicKey = "",
    UseMetadataExchange = false,
};
// Make the request
GenerateClientCertificateResponse response = alloyDBAdminClient.GenerateClientCertificate(request);

GenerateClientCertificate(string, CallSettings)

public virtual GenerateClientCertificateResponse GenerateClientCertificate(string parent, CallSettings callSettings = null)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
parent string

Required. The name of the parent resource. The required format is:

  • projects/{project}/locations/{location}/clusters/{cluster}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GenerateClientCertificateResponse

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
GenerateClientCertificateResponse response = alloyDBAdminClient.GenerateClientCertificate(parent);

GenerateClientCertificateAsync(ClusterName, CallSettings)

public virtual Task<GenerateClientCertificateResponse> GenerateClientCertificateAsync(ClusterName parent, CallSettings callSettings = null)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. The required format is:

  • projects/{project}/locations/{location}/clusters/{cluster}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGenerateClientCertificateResponse

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
GenerateClientCertificateResponse response = await alloyDBAdminClient.GenerateClientCertificateAsync(parent);

GenerateClientCertificateAsync(ClusterName, CancellationToken)

public virtual Task<GenerateClientCertificateResponse> GenerateClientCertificateAsync(ClusterName parent, CancellationToken cancellationToken)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
parent ClusterName

Required. The name of the parent resource. The required format is:

  • projects/{project}/locations/{location}/clusters/{cluster}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGenerateClientCertificateResponse

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName parent = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
GenerateClientCertificateResponse response = await alloyDBAdminClient.GenerateClientCertificateAsync(parent);

GenerateClientCertificateAsync(GenerateClientCertificateRequest, CallSettings)

public virtual Task<GenerateClientCertificateResponse> GenerateClientCertificateAsync(GenerateClientCertificateRequest request, CallSettings callSettings = null)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
request GenerateClientCertificateRequest

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
TaskGenerateClientCertificateResponse

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GenerateClientCertificateRequest request = new GenerateClientCertificateRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
    CertDuration = new Duration(),
    PublicKey = "",
    UseMetadataExchange = false,
};
// Make the request
GenerateClientCertificateResponse response = await alloyDBAdminClient.GenerateClientCertificateAsync(request);

GenerateClientCertificateAsync(GenerateClientCertificateRequest, CancellationToken)

public virtual Task<GenerateClientCertificateResponse> GenerateClientCertificateAsync(GenerateClientCertificateRequest request, CancellationToken cancellationToken)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
request GenerateClientCertificateRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGenerateClientCertificateResponse

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GenerateClientCertificateRequest request = new GenerateClientCertificateRequest
{
    ParentAsClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
    CertDuration = new Duration(),
    PublicKey = "",
    UseMetadataExchange = false,
};
// Make the request
GenerateClientCertificateResponse response = await alloyDBAdminClient.GenerateClientCertificateAsync(request);

GenerateClientCertificateAsync(string, CallSettings)

public virtual Task<GenerateClientCertificateResponse> GenerateClientCertificateAsync(string parent, CallSettings callSettings = null)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
parent string

Required. The name of the parent resource. The required format is:

  • projects/{project}/locations/{location}/clusters/{cluster}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGenerateClientCertificateResponse

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
GenerateClientCertificateResponse response = await alloyDBAdminClient.GenerateClientCertificateAsync(parent);

GenerateClientCertificateAsync(string, CancellationToken)

public virtual Task<GenerateClientCertificateResponse> GenerateClientCertificateAsync(string parent, CancellationToken cancellationToken)

Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.

Parameters
Name Description
parent string

Required. The name of the parent resource. The required format is:

  • projects/{project}/locations/{location}/clusters/{cluster}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGenerateClientCertificateResponse

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
GenerateClientCertificateResponse response = await alloyDBAdminClient.GenerateClientCertificateAsync(parent);

GetBackup(BackupName, CallSettings)

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

Gets details of a single 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
Backup

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]");
// Make the request
Backup response = alloyDBAdminClient.GetBackup(name);

GetBackup(GetBackupRequest, CallSettings)

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

Gets details of a single 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
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]"),
};
// Make the request
Backup response = alloyDBAdminClient.GetBackup(request);

GetBackup(string, CallSettings)

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

Gets details of a single 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
Backup

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backups/[BACKUP]";
// Make the request
Backup response = alloyDBAdminClient.GetBackup(name);

GetBackupAsync(BackupName, CallSettings)

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

Gets details of a single 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
TaskBackup

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]");
// Make the request
Backup response = await alloyDBAdminClient.GetBackupAsync(name);

GetBackupAsync(BackupName, CancellationToken)

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

Gets details of a single Backup.

Parameters
Name Description
name BackupName

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
BackupName name = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]");
// Make the request
Backup response = await alloyDBAdminClient.GetBackupAsync(name);

GetBackupAsync(GetBackupRequest, CallSettings)

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

Gets details of a single 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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]"),
};
// Make the request
Backup response = await alloyDBAdminClient.GetBackupAsync(request);

GetBackupAsync(GetBackupRequest, CancellationToken)

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

Gets details of a single 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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetBackupRequest request = new GetBackupRequest
{
    BackupName = BackupName.FromProjectLocationBackup("[PROJECT]", "[LOCATION]", "[BACKUP]"),
};
// Make the request
Backup response = await alloyDBAdminClient.GetBackupAsync(request);

GetBackupAsync(string, CallSettings)

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

Gets details of a single 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
TaskBackup

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backups/[BACKUP]";
// Make the request
Backup response = await alloyDBAdminClient.GetBackupAsync(name);

GetBackupAsync(string, CancellationToken)

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

Gets details of a single Backup.

Parameters
Name Description
name string

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBackup

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/backups/[BACKUP]";
// Make the request
Backup response = await alloyDBAdminClient.GetBackupAsync(name);

GetCluster(ClusterName, CallSettings)

public virtual Cluster GetCluster(ClusterName name, CallSettings callSettings = null)

Gets details of a single Cluster.

Parameters
Name Description
name ClusterName

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Cluster

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Cluster response = alloyDBAdminClient.GetCluster(name);

GetCluster(GetClusterRequest, CallSettings)

public virtual Cluster GetCluster(GetClusterRequest request, CallSettings callSettings = null)

Gets details of a single Cluster.

Parameters
Name Description
request GetClusterRequest

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
Cluster

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    View = ClusterView.Unspecified,
};
// Make the request
Cluster response = alloyDBAdminClient.GetCluster(request);

GetCluster(string, CallSettings)

public virtual Cluster GetCluster(string name, CallSettings callSettings = null)

Gets details of a single Cluster.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Cluster

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Cluster response = alloyDBAdminClient.GetCluster(name);

GetClusterAsync(ClusterName, CallSettings)

public virtual Task<Cluster> GetClusterAsync(ClusterName name, CallSettings callSettings = null)

Gets details of a single Cluster.

Parameters
Name Description
name ClusterName

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Cluster response = await alloyDBAdminClient.GetClusterAsync(name);

GetClusterAsync(ClusterName, CancellationToken)

public virtual Task<Cluster> GetClusterAsync(ClusterName name, CancellationToken cancellationToken)

Gets details of a single Cluster.

Parameters
Name Description
name ClusterName

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Cluster response = await alloyDBAdminClient.GetClusterAsync(name);

GetClusterAsync(GetClusterRequest, CallSettings)

public virtual Task<Cluster> GetClusterAsync(GetClusterRequest request, CallSettings callSettings = null)

Gets details of a single Cluster.

Parameters
Name Description
request GetClusterRequest

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
TaskCluster

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    View = ClusterView.Unspecified,
};
// Make the request
Cluster response = await alloyDBAdminClient.GetClusterAsync(request);

GetClusterAsync(GetClusterRequest, CancellationToken)

public virtual Task<Cluster> GetClusterAsync(GetClusterRequest request, CancellationToken cancellationToken)

Gets details of a single Cluster.

Parameters
Name Description
request GetClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    View = ClusterView.Unspecified,
};
// Make the request
Cluster response = await alloyDBAdminClient.GetClusterAsync(request);

GetClusterAsync(string, CallSettings)

public virtual Task<Cluster> GetClusterAsync(string name, CallSettings callSettings = null)

Gets details of a single Cluster.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Cluster response = await alloyDBAdminClient.GetClusterAsync(name);

GetClusterAsync(string, CancellationToken)

public virtual Task<Cluster> GetClusterAsync(string name, CancellationToken cancellationToken)

Gets details of a single Cluster.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Cluster response = await alloyDBAdminClient.GetClusterAsync(name);

GetConnectionInfo(GetConnectionInfoRequest, CallSettings)

public virtual ConnectionInfo GetConnectionInfo(GetConnectionInfoRequest request, CallSettings callSettings = null)

Get instance metadata used for a connection.

Parameters
Name Description
request GetConnectionInfoRequest

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
ConnectionInfo

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
GetConnectionInfoRequest request = new GetConnectionInfoRequest
{
    ParentAsInstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
};
// Make the request
ConnectionInfo response = alloyDBAdminClient.GetConnectionInfo(request);

GetConnectionInfo(InstanceName, CallSettings)

public virtual ConnectionInfo GetConnectionInfo(InstanceName parent, CallSettings callSettings = null)

Get instance metadata used for a connection.

Parameters
Name Description
parent InstanceName

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ConnectionInfo

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
ConnectionInfo response = alloyDBAdminClient.GetConnectionInfo(parent);

GetConnectionInfo(string, CallSettings)

public virtual ConnectionInfo GetConnectionInfo(string parent, CallSettings callSettings = null)

Get instance metadata used for a connection.

Parameters
Name Description
parent string

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ConnectionInfo

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
ConnectionInfo response = alloyDBAdminClient.GetConnectionInfo(parent);

GetConnectionInfoAsync(GetConnectionInfoRequest, CallSettings)

public virtual Task<ConnectionInfo> GetConnectionInfoAsync(GetConnectionInfoRequest request, CallSettings callSettings = null)

Get instance metadata used for a connection.

Parameters
Name Description
request GetConnectionInfoRequest

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
TaskConnectionInfo

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetConnectionInfoRequest request = new GetConnectionInfoRequest
{
    ParentAsInstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
};
// Make the request
ConnectionInfo response = await alloyDBAdminClient.GetConnectionInfoAsync(request);

GetConnectionInfoAsync(GetConnectionInfoRequest, CancellationToken)

public virtual Task<ConnectionInfo> GetConnectionInfoAsync(GetConnectionInfoRequest request, CancellationToken cancellationToken)

Get instance metadata used for a connection.

Parameters
Name Description
request GetConnectionInfoRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnectionInfo

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetConnectionInfoRequest request = new GetConnectionInfoRequest
{
    ParentAsInstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
};
// Make the request
ConnectionInfo response = await alloyDBAdminClient.GetConnectionInfoAsync(request);

GetConnectionInfoAsync(InstanceName, CallSettings)

public virtual Task<ConnectionInfo> GetConnectionInfoAsync(InstanceName parent, CallSettings callSettings = null)

Get instance metadata used for a connection.

Parameters
Name Description
parent InstanceName

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnectionInfo

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
ConnectionInfo response = await alloyDBAdminClient.GetConnectionInfoAsync(parent);

GetConnectionInfoAsync(InstanceName, CancellationToken)

public virtual Task<ConnectionInfo> GetConnectionInfoAsync(InstanceName parent, CancellationToken cancellationToken)

Get instance metadata used for a connection.

Parameters
Name Description
parent InstanceName

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnectionInfo

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
ConnectionInfo response = await alloyDBAdminClient.GetConnectionInfoAsync(parent);

GetConnectionInfoAsync(string, CallSettings)

public virtual Task<ConnectionInfo> GetConnectionInfoAsync(string parent, CallSettings callSettings = null)

Get instance metadata used for a connection.

Parameters
Name Description
parent string

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnectionInfo

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
ConnectionInfo response = await alloyDBAdminClient.GetConnectionInfoAsync(parent);

GetConnectionInfoAsync(string, CancellationToken)

public virtual Task<ConnectionInfo> GetConnectionInfoAsync(string parent, CancellationToken cancellationToken)

Get instance metadata used for a connection.

Parameters
Name Description
parent string

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnectionInfo

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
ConnectionInfo response = await alloyDBAdminClient.GetConnectionInfoAsync(parent);

GetInstance(GetInstanceRequest, CallSettings)

public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
request GetInstanceRequest

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
Instance

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    View = InstanceView.Unspecified,
};
// Make the request
Instance response = alloyDBAdminClient.GetInstance(request);

GetInstance(InstanceName, CallSettings)

public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Instance response = alloyDBAdminClient.GetInstance(name);

GetInstance(string, CallSettings)

public virtual Instance GetInstance(string name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Instance response = alloyDBAdminClient.GetInstance(name);

GetInstanceAsync(GetInstanceRequest, CallSettings)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
request GetInstanceRequest

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
TaskInstance

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    View = InstanceView.Unspecified,
};
// Make the request
Instance response = await alloyDBAdminClient.GetInstanceAsync(request);

GetInstanceAsync(GetInstanceRequest, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
Name Description
request GetInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    View = InstanceView.Unspecified,
};
// Make the request
Instance response = await alloyDBAdminClient.GetInstanceAsync(request);

GetInstanceAsync(InstanceName, CallSettings)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Instance response = await alloyDBAdminClient.GetInstanceAsync(name);

GetInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
Name Description
name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Instance response = await alloyDBAdminClient.GetInstanceAsync(name);

GetInstanceAsync(string, CallSettings)

public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Instance response = await alloyDBAdminClient.GetInstanceAsync(name);

GetInstanceAsync(string, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Instance response = await alloyDBAdminClient.GetInstanceAsync(name);

GetUser(GetUserRequest, CallSettings)

public virtual User GetUser(GetUserRequest request, CallSettings callSettings = null)

Gets details of a single User.

Parameters
Name Description
request GetUserRequest

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
User

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
GetUserRequest request = new GetUserRequest
{
    UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
};
// Make the request
User response = alloyDBAdminClient.GetUser(request);

GetUser(UserName, CallSettings)

public virtual User GetUser(UserName name, CallSettings callSettings = null)

Gets details of a single User.

Parameters
Name Description
name UserName

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
User

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
UserName name = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
// Make the request
User response = alloyDBAdminClient.GetUser(name);

GetUser(string, CallSettings)

public virtual User GetUser(string name, CallSettings callSettings = null)

Gets details of a single User.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
User

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
User response = alloyDBAdminClient.GetUser(name);

GetUserAsync(GetUserRequest, CallSettings)

public virtual Task<User> GetUserAsync(GetUserRequest request, CallSettings callSettings = null)

Gets details of a single User.

Parameters
Name Description
request GetUserRequest

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
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetUserRequest request = new GetUserRequest
{
    UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
};
// Make the request
User response = await alloyDBAdminClient.GetUserAsync(request);

GetUserAsync(GetUserRequest, CancellationToken)

public virtual Task<User> GetUserAsync(GetUserRequest request, CancellationToken cancellationToken)

Gets details of a single User.

Parameters
Name Description
request GetUserRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
GetUserRequest request = new GetUserRequest
{
    UserName = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]"),
};
// Make the request
User response = await alloyDBAdminClient.GetUserAsync(request);

GetUserAsync(UserName, CallSettings)

public virtual Task<User> GetUserAsync(UserName name, CallSettings callSettings = null)

Gets details of a single User.

Parameters
Name Description
name UserName

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
UserName name = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
// Make the request
User response = await alloyDBAdminClient.GetUserAsync(name);

GetUserAsync(UserName, CancellationToken)

public virtual Task<User> GetUserAsync(UserName name, CancellationToken cancellationToken)

Gets details of a single User.

Parameters
Name Description
name UserName

Required. The name of the resource. For the required format, see the comment on the User.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
UserName name = UserName.FromProjectLocationClusterUser("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[USER]");
// Make the request
User response = await alloyDBAdminClient.GetUserAsync(name);

GetUserAsync(string, CallSettings)

public virtual Task<User> GetUserAsync(string name, CallSettings callSettings = null)

Gets details of a single User.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the User.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
User response = await alloyDBAdminClient.GetUserAsync(name);

GetUserAsync(string, CancellationToken)

public virtual Task<User> GetUserAsync(string name, CancellationToken cancellationToken)

Gets details of a single User.

Parameters
Name Description
name string

Required. The name of the resource. For the required format, see the comment on the User.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUser

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/users/[USER]";
// Make the request
User response = await alloyDBAdminClient.GetUserAsync(name);

InjectFault(InjectFaultRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> InjectFault(InjectFaultRequest request, CallSettings callSettings = null)

Injects fault in an instance. Imperative only.

Parameters
Name Description
request InjectFaultRequest

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
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InjectFaultRequest request = new InjectFaultRequest
{
    FaultType = InjectFaultRequest.Types.FaultType.Unspecified,
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.InjectFault(request);

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

InjectFault(FaultType, InstanceName, CallSettings)

public virtual Operation<Instance, OperationMetadata> InjectFault(InjectFaultRequest.Types.FaultType faultType, InstanceName name, CallSettings callSettings = null)

Injects fault in an instance. Imperative only.

Parameters
Name Description
faultType InjectFaultRequestTypesFaultType

Required. The type of fault to be injected in an instance.

name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InjectFaultRequest.Types.FaultType faultType = InjectFaultRequest.Types.FaultType.Unspecified;
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.InjectFault(faultType, name);

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

InjectFault(FaultType, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> InjectFault(InjectFaultRequest.Types.FaultType faultType, string name, CallSettings callSettings = null)

Injects fault in an instance. Imperative only.

Parameters
Name Description
faultType InjectFaultRequestTypesFaultType

Required. The type of fault to be injected in an instance.

name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceOperationMetadata

The RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
InjectFaultRequest.Types.FaultType faultType = InjectFaultRequest.Types.FaultType.Unspecified;
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = alloyDBAdminClient.InjectFault(faultType, name);

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

InjectFaultAsync(InjectFaultRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> InjectFaultAsync(InjectFaultRequest request, CallSettings callSettings = null)

Injects fault in an instance. Imperative only.

Parameters
Name Description
request InjectFaultRequest

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
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InjectFaultRequest request = new InjectFaultRequest
{
    FaultType = InjectFaultRequest.Types.FaultType.Unspecified,
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.InjectFaultAsync(request);

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

InjectFaultAsync(InjectFaultRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> InjectFaultAsync(InjectFaultRequest request, CancellationToken cancellationToken)

Injects fault in an instance. Imperative only.

Parameters
Name Description
request InjectFaultRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InjectFaultRequest request = new InjectFaultRequest
{
    FaultType = InjectFaultRequest.Types.FaultType.Unspecified,
    InstanceName = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.InjectFaultAsync(request);

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

InjectFaultAsync(FaultType, InstanceName, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> InjectFaultAsync(InjectFaultRequest.Types.FaultType faultType, InstanceName name, CallSettings callSettings = null)

Injects fault in an instance. Imperative only.

Parameters
Name Description
faultType InjectFaultRequestTypesFaultType

Required. The type of fault to be injected in an instance.

name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InjectFaultRequest.Types.FaultType faultType = InjectFaultRequest.Types.FaultType.Unspecified;
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.InjectFaultAsync(faultType, name);

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

InjectFaultAsync(FaultType, InstanceName, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> InjectFaultAsync(InjectFaultRequest.Types.FaultType faultType, InstanceName name, CancellationToken cancellationToken)

Injects fault in an instance. Imperative only.

Parameters
Name Description
faultType InjectFaultRequestTypesFaultType

Required. The type of fault to be injected in an instance.

name InstanceName

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InjectFaultRequest.Types.FaultType faultType = InjectFaultRequest.Types.FaultType.Unspecified;
InstanceName name = InstanceName.FromProjectLocationClusterInstance("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[INSTANCE]");
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.InjectFaultAsync(faultType, name);

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

InjectFaultAsync(FaultType, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> InjectFaultAsync(InjectFaultRequest.Types.FaultType faultType, string name, CallSettings callSettings = null)

Injects fault in an instance. Imperative only.

Parameters
Name Description
faultType InjectFaultRequestTypesFaultType

Required. The type of fault to be injected in an instance.

name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InjectFaultRequest.Types.FaultType faultType = InjectFaultRequest.Types.FaultType.Unspecified;
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.InjectFaultAsync(faultType, name);

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

InjectFaultAsync(FaultType, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> InjectFaultAsync(InjectFaultRequest.Types.FaultType faultType, string name, CancellationToken cancellationToken)

Injects fault in an instance. Imperative only.

Parameters
Name Description
faultType InjectFaultRequestTypesFaultType

Required. The type of fault to be injected in an instance.

name string

Required. The name of the resource. For the required format, see the comment on the Instance.name field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
InjectFaultRequest.Types.FaultType faultType = InjectFaultRequest.Types.FaultType.Unspecified;
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/instances/[INSTANCE]";
// Make the request
Operation<Instance, OperationMetadata> response = await alloyDBAdminClient.InjectFaultAsync(faultType, name);

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

ListBackups(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBackupsResponse, Backup> ListBackups(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListBackupsRequest

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
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = alloyDBAdminClient.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
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
ListBackupsRequest request = new ListBackupsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = alloyDBAdminClient.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. Parent value for ListBackupsRequest

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
AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListBackupsResponse, Backup> response = alloyDBAdminClient.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(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBackupsResponse, Backup> ListBackupsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Backups in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListBackupsRequest

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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = alloyDBAdminClient.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
AlloyDBAdminClient alloyDBAdminClient = await AlloyDBAdminClient.CreateAsync();
// Initialize request argument(s)
ListBackupsRequest request = new ListBackupsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListBackupsResponse, Backup> response = alloyDBAdminClient.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. Parent value for ListBackupsRequest

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
PagedAsyncEnumerable