Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

AlloyDB

import { AlloyDB } from "https://googleapis.deno.dev/v1/alloydb:v1.ts";

AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.

class AlloyDB {
constructor(client?: CredentialsClient, baseUrl?: string);
async projectsLocationsBackupsCreate(
parent: string,
req: Backup,
): Promise<Operation>;
async projectsLocationsBackupsDelete(name: string, opts?: ProjectsLocationsBackupsDeleteOptions): Promise<Operation>;
async projectsLocationsBackupsGet(name: string): Promise<Backup>;
async projectsLocationsBackupsList(parent: string, opts?: ProjectsLocationsBackupsListOptions): Promise<ListBackupsResponse>;
async projectsLocationsBackupsPatch(
name: string,
req: Backup,
): Promise<Operation>;
async projectsLocationsClustersCreate(
parent: string,
req: Cluster,
): Promise<Operation>;
async projectsLocationsClustersCreatesecondary(
parent: string,
req: Cluster,
): Promise<Operation>;
async projectsLocationsClustersDelete(name: string, opts?: ProjectsLocationsClustersDeleteOptions): Promise<Operation>;
async projectsLocationsClustersGet(name: string, opts?: ProjectsLocationsClustersGetOptions): Promise<Cluster>;
async projectsLocationsClustersInstancesCreate(
parent: string,
req: Instance,
): Promise<Operation>;
async projectsLocationsClustersInstancesCreatesecondary(
parent: string,
req: Instance,
): Promise<Operation>;
async projectsLocationsClustersInstancesDelete(name: string, opts?: ProjectsLocationsClustersInstancesDeleteOptions): Promise<Operation>;
async projectsLocationsClustersInstancesFailover(name: string, req: FailoverInstanceRequest): Promise<Operation>;
async projectsLocationsClustersInstancesGet(name: string, opts?: ProjectsLocationsClustersInstancesGetOptions): Promise<Instance>;
async projectsLocationsClustersInstancesGetConnectionInfo(parent: string, opts?: ProjectsLocationsClustersInstancesGetConnectionInfoOptions): Promise<ConnectionInfo>;
async projectsLocationsClustersInstancesInjectFault(name: string, req: InjectFaultRequest): Promise<Operation>;
async projectsLocationsClustersInstancesList(parent: string, opts?: ProjectsLocationsClustersInstancesListOptions): Promise<ListInstancesResponse>;
async projectsLocationsClustersInstancesPatch(
name: string,
req: Instance,
): Promise<Operation>;
async projectsLocationsClustersInstancesRestart(name: string, req: RestartInstanceRequest): Promise<Operation>;
async projectsLocationsClustersList(parent: string, opts?: ProjectsLocationsClustersListOptions): Promise<ListClustersResponse>;
async projectsLocationsClustersPatch(
name: string,
req: Cluster,
): Promise<Operation>;
async projectsLocationsClustersPromote(name: string, req: PromoteClusterRequest): Promise<Operation>;
async projectsLocationsClustersRestore(parent: string, req: RestoreClusterRequest): Promise<Operation>;
async projectsLocationsClustersUsersCreate(
parent: string,
req: User,
): Promise<User>;
async projectsLocationsClustersUsersDelete(name: string, opts?: ProjectsLocationsClustersUsersDeleteOptions): Promise<Empty>;
async projectsLocationsClustersUsersGet(name: string): Promise<User>;
async projectsLocationsClustersUsersList(parent: string, opts?: ProjectsLocationsClustersUsersListOptions): Promise<ListUsersResponse>;
async projectsLocationsClustersUsersPatch(
name: string,
req: User,
): Promise<User>;
async projectsLocationsGet(name: string): Promise<GoogleCloudLocationLocation>;
async projectsLocationsList(name: string, opts?: ProjectsLocationsListOptions): Promise<GoogleCloudLocationListLocationsResponse>;
async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise<Empty>;
async projectsLocationsOperationsDelete(name: string): Promise<Empty>;
async projectsLocationsOperationsGet(name: string): Promise<Operation>;
async projectsLocationsOperationsList(name: string, opts?: ProjectsLocationsOperationsListOptions): Promise<ListOperationsResponse>;
async projectsLocationsSupportedDatabaseFlagsList(parent: string, opts?: ProjectsLocationsSupportedDatabaseFlagsListOptions): Promise<ListSupportedDatabaseFlagsResponse>;
}

§Constructors

§
new AlloyDB(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
projectsLocationsBackupsCreate(parent: string, req: Backup, opts?: ProjectsLocationsBackupsCreateOptions): Promise<Operation>
[src]

Creates a new Backup in a given project and location.

@param parent

Required. Value for parent.

§
projectsLocationsBackupsDelete(name: string, opts?: ProjectsLocationsBackupsDeleteOptions): Promise<Operation>
[src]

Deletes a single Backup.

@param name

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

§
projectsLocationsBackupsGet(name: string): Promise<Backup>
[src]

Gets details of a single Backup.

@param name

Required. Name of the resource

§
projectsLocationsBackupsList(parent: string, opts?: ProjectsLocationsBackupsListOptions): Promise<ListBackupsResponse>
[src]

Lists Backups in a given project and location.

@param parent

Required. Parent value for ListBackupsRequest

§
projectsLocationsBackupsPatch(name: string, req: Backup, opts?: ProjectsLocationsBackupsPatchOptions): Promise<Operation>
[src]

Updates the parameters of a single Backup.

@param name

Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression [a-z]([a-z0-9-]{0,61}[a-z0-9])?, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}

§
projectsLocationsClustersCreate(parent: string, req: Cluster, opts?: ProjectsLocationsClustersCreateOptions): Promise<Operation>
[src]

Creates a new Cluster in a given project and location.

@param parent

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

§
projectsLocationsClustersCreatesecondary(parent: string, req: Cluster, opts?: ProjectsLocationsClustersCreatesecondaryOptions): Promise<Operation>
[src]

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

@param parent

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

§
projectsLocationsClustersDelete(name: string, opts?: ProjectsLocationsClustersDeleteOptions): Promise<Operation>
[src]

Deletes a single Cluster.

@param name

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

§
projectsLocationsClustersGet(name: string, opts?: ProjectsLocationsClustersGetOptions): Promise<Cluster>
[src]

Gets details of a single Cluster.

@param name

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

§
projectsLocationsClustersInstancesCreate(parent: string, req: Instance, opts?: ProjectsLocationsClustersInstancesCreateOptions): Promise<Operation>
[src]

Creates a new Instance in a given project and location.

@param parent

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

§
projectsLocationsClustersInstancesCreatesecondary(parent: string, req: Instance, opts?: ProjectsLocationsClustersInstancesCreatesecondaryOptions): Promise<Operation>
[src]

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

@param parent

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

§
projectsLocationsClustersInstancesDelete(name: string, opts?: ProjectsLocationsClustersInstancesDeleteOptions): Promise<Operation>
[src]

Deletes a single Instance.

@param name

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

§
projectsLocationsClustersInstancesFailover(name: string, req: FailoverInstanceRequest): Promise<Operation>
[src]

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

@param name

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

§
projectsLocationsClustersInstancesGet(name: string, opts?: ProjectsLocationsClustersInstancesGetOptions): Promise<Instance>
[src]

Gets details of a single Instance.

@param name

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

§
projectsLocationsClustersInstancesGetConnectionInfo(parent: string, opts?: ProjectsLocationsClustersInstancesGetConnectionInfoOptions): Promise<ConnectionInfo>
[src]

Get instance metadata used for a connection.

@param parent

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

§
projectsLocationsClustersInstancesInjectFault(name: string, req: InjectFaultRequest): Promise<Operation>
[src]

Injects fault in an instance. Imperative only.

@param name

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

§
projectsLocationsClustersInstancesList(parent: string, opts?: ProjectsLocationsClustersInstancesListOptions): Promise<ListInstancesResponse>
[src]

Lists Instances in a given project and location.

@param parent

Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project}/locations/-/clusters/- * projects/{project}/locations/{region}/clusters/-

§
projectsLocationsClustersInstancesPatch(name: string, req: Instance, opts?: ProjectsLocationsClustersInstancesPatchOptions): Promise<Operation>
[src]

Updates the parameters of a single Instance.

@param name

Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} where the cluster and instance ID segments should satisfy the regex expression [a-z]([a-z0-9-]{0,61}[a-z0-9])?, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project}/locations/{region}/clusters/{cluster_id}

§
projectsLocationsClustersInstancesRestart(name: string, req: RestartInstanceRequest): Promise<Operation>
[src]

Restart an Instance in a cluster. Imperative only.

@param name

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

§
projectsLocationsClustersList(parent: string, opts?: ProjectsLocationsClustersListOptions): Promise<ListClustersResponse>
[src]

Lists Clusters in a given project and location.

@param parent

Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-

§
projectsLocationsClustersPatch(name: string, req: Cluster, opts?: ProjectsLocationsClustersPatchOptions): Promise<Operation>
[src]

Updates the parameters of a single Cluster.

@param name

Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression [a-z0-9-]+. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}

§
projectsLocationsClustersPromote(name: string, req: PromoteClusterRequest): Promise<Operation>
[src]

Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.

@param name

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

§
projectsLocationsClustersRestore(parent: string, req: RestoreClusterRequest): Promise<Operation>
[src]

Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.

@param parent

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

§
projectsLocationsClustersUsersCreate(parent: string, req: User, opts?: ProjectsLocationsClustersUsersCreateOptions): Promise<User>
[src]

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

@param parent

Required. Value for parent.

§
projectsLocationsClustersUsersDelete(name: string, opts?: ProjectsLocationsClustersUsersDeleteOptions): Promise<Empty>
[src]

Deletes a single User.

@param name

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

§
projectsLocationsClustersUsersGet(name: string): Promise<User>
[src]

Gets details of a single User.

@param name

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

§
projectsLocationsClustersUsersList(parent: string, opts?: ProjectsLocationsClustersUsersListOptions): Promise<ListUsersResponse>
[src]

Lists Users in a given project and location.

@param parent

Required. Parent value for ListUsersRequest

§
projectsLocationsClustersUsersPatch(name: string, req: User, opts?: ProjectsLocationsClustersUsersPatchOptions): Promise<User>
[src]

Updates the parameters of a single User.

@param name

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

§
projectsLocationsGet(name: string): Promise<GoogleCloudLocationLocation>
[src]

Gets information about a location.

@param name

Resource name for the location.

§
projectsLocationsList(name: string, opts?: ProjectsLocationsListOptions): Promise<GoogleCloudLocationListLocationsResponse>
[src]

Lists information about the supported locations for this service.

@param name

The resource that owns the locations collection, if applicable.

§
projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise<Empty>
[src]

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

@param name

The name of the operation resource to be cancelled.

§
projectsLocationsOperationsDelete(name: string): Promise<Empty>
[src]

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

@param name

The name of the operation resource to be deleted.

§
projectsLocationsOperationsGet(name: string): Promise<Operation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
projectsLocationsOperationsList(name: string, opts?: ProjectsLocationsOperationsListOptions): Promise<ListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
projectsLocationsSupportedDatabaseFlagsList(parent: string, opts?: ProjectsLocationsSupportedDatabaseFlagsListOptions): Promise<ListSupportedDatabaseFlagsResponse>
[src]

Lists SupportedDatabaseFlags for a given project and location.

@param parent

Required. The name of the parent resource. The required format is: * projects/{project}/locations/{location} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.