AlloyDB v1beta API - Class AlloyDBAdminClient (1.0.0-beta01)

public abstract class AlloyDBAdminClient

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

AlloyDBAdmin client wrapper, for convenient use.

Inheritance

object > AlloyDBAdminClient

Derived Types

Namespace

GoogleCloudGoogle.Cloud.AlloyDbV1Beta

Assembly

Google.Cloud.AlloyDb.V1Beta.dll

Remarks

Service describing handlers for resources

Properties

BatchCreateInstancesOperationsClient

public virtual OperationsClient BatchCreateInstancesOperationsClient { get; }

The long-running operations client for BatchCreateInstances.

Property Value
TypeDescription
OperationsClient

CreateBackupOperationsClient

public virtual OperationsClient CreateBackupOperationsClient { get; }

The long-running operations client for CreateBackup.

Property Value
TypeDescription
OperationsClient

CreateClusterOperationsClient

public virtual OperationsClient CreateClusterOperationsClient { get; }

The long-running operations client for CreateCluster.

Property Value
TypeDescription
OperationsClient

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
TypeDescription
OperationsClient

CreateSecondaryClusterOperationsClient

public virtual OperationsClient CreateSecondaryClusterOperationsClient { get; }

The long-running operations client for CreateSecondaryCluster.

Property Value
TypeDescription
OperationsClient

CreateSecondaryInstanceOperationsClient

public virtual OperationsClient CreateSecondaryInstanceOperationsClient { get; }

The long-running operations client for CreateSecondaryInstance.

Property Value
TypeDescription
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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AlloyDBAdmin scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default AlloyDBAdmin scopes are:

DeleteBackupOperationsClient

public virtual OperationsClient DeleteBackupOperationsClient { get; }

The long-running operations client for DeleteBackup.

Property Value
TypeDescription
OperationsClient

DeleteClusterOperationsClient

public virtual OperationsClient DeleteClusterOperationsClient { get; }

The long-running operations client for DeleteCluster.

Property Value
TypeDescription
OperationsClient

DeleteInstanceOperationsClient

public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
TypeDescription
OperationsClient

FailoverInstanceOperationsClient

public virtual OperationsClient FailoverInstanceOperationsClient { get; }

The long-running operations client for FailoverInstance.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual AlloyDBAdmin.AlloyDBAdminClient GrpcClient { get; }

The underlying gRPC AlloyDBAdmin client

Property Value
TypeDescription
AlloyDBAdminAlloyDBAdminClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

PromoteClusterOperationsClient

public virtual OperationsClient PromoteClusterOperationsClient { get; }

The long-running operations client for PromoteCluster.

Property Value
TypeDescription
OperationsClient

RestartInstanceOperationsClient

public virtual OperationsClient RestartInstanceOperationsClient { get; }

The long-running operations client for RestartInstance.

Property Value
TypeDescription
OperationsClient

RestoreClusterOperationsClient

public virtual OperationsClient RestoreClusterOperationsClient { get; }

The long-running operations client for RestoreCluster.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateBackupOperationsClient

public virtual OperationsClient UpdateBackupOperationsClient { get; }

The long-running operations client for UpdateBackup.

Property Value
TypeDescription
OperationsClient

UpdateClusterOperationsClient

public virtual OperationsClient UpdateClusterOperationsClient { get; }

The long-running operations client for UpdateCluster.

Property Value
TypeDescription
OperationsClient

UpdateInstanceOperationsClient

public virtual OperationsClient UpdateInstanceOperationsClient { get; }

The long-running operations client for UpdateInstance.

Property Value
TypeDescription
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
NameDescription
requestBatchCreateInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestBatchCreateInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestBatchCreateInstancesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Value for parent.

backupBackup

Required. The resource being created

backupIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateBackupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Value for parent.

backupBackup

Required. The resource being created

backupIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Value for parent.

backupBackup

Required. The resource being created

backupIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Value for parent.

backupBackup

Required. The resource being created

backupIdstring

Required. ID of the requesting object.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestCreateBackupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateBackupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Value for parent.

backupBackup

Required. The resource being created

backupIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Value for parent.

backupBackup

Required. The resource being created

backupIdstring

Required. ID of the requesting object.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

clusterCluster

Required. The resource being created

clusterIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

clusterCluster

Required. The resource being created

clusterIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

clusterCluster

Required. The resource being created

clusterIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

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

clusterCluster

Required. The resource being created

clusterIdstring

Required. ID of the requesting object.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestCreateClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateClusterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentstring

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

clusterCluster

Required. The resource being created

clusterIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

clusterCluster

Required. The resource being created

clusterIdstring

Required. ID of the requesting object.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentClusterName

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

instanceInstance

Required. The resource being created

instanceIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

instanceInstance

Required. The resource being created

instanceIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentClusterName

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

instanceInstance

Required. The resource being created

instanceIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentClusterName

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

instanceInstance

Required. The resource being created

instanceIdstring

Required. ID of the requesting object.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentstring

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

instanceInstance

Required. The resource being created

instanceIdstring

Required. ID of the requesting object.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

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

instanceInstance

Required. The resource being created

instanceIdstring

Required. ID of the requesting object.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The name of the parent resource (the primary cluster). For the required format, see the comment on the Cluster.name field.

clusterCluster

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

clusterIdstring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateSecondaryClusterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. The name of the parent resource (the primary cluster). For the required format, see the comment on the Cluster.name field.

clusterCluster

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