// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * AlloyDB API Client for Deno * =========================== * * 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. * * Docs: https://cloud.google.com/alloydb/ * Source: https://googleapis.deno.dev/v1/alloydb:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * 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. */ export class AlloyDB { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://alloydb.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a new Backup in a given project and location. * * @param parent Required. Value for parent. */ async projectsLocationsBackupsCreate(parent: string, req: Backup, opts: ProjectsLocationsBackupsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backups`); if (opts.backupId !== undefined) { url.searchParams.append("backupId", String(opts.backupId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Backup. * * @param name Required. Name of the resource. For the required format, see the comment on the Backup.name field. */ async projectsLocationsBackupsDelete(name: string, opts: ProjectsLocationsBackupsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single Backup. * * @param name Required. Name of the resource */ async projectsLocationsBackupsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Backup; } /** * Lists Backups in a given project and location. * * @param parent Required. Parent value for ListBackupsRequest */ async projectsLocationsBackupsList(parent: string, opts: ProjectsLocationsBackupsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/backups`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListBackupsResponse; } /** * 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} */ async projectsLocationsBackupsPatch(name: string, req: Backup, opts: ProjectsLocationsBackupsPatchOptions = {}): Promise { opts = serializeProjectsLocationsBackupsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersCreate(parent: string, req: Cluster, opts: ProjectsLocationsClustersCreateOptions = {}): Promise { req = serializeCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/clusters`); if (opts.clusterId !== undefined) { url.searchParams.append("clusterId", String(opts.clusterId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersCreatesecondary(parent: string, req: Cluster, opts: ProjectsLocationsClustersCreatesecondaryOptions = {}): Promise { req = serializeCluster(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/clusters:createsecondary`); if (opts.clusterId !== undefined) { url.searchParams.append("clusterId", String(opts.clusterId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Cluster. * * @param name Required. The name of the resource. For the required format, see the comment on the Cluster.name field. */ async projectsLocationsClustersDelete(name: string, opts: ProjectsLocationsClustersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Exports data from the cluster. Imperative only. * * @param name Required. The resource name of the cluster. */ async projectsLocationsClustersExport(name: string, req: ExportClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:export`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersGet(name: string, opts: ProjectsLocationsClustersGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeCluster(data); } /** * 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. */ async projectsLocationsClustersInstancesCreate(parent: string, req: Instance, opts: ProjectsLocationsClustersInstancesCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/instances`); if (opts.instanceId !== undefined) { url.searchParams.append("instanceId", String(opts.instanceId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersInstancesCreatesecondary(parent: string, req: Instance, opts: ProjectsLocationsClustersInstancesCreatesecondaryOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/instances:createsecondary`); if (opts.instanceId !== undefined) { url.searchParams.append("instanceId", String(opts.instanceId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single Instance. * * @param name Required. The name of the resource. For the required format, see the comment on the Instance.name field. */ async projectsLocationsClustersInstancesDelete(name: string, opts: ProjectsLocationsClustersInstancesDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.etag !== undefined) { url.searchParams.append("etag", String(opts.etag)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * 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. */ async projectsLocationsClustersInstancesFailover(name: string, req: FailoverInstanceRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:failover`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersInstancesGet(name: string, opts: ProjectsLocationsClustersInstancesGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Instance; } /** * 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} */ async projectsLocationsClustersInstancesGetConnectionInfo(parent: string, opts: ProjectsLocationsClustersInstancesGetConnectionInfoOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/connectionInfo`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ConnectionInfo; } /** * 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. */ async projectsLocationsClustersInstancesInjectFault(name: string, req: InjectFaultRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:injectFault`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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/- */ async projectsLocationsClustersInstancesList(parent: string, opts: ProjectsLocationsClustersInstancesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/instances`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListInstancesResponse; } /** * 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} */ async projectsLocationsClustersInstancesPatch(name: string, req: Instance, opts: ProjectsLocationsClustersInstancesPatchOptions = {}): Promise { opts = serializeProjectsLocationsClustersInstancesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersInstancesRestart(name: string, req: RestartInstanceRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:restart`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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/- */ async projectsLocationsClustersList(parent: string, opts: ProjectsLocationsClustersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/clusters`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListClustersResponse(data); } /** * 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} */ async projectsLocationsClustersPatch(name: string, req: Cluster, opts: ProjectsLocationsClustersPatchOptions = {}): Promise { req = serializeCluster(req); opts = serializeProjectsLocationsClustersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * 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 */ async projectsLocationsClustersPromote(name: string, req: PromoteClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:promote`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * 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. */ async projectsLocationsClustersRestore(parent: string, req: RestoreClusterRequest): Promise { req = serializeRestoreClusterRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/clusters:restore`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Switches the roles of PRIMARY and SECONDARY clusters without any data * loss. This promotes the SECONDARY cluster to PRIMARY and sets up the * original PRIMARY cluster to replicate from this newly promoted cluster. * * @param name Required. The name of the resource. For the required format, see the comment on the Cluster.name field */ async projectsLocationsClustersSwitchover(name: string, req: SwitchoverClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:switchover`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Upgrades a single Cluster. Imperative only. * * @param name Required. The resource name of the cluster. */ async projectsLocationsClustersUpgrade(name: string, req: UpgradeClusterRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:upgrade`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as Operation; } /** * Creates a new User in a given project, location, and cluster. * * @param parent Required. Value for parent. */ async projectsLocationsClustersUsersCreate(parent: string, req: User, opts: ProjectsLocationsClustersUsersCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/users`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.userId !== undefined) { url.searchParams.append("userId", String(opts.userId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as User; } /** * Deletes a single User. * * @param name Required. The name of the resource. For the required format, see the comment on the User.name field. */ async projectsLocationsClustersUsersDelete(name: string, opts: ProjectsLocationsClustersUsersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * 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. */ async projectsLocationsClustersUsersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as User; } /** * Lists Users in a given project and location. * * @param parent Required. Parent value for ListUsersRequest */ async projectsLocationsClustersUsersList(parent: string, opts: ProjectsLocationsClustersUsersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/users`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListUsersResponse; } /** * 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}. */ async projectsLocationsClustersUsersPatch(name: string, req: User, opts: ProjectsLocationsClustersUsersPatchOptions = {}): Promise { opts = serializeProjectsLocationsClustersUsersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.allowMissing !== undefined) { url.searchParams.append("allowMissing", String(opts.allowMissing)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as User; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudLocationLocation; } /** * Lists information about the supported locations for this service. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/locations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudLocationListLocationsResponse; } /** * 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. */ async projectsLocationsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * 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. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * 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. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * 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. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * 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. */ async projectsLocationsSupportedDatabaseFlagsList(parent: string, opts: ProjectsLocationsSupportedDatabaseFlagsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/supportedDatabaseFlags`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListSupportedDatabaseFlagsResponse(data); } } /** * AuthorizedNetwork contains metadata for an authorized network. */ export interface AuthorizedNetwork { /** * CIDR range for one authorzied network of the instance. */ cidrRange?: string; } /** * Message describing the user-specified automated backup policy. All fields in * the automated backup policy are optional. Defaults for each field are * provided if they are not set. */ export interface AutomatedBackupPolicy { /** * The length of the time window during which a backup can be taken. If a * backup does not succeed within this time window, it will be canceled and * considered failed. The backup window must be at least 5 minutes long. There * is no upper bound on the window. If not set, it defaults to 1 hour. */ backupWindow?: number /* Duration */; /** * Whether automated automated backups are enabled. If not set, defaults to * true. */ enabled?: boolean; /** * Optional. The encryption config can be specified to encrypt the backups * with a customer-managed encryption key (CMEK). When this field is not * specified, the backup will then use default encryption scheme to protect * the user data. */ encryptionConfig?: EncryptionConfig; /** * Labels to apply to backups created using this configuration. */ labels?: { [key: string]: string }; /** * The location where the backup will be stored. Currently, the only * supported option is to store the backup in the same region as the cluster. * If empty, defaults to the region of the cluster. */ location?: string; /** * Quantity-based Backup retention policy to retain recent backups. */ quantityBasedRetention?: QuantityBasedRetention; /** * Time-based Backup retention policy. */ timeBasedRetention?: TimeBasedRetention; /** * Weekly schedule for the Backup. */ weeklySchedule?: WeeklySchedule; } function serializeAutomatedBackupPolicy(data: any): AutomatedBackupPolicy { return { ...data, backupWindow: data["backupWindow"] !== undefined ? data["backupWindow"] : undefined, timeBasedRetention: data["timeBasedRetention"] !== undefined ? serializeTimeBasedRetention(data["timeBasedRetention"]) : undefined, }; } function deserializeAutomatedBackupPolicy(data: any): AutomatedBackupPolicy { return { ...data, backupWindow: data["backupWindow"] !== undefined ? data["backupWindow"] : undefined, timeBasedRetention: data["timeBasedRetention"] !== undefined ? deserializeTimeBasedRetention(data["timeBasedRetention"]) : undefined, }; } /** * Message describing Backup object */ export interface Backup { /** * Annotations to allow client tools to store small amount of arbitrary data. * This is distinct from labels. https://google.aip.dev/128 */ annotations?: { [key: string]: string }; /** * Required. The full resource name of the backup source cluster (e.g., * projects/{project}/locations/{region}/clusters/{cluster_id}). */ clusterName?: string; /** * Output only. The system-generated UID of the cluster which was used to * create this resource. */ readonly clusterUid?: string; /** * Output only. Create time stamp */ readonly createTime?: Date; /** * Output only. The database engine major version of the cluster this backup * was created from. Any restored cluster created from this backup will have * the same database version. */ readonly databaseVersion?: | "DATABASE_VERSION_UNSPECIFIED" | "POSTGRES_13" | "POSTGRES_14" | "POSTGRES_15" | "POSTGRES_16"; /** * Output only. Delete time stamp */ readonly deleteTime?: Date; /** * User-provided description of the backup. */ description?: string; /** * User-settable and human-readable display name for the Backup. */ displayName?: string; /** * Optional. The encryption config can be specified to encrypt the backup * with a customer-managed encryption key (CMEK). When this field is not * specified, the backup will then use default encryption scheme to protect * the user data. */ encryptionConfig?: EncryptionConfig; /** * Output only. The encryption information for the backup. */ readonly encryptionInfo?: EncryptionInfo; /** * For Resource freshness validation (https://google.aip.dev/154) */ etag?: string; /** * Output only. The QuantityBasedExpiry of the backup, specified by the * backup's retention policy. Once the expiry quantity is over retention, the * backup is eligible to be garbage collected. */ readonly expiryQuantity?: QuantityBasedExpiry; /** * Output only. The time at which after the backup is eligible to be garbage * collected. It is the duration specified by the backup's retention policy, * added to the backup's create_time. */ readonly expiryTime?: Date; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * 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} */ readonly name?: string; /** * Output only. Reconciling (https://google.aip.dev/128#reconciliation), if * true, indicates that the service is actively updating the resource. This * can happen due to user-triggered updates or system actions like failover or * maintenance. */ readonly reconciling?: boolean; /** * Output only. Reserved for future use. */ readonly satisfiesPzs?: boolean; /** * Output only. The size of the backup in bytes. */ readonly sizeBytes?: bigint; /** * Output only. The current state of the backup. */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "CREATING" | "FAILED" | "DELETING"; /** * Optional. Input only. Immutable. Tag keys/values directly bound to this * resource. For example: ``` "123/environment": "production", * "123/costCenter": "marketing" ``` */ tags?: { [key: string]: string }; /** * The backup type, which suggests the trigger for the backup. */ type?: | "TYPE_UNSPECIFIED" | "ON_DEMAND" | "AUTOMATED" | "CONTINUOUS"; /** * Output only. The system-generated UID of the resource. The UID is assigned * when the resource is created, and it is retained until it is deleted. */ readonly uid?: string; /** * Output only. Update time stamp */ readonly updateTime?: Date; } /** * Message describing a BackupSource. */ export interface BackupSource { /** * Required. The name of the backup resource with the format: * * projects/{project}/locations/{region}/backups/{backup_id} */ backupName?: string; /** * Output only. The system-generated UID of the backup which was used to * create this resource. The UID is generated when the backup is created, and * it is retained until the backup is deleted. */ readonly backupUid?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * Client connection configuration */ export interface ClientConnectionConfig { /** * Optional. Configuration to enforce connectors only (ex: AuthProxy) * connections to the database. */ requireConnectors?: boolean; /** * Optional. SSL configuration option for this instance. */ sslConfig?: SslConfig; } /** * Operation metadata returned by the CLH during resource state reconciliation. */ export interface CloudControl2SharedOperationsReconciliationOperationMetadata { /** * DEPRECATED. Use exclusive_action instead. */ deleteResource?: boolean; /** * Excluisive action returned by the CLH. */ exclusiveAction?: | "UNKNOWN_REPAIR_ACTION" | "DELETE" | "RETRY"; } /** * A cluster is a collection of regional AlloyDB resources. It can include a * primary instance and one or more read pool instances. All cluster resources * share a storage layer, which scales as needed. */ export interface Cluster { /** * Annotations to allow client tools to store small amount of arbitrary data. * This is distinct from labels. https://google.aip.dev/128 */ annotations?: { [key: string]: string }; /** * The automated backup policy for this cluster. If no policy is provided * then the default policy will be used. If backups are supported for the * cluster, the default policy takes one backup a day, has a backup window of * 1 hour, and retains backups for 14 days. For more information on the * defaults, consult the documentation for the message type. */ automatedBackupPolicy?: AutomatedBackupPolicy; /** * Output only. Cluster created from backup. */ readonly backupSource?: BackupSource; /** * Output only. The type of the cluster. This is an output-only field and * it's populated at the Cluster creation time or the Cluster promotion time. * The cluster type is determined by which RPC was used to create the cluster * (i.e. `CreateCluster` vs. `CreateSecondaryCluster` */ readonly clusterType?: | "CLUSTER_TYPE_UNSPECIFIED" | "PRIMARY" | "SECONDARY"; /** * Optional. Continuous backup configuration for this cluster. */ continuousBackupConfig?: ContinuousBackupConfig; /** * Output only. Continuous backup properties for this cluster. */ readonly continuousBackupInfo?: ContinuousBackupInfo; /** * Output only. Create time stamp */ readonly createTime?: Date; /** * Optional. The database engine major version. This is an optional field and * it is populated at the Cluster creation time. If a database version is not * supplied at cluster creation time, then a default database version will be * used. */ databaseVersion?: | "DATABASE_VERSION_UNSPECIFIED" | "POSTGRES_13" | "POSTGRES_14" | "POSTGRES_15" | "POSTGRES_16"; /** * Output only. Delete time stamp */ readonly deleteTime?: Date; /** * User-settable and human-readable display name for the Cluster. */ displayName?: string; /** * Optional. The encryption config can be specified to encrypt the data disks * and other persistent data resources of a cluster with a customer-managed * encryption key (CMEK). When this field is not specified, the cluster will * then use default encryption scheme to protect the user data. */ encryptionConfig?: EncryptionConfig; /** * Output only. The encryption information for the cluster. */ readonly encryptionInfo?: EncryptionInfo; /** * For Resource freshness validation (https://google.aip.dev/154) */ etag?: string; /** * Input only. Initial user to setup during cluster creation. Required. If * used in `RestoreCluster` this is ignored. */ initialUser?: UserPassword; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * Output only. The maintenance schedule for the cluster, generated for a * specific rollout if a maintenance window is set. */ readonly maintenanceSchedule?: MaintenanceSchedule; /** * Optional. The maintenance update policy determines when to allow or deny * updates. */ maintenanceUpdatePolicy?: MaintenanceUpdatePolicy; /** * Output only. Cluster created via DMS migration. */ readonly migrationSource?: MigrationSource; /** * 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} */ readonly name?: string; /** * Required. The resource link for the VPC network in which cluster resources * are created and from which they are accessible via Private IP. The network * must belong to the same project as the cluster. It is specified in the * form: `projects/{project}/global/networks/{network_id}`. This is required * to create a cluster. Deprecated, use network_config.network instead. */ network?: string; networkConfig?: NetworkConfig; /** * Output only. Cross Region replication config specific to PRIMARY cluster. */ readonly primaryConfig?: PrimaryConfig; /** * Optional. The configuration for Private Service Connect (PSC) for the * cluster. */ pscConfig?: PscConfig; /** * Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set * to true if the current state of Cluster does not match the user's intended * state, and the service is actively updating the resource to reconcile them. * This can happen due to user-triggered updates or system actions like * failover or maintenance. */ readonly reconciling?: boolean; /** * Output only. Reserved for future use. */ readonly satisfiesPzs?: boolean; /** * Cross Region replication config specific to SECONDARY cluster. */ secondaryConfig?: SecondaryConfig; /** * SSL configuration for this AlloyDB cluster. */ sslConfig?: SslConfig; /** * Output only. The current serving state of the cluster. */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "STOPPED" | "EMPTY" | "CREATING" | "DELETING" | "FAILED" | "BOOTSTRAPPING" | "MAINTENANCE" | "PROMOTING"; /** * Optional. Subscription type of the cluster. */ subscriptionType?: | "SUBSCRIPTION_TYPE_UNSPECIFIED" | "STANDARD" | "TRIAL"; /** * Optional. Input only. Immutable. Tag keys/values directly bound to this * resource. For example: ``` "123/environment": "production", * "123/costCenter": "marketing" ``` */ tags?: { [key: string]: string }; /** * Output only. Metadata for free trial clusters */ readonly trialMetadata?: TrialMetadata; /** * Output only. The system-generated UID of the resource. The UID is assigned * when the resource is created, and it is retained until it is deleted. */ readonly uid?: string; /** * Output only. Update time stamp */ readonly updateTime?: Date; } function serializeCluster(data: any): Cluster { return { ...data, automatedBackupPolicy: data["automatedBackupPolicy"] !== undefined ? serializeAutomatedBackupPolicy(data["automatedBackupPolicy"]) : undefined, }; } function deserializeCluster(data: any): Cluster { return { ...data, automatedBackupPolicy: data["automatedBackupPolicy"] !== undefined ? deserializeAutomatedBackupPolicy(data["automatedBackupPolicy"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, trialMetadata: data["trialMetadata"] !== undefined ? deserializeTrialMetadata(data["trialMetadata"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Upgrade details of a cluster. This cluster can be primary or secondary. */ export interface ClusterUpgradeDetails { /** * Cluster type which can either be primary or secondary. */ clusterType?: | "CLUSTER_TYPE_UNSPECIFIED" | "PRIMARY" | "SECONDARY"; /** * Database version of the cluster after the upgrade operation. This will be * the target version if the upgrade was successful otherwise it remains the * same as that before the upgrade operation. */ databaseVersion?: | "DATABASE_VERSION_UNSPECIFIED" | "POSTGRES_13" | "POSTGRES_14" | "POSTGRES_15" | "POSTGRES_16"; /** * Upgrade details of the instances directly associated with this cluster. */ instanceUpgradeDetails?: InstanceUpgradeDetails[]; /** * Normalized name of the cluster */ name?: string; /** * Array containing stage info associated with this cluster. */ stageInfo?: StageInfo[]; /** * Upgrade status of the cluster. */ upgradeStatus?: | "STATUS_UNSPECIFIED" | "NOT_STARTED" | "IN_PROGRESS" | "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS" | "CANCEL_IN_PROGRESS" | "CANCELLED"; } /** * ConnectionInfo singleton resource. https://google.aip.dev/156 */ export interface ConnectionInfo { /** * Output only. The unique ID of the Instance. */ readonly instanceUid?: string; /** * Output only. The private network IP address for the Instance. This is the * default IP for the instance and is always created (even if enable_public_ip * is set). This is the connection endpoint for an end-user application. */ readonly ipAddress?: string; /** * The name of the ConnectionInfo singleton resource, e.g.: * projects/{project}/locations/{location}/clusters/*\/instances/*\/connectionInfo * This field currently has no semantic meaning. */ name?: string; /** * Output only. The public IP addresses for the Instance. This is available * ONLY when enable_public_ip is set. This is the connection endpoint for an * end-user application. */ readonly publicIpAddress?: string; } /** * ContinuousBackupConfig describes the continuous backups recovery * configurations of a cluster. */ export interface ContinuousBackupConfig { /** * Whether ContinuousBackup is enabled. */ enabled?: boolean; /** * The encryption config can be specified to encrypt the backups with a * customer-managed encryption key (CMEK). When this field is not specified, * the backup will then use default encryption scheme to protect the user * data. */ encryptionConfig?: EncryptionConfig; /** * The number of days that are eligible to restore from using PITR. To * support the entire recovery window, backups and logs are retained for one * day more than the recovery window. If not set, defaults to 14 days. */ recoveryWindowDays?: number; } /** * ContinuousBackupInfo describes the continuous backup properties of a * cluster. */ export interface ContinuousBackupInfo { /** * Output only. The earliest restorable time that can be restored to. Output * only field. */ readonly earliestRestorableTime?: Date; /** * Output only. When ContinuousBackup was most recently enabled. Set to null * if ContinuousBackup is not enabled. */ readonly enabledTime?: Date; /** * Output only. The encryption information for the WALs and backups required * for ContinuousBackup. */ readonly encryptionInfo?: EncryptionInfo; /** * Output only. Days of the week on which a continuous backup is taken. * Output only field. Ignored if passed into the request. */ readonly schedule?: | "DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"[]; } /** * Message describing a ContinuousBackupSource. */ export interface ContinuousBackupSource { /** * Required. The source cluster from which to restore. This cluster must have * continuous backup enabled for this operation to succeed. For the required * format, see the comment on the Cluster.name field. */ cluster?: string; /** * Required. The point in time to restore to. */ pointInTime?: Date; } function serializeContinuousBackupSource(data: any): ContinuousBackupSource { return { ...data, pointInTime: data["pointInTime"] !== undefined ? data["pointInTime"].toISOString() : undefined, }; } function deserializeContinuousBackupSource(data: any): ContinuousBackupSource { return { ...data, pointInTime: data["pointInTime"] !== undefined ? new Date(data["pointInTime"]) : undefined, }; } /** * Options for exporting data in CSV format. For now, we only support a query * to get the data that needs to be exported. */ export interface CsvExportOptions { /** * Required. The select_query used to extract the data. */ selectQuery?: string; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * EncryptionConfig describes the encryption config of a cluster or a backup * that is encrypted with a CMEK (customer-managed encryption key). */ export interface EncryptionConfig { /** * The fully-qualified resource name of the KMS key. Each Cloud KMS key is * regionalized and has the following format: * projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME] */ kmsKeyName?: string; } /** * EncryptionInfo describes the encryption information of a cluster or a * backup. */ export interface EncryptionInfo { /** * Output only. Type of encryption. */ readonly encryptionType?: | "TYPE_UNSPECIFIED" | "GOOGLE_DEFAULT_ENCRYPTION" | "CUSTOMER_MANAGED_ENCRYPTION"; /** * Output only. Cloud KMS key versions that are being used to protect the * database or the backup. */ readonly kmsKeyVersions?: string[]; } /** * Export cluster request. */ export interface ExportClusterRequest { /** * Options for exporting data in CSV format. Required field to be set for CSV * file type. */ csvExportOptions?: CsvExportOptions; /** * Required. Name of the database where the query will be executed. Note - * Value provided should be the same as expected from `SELECT * current_database();` and NOT as a resource reference. */ database?: string; /** * Required. Option to export data to cloud storage. */ gcsDestination?: GcsDestination; } /** * Response of export cluster rpc. */ export interface ExportClusterResponse { /** * Required. Option to export data to cloud storage. */ gcsDestination?: GcsDestination; } /** * Message for triggering failover on an Instance */ export interface FailoverInstanceRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Destination for Export. Export will be done to cloud storage. */ export interface GcsDestination { /** * Required. The path to the file in Google Cloud Storage where the export * will be stored. The URI is in the form `gs://bucketName/fileName`. If the * file already exists, the request succeeds, but the operation fails. */ uri?: string; } /** * The response message for Locations.ListLocations. */ export interface GoogleCloudLocationListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: GoogleCloudLocationLocation[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * A resource that represents a Google Cloud location. */ export interface GoogleCloudLocationLocation { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * Represents a time of day. The date and time zone are either not significant * or are specified elsewhere. An API may choose to allow leap seconds. Related * types are google.type.Date and `google.protobuf.Timestamp`. */ export interface GoogleTypeTimeOfDay { /** * Hours of a day in 24 hour format. Must be greater than or equal to 0 and * typically must be less than or equal to 23. An API may choose to allow the * value "24:00:00" for scenarios like business closing time. */ hours?: number; /** * Minutes of an hour. Must be greater than or equal to 0 and less than or * equal to 59. */ minutes?: number; /** * Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 * and less than or equal to 999,999,999. */ nanos?: number; /** * Seconds of a minute. Must be greater than or equal to 0 and typically must * be less than or equal to 59. An API may allow the value 60 if it allows * leap-seconds. */ seconds?: number; } /** * Message for triggering fault injection on an instance */ export interface InjectFaultRequest { /** * Required. The type of fault to be injected in an instance. */ faultType?: | "FAULT_TYPE_UNSPECIFIED" | "STOP_VM"; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * An Instance is a computing unit that an end customer can connect to. It's * the main unit of computing resources in AlloyDB. */ export interface Instance { /** * Annotations to allow client tools to store small amount of arbitrary data. * This is distinct from labels. https://google.aip.dev/128 */ annotations?: { [key: string]: string }; /** * Availability type of an Instance. If empty, defaults to REGIONAL for * primary instances. For read pools, availability_type is always UNSPECIFIED. * Instances in the read pools are evenly distributed across available zones * within the region (i.e. read pools with more than one node will have a node * in at least two zones). */ availabilityType?: | "AVAILABILITY_TYPE_UNSPECIFIED" | "ZONAL" | "REGIONAL"; /** * Optional. Client connection specific configurations */ clientConnectionConfig?: ClientConnectionConfig; /** * Output only. Create time stamp */ readonly createTime?: Date; /** * Database flags. Set at the instance level. They are copied from the * primary instance on secondary instance creation. Flags that have * restrictions default to the value at primary instance on read instances * during creation. Read instances can set new flags or override existing * flags that are relevant for reads, for example, for enabling columnar cache * on a read instance. Flags set on read instance might or might not be * present on the primary instance. This is a list of "key": "value" pairs. * "key": The name of the flag. These flags are passed at instance setup time, * so include both server options and system variables for Postgres. Flags are * specified with underscores, not hyphens. "value": The value of the flag. * Booleans are set to **on** for true and **off** for false. This field must * be omitted if the flag doesn't take a value. */ databaseFlags?: { [key: string]: string }; /** * Output only. Delete time stamp */ readonly deleteTime?: Date; /** * User-settable and human-readable display name for the Instance. */ displayName?: string; /** * For Resource freshness validation (https://google.aip.dev/154) */ etag?: string; /** * The Compute Engine zone that the instance should serve from, per * https://cloud.google.com/compute/docs/regions-zones This can ONLY be * specified for ZONAL instances. If present for a REGIONAL instance, an error * will be thrown. If this is absent for a ZONAL instance, instance is created * in a random zone with available capacity. */ gceZone?: string; /** * Required. The type of the instance. Specified at creation time. */ instanceType?: | "INSTANCE_TYPE_UNSPECIFIED" | "PRIMARY" | "READ_POOL" | "SECONDARY"; /** * Output only. The IP address for the Instance. This is the connection * endpoint for an end-user application. */ readonly ipAddress?: string; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * Configurations for the machines that host the underlying database engine. */ machineConfig?: MachineConfig; /** * 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} */ readonly name?: string; /** * Optional. Instance-level network configuration. */ networkConfig?: InstanceNetworkConfig; /** * Output only. List of available read-only VMs in this instance, including * the standby for a PRIMARY instance. */ readonly nodes?: Node[]; /** * Output only. All outbound public IP addresses configured for the instance. */ readonly outboundPublicIpAddresses?: string[]; /** * Optional. The configuration for Private Service Connect (PSC) for the * instance. */ pscInstanceConfig?: PscInstanceConfig; /** * Output only. The public IP addresses for the Instance. This is available * ONLY when enable_public_ip is set. This is the connection endpoint for an * end-user application. */ readonly publicIpAddress?: string; /** * Configuration for query insights. */ queryInsightsConfig?: QueryInsightsInstanceConfig; /** * Read pool instance configuration. This is required if the value of * instanceType is READ_POOL. */ readPoolConfig?: ReadPoolConfig; /** * Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set * to true if the current state of Instance does not match the user's intended * state, and the service is actively updating the resource to reconcile them. * This can happen due to user-triggered updates or system actions like * failover or maintenance. */ readonly reconciling?: boolean; /** * Output only. Reserved for future use. */ readonly satisfiesPzs?: boolean; /** * Output only. The current serving state of the instance. */ readonly state?: | "STATE_UNSPECIFIED" | "READY" | "STOPPED" | "CREATING" | "DELETING" | "MAINTENANCE" | "FAILED" | "BOOTSTRAPPING" | "PROMOTING"; /** * Output only. The system-generated UID of the resource. The UID is assigned * when the resource is created, and it is retained until it is deleted. */ readonly uid?: string; /** * Output only. Update time stamp */ readonly updateTime?: Date; /** * Output only. This is set for the read-write VM of the PRIMARY instance * only. */ readonly writableNode?: Node; } /** * Metadata related to instance-level network configuration. */ export interface InstanceNetworkConfig { /** * Optional. A list of external network authorized to access this instance. */ authorizedExternalNetworks?: AuthorizedNetwork[]; /** * Optional. Enabling an outbound public IP address to support a database * server sending requests out into the internet. */ enableOutboundPublicIp?: boolean; /** * Optional. Enabling public ip for the instance. */ enablePublicIp?: boolean; } /** * Details regarding the upgrade of instaces associated with a cluster. */ export interface InstanceUpgradeDetails { /** * Instance type. */ instanceType?: | "INSTANCE_TYPE_UNSPECIFIED" | "PRIMARY" | "READ_POOL" | "SECONDARY"; /** * Normalized name of the instance. */ name?: string; /** * Upgrade status of the instance. */ upgradeStatus?: | "STATUS_UNSPECIFIED" | "NOT_STARTED" | "IN_PROGRESS" | "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS" | "CANCEL_IN_PROGRESS" | "CANCELLED"; } /** * Restrictions on INTEGER type values. */ export interface IntegerRestrictions { /** * The maximum value that can be specified, if applicable. */ maxValue?: bigint; /** * The minimum value that can be specified, if applicable. */ minValue?: bigint; } function serializeIntegerRestrictions(data: any): IntegerRestrictions { return { ...data, maxValue: data["maxValue"] !== undefined ? String(data["maxValue"]) : undefined, minValue: data["minValue"] !== undefined ? String(data["minValue"]) : undefined, }; } function deserializeIntegerRestrictions(data: any): IntegerRestrictions { return { ...data, maxValue: data["maxValue"] !== undefined ? BigInt(data["maxValue"]) : undefined, minValue: data["minValue"] !== undefined ? BigInt(data["minValue"]) : undefined, }; } /** * Message for response to listing Backups */ export interface ListBackupsResponse { /** * The list of Backup */ backups?: Backup[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * Message for response to listing Clusters */ export interface ListClustersResponse { /** * The list of Cluster */ clusters?: Cluster[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListClustersResponse(data: any): ListClustersResponse { return { ...data, clusters: data["clusters"] !== undefined ? data["clusters"].map((item: any) => (serializeCluster(item))) : undefined, }; } function deserializeListClustersResponse(data: any): ListClustersResponse { return { ...data, clusters: data["clusters"] !== undefined ? data["clusters"].map((item: any) => (deserializeCluster(item))) : undefined, }; } /** * Message for response to listing Instances */ export interface ListInstancesResponse { /** * The list of Instance */ instances?: Instance[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; } /** * Message for response to listing SupportedDatabaseFlags. */ export interface ListSupportedDatabaseFlagsResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * The list of SupportedDatabaseFlags. */ supportedDatabaseFlags?: SupportedDatabaseFlag[]; } function serializeListSupportedDatabaseFlagsResponse(data: any): ListSupportedDatabaseFlagsResponse { return { ...data, supportedDatabaseFlags: data["supportedDatabaseFlags"] !== undefined ? data["supportedDatabaseFlags"].map((item: any) => (serializeSupportedDatabaseFlag(item))) : undefined, }; } function deserializeListSupportedDatabaseFlagsResponse(data: any): ListSupportedDatabaseFlagsResponse { return { ...data, supportedDatabaseFlags: data["supportedDatabaseFlags"] !== undefined ? data["supportedDatabaseFlags"].map((item: any) => (deserializeSupportedDatabaseFlag(item))) : undefined, }; } /** * Message for response to listing Users */ export interface ListUsersResponse { /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; /** * The list of User */ users?: User[]; } /** * MachineConfig describes the configuration of a machine. */ export interface MachineConfig { /** * The number of CPU's in the VM instance. */ cpuCount?: number; } /** * MaintenanceSchedule stores the maintenance schedule generated from the * MaintenanceUpdatePolicy, once a maintenance rollout is triggered, if * MaintenanceWindow is set, and if there is no conflicting DenyPeriod. The * schedule is cleared once the update takes place. This field cannot be * manually changed; modify the MaintenanceUpdatePolicy instead. */ export interface MaintenanceSchedule { /** * Output only. The scheduled start time for the maintenance. */ readonly startTime?: Date; } /** * MaintenanceUpdatePolicy defines the policy for system updates. */ export interface MaintenanceUpdatePolicy { /** * Preferred windows to perform maintenance. Currently limited to 1. */ maintenanceWindows?: MaintenanceWindow[]; } /** * MaintenanceWindow specifies a preferred day and time for maintenance. */ export interface MaintenanceWindow { /** * Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc. */ day?: | "DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"; /** * Preferred time to start the maintenance operation on the specified day. * Maintenance will start within 1 hour of this time. */ startTime?: GoogleTypeTimeOfDay; } /** * Subset of the source instance configuration that is available when reading * the cluster resource. */ export interface MigrationSource { /** * Output only. The host and port of the on-premises instance in host:port * format */ readonly hostPort?: string; /** * Output only. Place holder for the external source identifier(e.g DMS job * name) that created the cluster. */ readonly referenceId?: string; /** * Output only. Type of migration source. */ readonly sourceType?: | "MIGRATION_SOURCE_TYPE_UNSPECIFIED" | "DMS"; } /** * Metadata related to network configuration. */ export interface NetworkConfig { /** * Optional. Name of the allocated IP range for the private IP AlloyDB * cluster, for example: "google-managed-services-default". If set, the * instance IPs for this cluster will be created in the allocated range. The * range name must comply with RFC 1035. Specifically, the name must be 1-63 * characters long and match the regular expression * `[a-z]([-a-z0-9]*[a-z0-9])?`. Field name is intended to be consistent with * Cloud SQL. */ allocatedIpRange?: string; /** * Optional. The resource link for the VPC network in which cluster resources * are created and from which they are accessible via Private IP. The network * must belong to the same project as the cluster. It is specified in the * form: `projects/{project_number}/global/networks/{network_id}`. This is * required to create a cluster. */ network?: string; } /** * Details of a single node in the instance. Nodes in an AlloyDB instance are * ephemereal, they can change during update, failover, autohealing and resize * operations. */ export interface Node { /** * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". */ id?: string; /** * The private IP address of the VM e.g. "10.57.0.34". */ ip?: string; /** * Determined by state of the compute VM and postgres-service health. Compute * VM state can have values listed in * https://cloud.google.com/compute/docs/instances/instance-life-cycle and * postgres-service health can have values: HEALTHY and UNHEALTHY. */ state?: string; /** * The Compute Engine zone of the VM e.g. "us-central1-b". */ zoneId?: string; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have successfully been cancelled have * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * Configuration for the primary cluster. It has the list of clusters that are * replicating from this cluster. This should be set if and only if the cluster * is of type PRIMARY. */ export interface PrimaryConfig { /** * Output only. Names of the clusters that are replicating from this cluster. */ readonly secondaryClusterNames?: string[]; } /** * Additional options for AlloyDB#projectsLocationsBackupsCreate. */ export interface ProjectsLocationsBackupsCreateOptions { /** * Required. ID of the requesting object. */ backupId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, the backend validates the request, but doesn't actually * execute it. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsBackupsDelete. */ export interface ProjectsLocationsBackupsDeleteOptions { /** * Optional. The current etag of the Backup. If an etag is provided and does * not match the current etag of the Backup, deletion will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, the backend validates the request, but doesn't actually * execute it. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsBackupsList. */ export interface ProjectsLocationsBackupsListOptions { /** * Filtering results */ filter?: string; /** * Hint for how to order the results */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for AlloyDB#projectsLocationsBackupsPatch. */ export interface ProjectsLocationsBackupsPatchOptions { /** * Optional. If set to true, update succeeds even if instance is not found. * In that case, a new backup is created and `update_mask` is ignored. */ allowMissing?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the Backup resource by the update. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * all fields will be overwritten. */ updateMask?: string /* FieldMask */; /** * Optional. If set, the backend validates the request, but doesn't actually * execute it. */ validateOnly?: boolean; } function serializeProjectsLocationsBackupsPatchOptions(data: any): ProjectsLocationsBackupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsBackupsPatchOptions(data: any): ProjectsLocationsBackupsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for AlloyDB#projectsLocationsClustersCreate. */ export interface ProjectsLocationsClustersCreateOptions { /** * Required. ID of the requesting object. */ clusterId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsClustersCreatesecondary. */ export interface ProjectsLocationsClustersCreatesecondaryOptions { /** * Required. ID of the requesting object (the secondary cluster). */ clusterId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsClustersDelete. */ export interface ProjectsLocationsClustersDeleteOptions { /** * Optional. The current etag of the Cluster. If an etag is provided and does * not match the current etag of the Cluster, deletion will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * Optional. Whether to cascade delete child instances for given cluster. */ force?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsClustersGet. */ export interface ProjectsLocationsClustersGetOptions { /** * Optional. The view of the cluster to return. Returns all default fields if * not set. */ view?: | "CLUSTER_VIEW_UNSPECIFIED" | "CLUSTER_VIEW_BASIC" | "CLUSTER_VIEW_CONTINUOUS_BACKUP"; } /** * Additional options for AlloyDB#projectsLocationsClustersInstancesCreate. */ export interface ProjectsLocationsClustersInstancesCreateOptions { /** * Required. ID of the requesting object. */ instanceId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Additional options for * AlloyDB#projectsLocationsClustersInstancesCreatesecondary. */ export interface ProjectsLocationsClustersInstancesCreatesecondaryOptions { /** * Required. ID of the requesting object. */ instanceId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsClustersInstancesDelete. */ export interface ProjectsLocationsClustersInstancesDeleteOptions { /** * Optional. The current etag of the Instance. If an etag is provided and * does not match the current etag of the Instance, deletion will be blocked * and an ABORTED error will be returned. */ etag?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Additional options for * AlloyDB#projectsLocationsClustersInstancesGetConnectionInfo. */ export interface ProjectsLocationsClustersInstancesGetConnectionInfoOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for AlloyDB#projectsLocationsClustersInstancesGet. */ export interface ProjectsLocationsClustersInstancesGetOptions { /** * The view of the instance to return. */ view?: | "INSTANCE_VIEW_UNSPECIFIED" | "INSTANCE_VIEW_BASIC" | "INSTANCE_VIEW_FULL"; } /** * Additional options for AlloyDB#projectsLocationsClustersInstancesList. */ export interface ProjectsLocationsClustersInstancesListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Hint for how to order the results */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for AlloyDB#projectsLocationsClustersInstancesPatch. */ export interface ProjectsLocationsClustersInstancesPatchOptions { /** * Optional. If set to true, update succeeds even if instance is not found. * In that case, a new instance is created and `update_mask` is ignored. */ allowMissing?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the Instance resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } function serializeProjectsLocationsClustersInstancesPatchOptions(data: any): ProjectsLocationsClustersInstancesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsClustersInstancesPatchOptions(data: any): ProjectsLocationsClustersInstancesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for AlloyDB#projectsLocationsClustersList. */ export interface ProjectsLocationsClustersListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Hint for how to order the results */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for AlloyDB#projectsLocationsClustersPatch. */ export interface ProjectsLocationsClustersPatchOptions { /** * Optional. If set to true, update succeeds even if cluster is not found. In * that case, a new cluster is created and `update_mask` is ignored. */ allowMissing?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the Cluster resource by the update. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * all fields will be overwritten. */ updateMask?: string /* FieldMask */; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } function serializeProjectsLocationsClustersPatchOptions(data: any): ProjectsLocationsClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsClustersPatchOptions(data: any): ProjectsLocationsClustersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for AlloyDB#projectsLocationsClustersUsersCreate. */ export interface ProjectsLocationsClustersUsersCreateOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. ID of the requesting object. */ userId?: string; /** * Optional. If set, the backend validates the request, but doesn't actually * execute it. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsClustersUsersDelete. */ export interface ProjectsLocationsClustersUsersDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, the backend validates the request, but doesn't actually * execute it. */ validateOnly?: boolean; } /** * Additional options for AlloyDB#projectsLocationsClustersUsersList. */ export interface ProjectsLocationsClustersUsersListOptions { /** * Optional. Filtering results */ filter?: string; /** * Optional. Hint for how to order the results */ orderBy?: string; /** * Optional. Requested page size. Server may return fewer items than * requested. If unspecified, server will pick an appropriate default. */ pageSize?: number; /** * Optional. A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for AlloyDB#projectsLocationsClustersUsersPatch. */ export interface ProjectsLocationsClustersUsersPatchOptions { /** * Optional. Allow missing fields in the update mask. */ allowMissing?: boolean; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. Field mask is used to specify the fields to be overwritten in * the User resource by the update. The fields specified in the update_mask * are relative to the resource, not the full request. A field will be * overwritten if it is in the mask. If the user does not provide a mask then * all fields will be overwritten. */ updateMask?: string /* FieldMask */; /** * Optional. If set, the backend validates the request, but doesn't actually * execute it. */ validateOnly?: boolean; } function serializeProjectsLocationsClustersUsersPatchOptions(data: any): ProjectsLocationsClustersUsersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsClustersUsersPatchOptions(data: any): ProjectsLocationsClustersUsersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for AlloyDB#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * A filter to narrow down results to a preferred subset. The filtering * language accepts strings like `"displayName=tokyo"`, and is documented in * more detail in [AIP-160](https://google.aip.dev/160). */ filter?: string; /** * The maximum number of results to return. If not set, the service selects a * default. */ pageSize?: number; /** * A page token received from the `next_page_token` field in the response. * Send that page token to receive the subsequent page. */ pageToken?: string; } /** * Additional options for AlloyDB#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for AlloyDB#projectsLocationsSupportedDatabaseFlagsList. */ export interface ProjectsLocationsSupportedDatabaseFlagsListOptions { /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Message for promoting a Cluster */ export interface PromoteClusterRequest { /** * Optional. The current etag of the Cluster. If an etag is provided and does * not match the current etag of the Cluster, deletion will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if * original operation with the same request ID was received, and if so, will * ignore the second request. This prevents clients from accidentally creating * duplicate commitments. The request ID must be a valid UUID with the * exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * PscConfig contains PSC related configuration at a cluster level. */ export interface PscConfig { /** * Optional. Create an instance that allows connections from Private Service * Connect endpoints to the instance. */ pscEnabled?: boolean; } /** * PscInstanceConfig contains PSC related configuration at an instance level. */ export interface PscInstanceConfig { /** * Optional. List of consumer projects that are allowed to create PSC * endpoints to service-attachments to this instance. */ allowedConsumerProjects?: string[]; /** * Output only. The DNS name of the instance for PSC connectivity. Name * convention: ...alloydb-psc.goog */ readonly pscDnsName?: string; /** * Output only. The service attachment created when Private Service Connect * (PSC) is enabled for the instance. The name of the resource will be in the * format of `projects//regions//serviceAttachments/` */ readonly serviceAttachmentLink?: string; } /** * A backup's position in a quantity-based retention queue, of backups with the * same source cluster and type, with length, retention, specified by the * backup's retention policy. Once the position is greater than the retention, * the backup is eligible to be garbage collected. Example: 5 backups from the * same source cluster and type with a quantity-based retention of 3 and denoted * by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), * backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, * 3) */ export interface QuantityBasedExpiry { /** * Output only. The backup's position among its backups with the same source * cluster and type, by descending chronological order create time(i.e. newest * first). */ readonly retentionCount?: number; /** * Output only. The length of the quantity-based queue, specified by the * backup's retention policy. */ readonly totalRetentionCount?: number; } /** * A quantity based policy specifies that a certain number of the most recent * successful backups should be retained. */ export interface QuantityBasedRetention { /** * The number of backups to retain. */ count?: number; } /** * QueryInsights Instance specific configuration. */ export interface QueryInsightsInstanceConfig { /** * Number of query execution plans captured by Insights per minute for all * queries combined. The default value is 5. Any integer between 0 and 20 is * considered valid. */ queryPlansPerMinute?: number; /** * Query string length. The default value is 1024. Any integer between 256 * and 4500 is considered valid. */ queryStringLength?: number; /** * Record application tags for an instance. This flag is turned "on" by * default. */ recordApplicationTags?: boolean; /** * Record client address for an instance. Client address is PII information. * This flag is turned "on" by default. */ recordClientAddress?: boolean; } /** * Configuration for a read pool instance. */ export interface ReadPoolConfig { /** * Read capacity, i.e. number of nodes in a read pool instance. */ nodeCount?: number; } export interface RestartInstanceRequest { /** * Optional. Full name of the nodes as obtained from INSTANCE_VIEW_FULL to * restart upon. Applicable only to read instances. */ nodeIds?: string[]; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * Message for restoring a Cluster from a backup or another cluster at a given * point in time. */ export interface RestoreClusterRequest { /** * Backup source. */ backupSource?: BackupSource; /** * Required. The resource being created */ cluster?: Cluster; /** * Required. ID of the requesting object. */ clusterId?: string; /** * ContinuousBackup source. Continuous backup needs to be enabled in the * source cluster for this operation to succeed. */ continuousBackupSource?: ContinuousBackupSource; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } function serializeRestoreClusterRequest(data: any): RestoreClusterRequest { return { ...data, cluster: data["cluster"] !== undefined ? serializeCluster(data["cluster"]) : undefined, continuousBackupSource: data["continuousBackupSource"] !== undefined ? serializeContinuousBackupSource(data["continuousBackupSource"]) : undefined, }; } function deserializeRestoreClusterRequest(data: any): RestoreClusterRequest { return { ...data, cluster: data["cluster"] !== undefined ? deserializeCluster(data["cluster"]) : undefined, continuousBackupSource: data["continuousBackupSource"] !== undefined ? deserializeContinuousBackupSource(data["continuousBackupSource"]) : undefined, }; } /** * Configuration information for the secondary cluster. This should be set if * and only if the cluster is of type SECONDARY. */ export interface SecondaryConfig { /** * The name of the primary cluster name with the format: * * projects/{project}/locations/{region}/clusters/{cluster_id} */ primaryClusterName?: string; } /** * SSL configuration. */ export interface SslConfig { /** * Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is * supported currently, and is the default value. */ caSource?: | "CA_SOURCE_UNSPECIFIED" | "CA_SOURCE_MANAGED"; /** * Optional. SSL mode. Specifies client-server SSL/TLS connection behavior. */ sslMode?: | "SSL_MODE_UNSPECIFIED" | "SSL_MODE_ALLOW" | "SSL_MODE_REQUIRE" | "SSL_MODE_VERIFY_CA" | "ALLOW_UNENCRYPTED_AND_ENCRYPTED" | "ENCRYPTED_ONLY"; } /** * Stage information for different stages in the upgrade process. */ export interface StageInfo { /** * logs_url is the URL for the logs associated with a stage if that stage has * logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, * PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE. */ logsUrl?: string; /** * The stage. */ stage?: | "STAGE_UNSPECIFIED" | "ALLOYDB_PRECHECK" | "PG_UPGRADE_CHECK" | "PREPARE_FOR_UPGRADE" | "PRIMARY_INSTANCE_UPGRADE" | "READ_POOL_INSTANCES_UPGRADE" | "ROLLBACK" | "CLEANUP"; /** * Status of the stage. */ status?: | "STATUS_UNSPECIFIED" | "NOT_STARTED" | "IN_PROGRESS" | "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS" | "CANCEL_IN_PROGRESS" | "CANCELLED"; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * Configuration for availability of database instance */ export interface StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration { /** * Checks for existence of (multi-cluster) routing configuration that allows * automatic failover to a different zone/region in case of an outage. * Applicable to Bigtable resources. */ automaticFailoverRoutingConfigured?: boolean; /** * Availability type. Potential values: * `ZONAL`: The instance serves data * from only one zone. Outages in that zone affect data accessibility. * * `REGIONAL`: The instance can serve data from more than one zone in a region * (it is highly available). */ availabilityType?: | "AVAILABILITY_TYPE_UNSPECIFIED" | "ZONAL" | "REGIONAL" | "MULTI_REGIONAL" | "AVAILABILITY_TYPE_OTHER"; /** * Checks for resources that are configured to have redundancy, and ongoing * replication across regions */ crossRegionReplicaConfigured?: boolean; externalReplicaConfigured?: boolean; promotableReplicaConfigured?: boolean; } /** * Configuration for automatic backups */ export interface StorageDatabasecenterPartnerapiV1mainBackupConfiguration { /** * Whether customer visible automated backups are enabled on the instance. */ automatedBackupEnabled?: boolean; /** * Backup retention settings. */ backupRetentionSettings?: StorageDatabasecenterPartnerapiV1mainRetentionSettings; /** * Whether point-in-time recovery is enabled. This is optional field, if the * database service does not have this feature or metadata is not available in * control plane, this can be omitted. */ pointInTimeRecoveryEnabled?: boolean; } function serializeStorageDatabasecenterPartnerapiV1mainBackupConfiguration(data: any): StorageDatabasecenterPartnerapiV1mainBackupConfiguration { return { ...data, backupRetentionSettings: data["backupRetentionSettings"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainRetentionSettings(data["backupRetentionSettings"]) : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainBackupConfiguration(data: any): StorageDatabasecenterPartnerapiV1mainBackupConfiguration { return { ...data, backupRetentionSettings: data["backupRetentionSettings"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainRetentionSettings(data["backupRetentionSettings"]) : undefined, }; } /** * A backup run. */ export interface StorageDatabasecenterPartnerapiV1mainBackupRun { /** * The time the backup operation completed. REQUIRED */ endTime?: Date; /** * Information about why the backup operation failed. This is only present if * the run has the FAILED status. OPTIONAL */ error?: StorageDatabasecenterPartnerapiV1mainOperationError; /** * The time the backup operation started. REQUIRED */ startTime?: Date; /** * The status of this run. REQUIRED */ status?: | "STATUS_UNSPECIFIED" | "SUCCESSFUL" | "FAILED"; } function serializeStorageDatabasecenterPartnerapiV1mainBackupRun(data: any): StorageDatabasecenterPartnerapiV1mainBackupRun { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainBackupRun(data: any): StorageDatabasecenterPartnerapiV1mainBackupRun { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Contains compliance information about a security standard indicating unmet * recommendations. */ export interface StorageDatabasecenterPartnerapiV1mainCompliance { /** * Industry-wide compliance standards or benchmarks, such as CIS, PCI, and * OWASP. */ standard?: string; /** * Version of the standard or benchmark, for example, 1.1 */ version?: string; } /** * Any custom metadata associated with the resource. e.g. A spanner instance * can have multiple databases with its own unique metadata. Information for * these individual databases can be captured in custom metadata data */ export interface StorageDatabasecenterPartnerapiV1mainCustomMetadataData { /** * Metadata for individual internal resources in an instance. e.g. spanner * instance can have multiple databases with unique configuration. */ internalResourceMetadata?: StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata[]; } function serializeStorageDatabasecenterPartnerapiV1mainCustomMetadataData(data: any): StorageDatabasecenterPartnerapiV1mainCustomMetadataData { return { ...data, internalResourceMetadata: data["internalResourceMetadata"] !== undefined ? data["internalResourceMetadata"].map((item: any) => (serializeStorageDatabasecenterPartnerapiV1mainInternalResourceMetadata(item))) : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainCustomMetadataData(data: any): StorageDatabasecenterPartnerapiV1mainCustomMetadataData { return { ...data, internalResourceMetadata: data["internalResourceMetadata"] !== undefined ? data["internalResourceMetadata"].map((item: any) => (deserializeStorageDatabasecenterPartnerapiV1mainInternalResourceMetadata(item))) : undefined, }; } /** * DatabaseResourceFeed is the top level proto to be used to ingest different * database resource level events into Condor platform. */ export interface StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed { /** * Required. Timestamp when feed is generated. */ feedTimestamp?: Date; /** * Required. Type feed to be ingested into condor */ feedType?: | "FEEDTYPE_UNSPECIFIED" | "RESOURCE_METADATA" | "OBSERVABILITY_DATA" | "SECURITY_FINDING_DATA" | "RECOMMENDATION_SIGNAL_DATA"; observabilityMetricData?: StorageDatabasecenterPartnerapiV1mainObservabilityMetricData; recommendationSignalData?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData; resourceHealthSignalData?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData; /** * Primary key associated with the Resource. resource_id is available in * individual feed level as well. */ resourceId?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceId; resourceMetadata?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata; } function serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed { return { ...data, feedTimestamp: data["feedTimestamp"] !== undefined ? data["feedTimestamp"].toISOString() : undefined, observabilityMetricData: data["observabilityMetricData"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainObservabilityMetricData(data["observabilityMetricData"]) : undefined, recommendationSignalData: data["recommendationSignalData"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData(data["recommendationSignalData"]) : undefined, resourceHealthSignalData: data["resourceHealthSignalData"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData(data["resourceHealthSignalData"]) : undefined, resourceMetadata: data["resourceMetadata"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata(data["resourceMetadata"]) : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed { return { ...data, feedTimestamp: data["feedTimestamp"] !== undefined ? new Date(data["feedTimestamp"]) : undefined, observabilityMetricData: data["observabilityMetricData"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainObservabilityMetricData(data["observabilityMetricData"]) : undefined, recommendationSignalData: data["recommendationSignalData"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData(data["recommendationSignalData"]) : undefined, resourceHealthSignalData: data["resourceHealthSignalData"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData(data["resourceHealthSignalData"]) : undefined, resourceMetadata: data["resourceMetadata"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata(data["resourceMetadata"]) : undefined, }; } /** * Common model for database resource health signal data. */ export interface StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData { /** * Any other additional metadata */ additionalMetadata?: { [key: string]: any }; /** * Industry standards associated with this signal; if this signal is an * issue, that could be a violation of the associated industry standard(s). * For example, AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, * CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. * If a database resource does not have automated backup enable, it will * violate these following industry standards. */ compliance?: StorageDatabasecenterPartnerapiV1mainCompliance[]; /** * Description associated with signal */ description?: string; /** * Required. The last time at which the event described by this signal took * place */ eventTime?: Date; /** * The external-uri of the signal, using which more information about this * signal can be obtained. In GCP, this will take user to SCC page to get more * details about signals. */ externalUri?: string; /** * Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, * SQL_LOG_ERROR_VERBOSITY etc. */ name?: string; /** * Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged */ provider?: | "PROVIDER_UNSPECIFIED" | "GCP" | "AWS" | "AZURE" | "ONPREM" | "SELFMANAGED" | "PROVIDER_OTHER"; /** * Closest parent container of this resource. In GCP, 'container' refers to a * Cloud Resource Manager project. It must be resource name of a Cloud * Resource Manager project with the format of "provider//", such as * "projects/123". For GCP provided resources, number should be project * number. */ resourceContainer?: string; /** * Required. Database resource name associated with the signal. Resource name * to follow CAIS resource_name format as noted here * go/condor-common-datamodel */ resourceName?: string; /** * Required. The class of the signal, such as if it's a THREAT or * VULNERABILITY. */ signalClass?: | "CLASS_UNSPECIFIED" | "THREAT" | "VULNERABILITY" | "MISCONFIGURATION" | "OBSERVATION" | "ERROR"; /** * Required. Unique identifier for the signal. This is an unique id which * would be mainatined by partner to identify a signal. */ signalId?: string; /** * The severity of the signal, such as if it's a HIGH or LOW severity. */ signalSeverity?: | "SIGNAL_SEVERITY_UNSPECIFIED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; /** * Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, * `LOGGING_MOST_ERRORS`, etc. */ signalType?: | "SIGNAL_TYPE_UNSPECIFIED" | "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER" | "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS" | "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES" | "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS" | "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA" | "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" | "SIGNAL_TYPE_SHORT_BACKUP_RETENTION" | "SIGNAL_TYPE_LAST_BACKUP_FAILED" | "SIGNAL_TYPE_LAST_BACKUP_OLD" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" | "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" | "SIGNAL_TYPE_VIOLATES_NIST_800_53" | "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" | "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" | "SIGNAL_TYPE_VIOLATES_ISO_27001" | "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" | "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" | "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" | "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" | "SIGNAL_TYPE_VIOLATES_HIPAA" | "SIGNAL_TYPE_VIOLATES_SOC2_V2017" | "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" | "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" | "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" | "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" | "SIGNAL_TYPE_LOGGING_MOST_ERRORS" | "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" | "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" | "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED" | "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" | "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS" | "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS" | "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" | "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS" | "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" | "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" | "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" | "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" | "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" | "SIGNAL_TYPE_NO_ROOT_PASSWORD" | "SIGNAL_TYPE_WEAK_ROOT_PASSWORD" | "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" | "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" | "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING" | "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" | "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" | "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" | "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" | "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" | "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" | "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" | "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" | "SIGNAL_TYPE_PUBLIC_IP_ENABLED" | "SIGNAL_TYPE_IDLE" | "SIGNAL_TYPE_OVERPROVISIONED" | "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" | "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" | "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" | "SIGNAL_TYPE_UNDERPROVISIONED" | "SIGNAL_TYPE_OUT_OF_DISK" | "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" | "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" | "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" | "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" | "SIGNAL_TYPE_QUOTA_LIMIT" | "SIGNAL_TYPE_NO_PASSWORD_POLICY" | "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" | "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" | "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" | "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" | "SIGNAL_TYPE_SUPERUSER_WRITING_TO_USER_TABLES" | "SIGNAL_TYPE_USER_GRANTED_ALL_PERMISSIONS" | "SIGNAL_TYPE_DATA_EXPORT_TO_EXTERNAL_CLOUD_STORAGE_BUCKET" | "SIGNAL_TYPE_DATA_EXPORT_TO_PUBLIC_CLOUD_STORAGE_BUCKET"; state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "RESOLVED" | "MUTED"; } function serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData { return { ...data, eventTime: data["eventTime"] !== undefined ? data["eventTime"].toISOString() : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData { return { ...data, eventTime: data["eventTime"] !== undefined ? new Date(data["eventTime"]) : undefined, }; } /** * DatabaseResourceId will serve as primary key for any resource ingestion * event. */ export interface StorageDatabasecenterPartnerapiV1mainDatabaseResourceId { /** * Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged */ provider?: | "PROVIDER_UNSPECIFIED" | "GCP" | "AWS" | "AZURE" | "ONPREM" | "SELFMANAGED" | "PROVIDER_OTHER"; /** * Optional. Needs to be used only when the provider is PROVIDER_OTHER. */ providerDescription?: string; /** * Required. The type of resource this ID is identifying. Ex * redis.googleapis.com/Instance, redis.googleapis.com/Cluster, * alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, * spanner.googleapis.com/Instance, spanner.googleapis.com/Database, * firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, * bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance * REQUIRED Please refer go/condor-common-datamodel */ resourceType?: string; /** * Required. A service-local token that distinguishes this resource from * other resources within the same service. */ uniqueId?: string; } /** * Common model for database resource instance metadata. Next ID: 23 */ export interface StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata { /** * Availability configuration for this instance */ availabilityConfiguration?: StorageDatabasecenterPartnerapiV1mainAvailabilityConfiguration; /** * Backup configuration for this instance */ backupConfiguration?: StorageDatabasecenterPartnerapiV1mainBackupConfiguration; /** * Latest backup run information for this instance */ backupRun?: StorageDatabasecenterPartnerapiV1mainBackupRun; /** * The creation time of the resource, i.e. the time when resource is created * and recorded in partner service. */ creationTime?: Date; /** * Current state of the instance. */ currentState?: | "STATE_UNSPECIFIED" | "HEALTHY" | "UNHEALTHY" | "SUSPENDED" | "DELETED" | "STATE_OTHER"; /** * Any custom metadata associated with the resource */ customMetadata?: StorageDatabasecenterPartnerapiV1mainCustomMetadataData; /** * Optional. Edition represents whether the instance is ENTERPRISE or * ENTERPRISE_PLUS. This information is core to Cloud SQL only and is used to * identify the edition of the instance. */ edition?: | "EDITION_UNSPECIFIED" | "EDITION_ENTERPRISE" | "EDITION_ENTERPRISE_PLUS"; /** * Entitlements associated with the resource */ entitlements?: StorageDatabasecenterPartnerapiV1mainEntitlement[]; /** * The state that the instance is expected to be in. For example, an instance * state can transition to UNHEALTHY due to wrong patch update, while the * expected state will remain at the HEALTHY. */ expectedState?: | "STATE_UNSPECIFIED" | "HEALTHY" | "UNHEALTHY" | "SUSPENDED" | "DELETED" | "STATE_OTHER"; /** * Required. Unique identifier for a Database resource */ id?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceId; /** * The type of the instance. Specified at creation time. */ instanceType?: | "INSTANCE_TYPE_UNSPECIFIED" | "SUB_RESOURCE_TYPE_UNSPECIFIED" | "PRIMARY" | "SECONDARY" | "READ_REPLICA" | "OTHER" | "SUB_RESOURCE_TYPE_PRIMARY" | "SUB_RESOURCE_TYPE_SECONDARY" | "SUB_RESOURCE_TYPE_READ_REPLICA" | "SUB_RESOURCE_TYPE_OTHER"; /** * The resource location. REQUIRED */ location?: string; /** * Machine configuration for this resource. */ machineConfiguration?: StorageDatabasecenterPartnerapiV1mainMachineConfiguration; /** * Identifier for this resource's immediate parent/primary resource if the * current resource is a replica or derived form of another Database resource. * Else it would be NULL. REQUIRED if the immediate parent exists when first * time resource is getting ingested, otherwise optional. */ primaryResourceId?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceId; /** * Primary resource location. REQUIRED if the immediate parent exists when * first time resource is getting ingested, otherwise optional. */ primaryResourceLocation?: string; /** * The product this resource represents. */ product?: StorageDatabasecenterProtoCommonProduct; /** * Closest parent Cloud Resource Manager container of this resource. It must * be resource name of a Cloud Resource Manager project with the format of * "/", such as "projects/123". For GCP provided resources, number should be * project number. */ resourceContainer?: string; /** * Required. Different from DatabaseResourceId.unique_id, a resource name can * be reused over time. That is, after a resource named "ABC" is deleted, the * name "ABC" can be used to to create a new resource within the same source. * Resource name to follow CAIS resource_name format as noted here * go/condor-common-datamodel */ resourceName?: string; /** * Optional. Tags associated with this resources. */ tagsSet?: StorageDatabasecenterPartnerapiV1mainTags; /** * The time at which the resource was updated and recorded at partner * service. */ updationTime?: Date; /** * User-provided labels associated with the resource */ userLabelSet?: StorageDatabasecenterPartnerapiV1mainUserLabels; } function serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata { return { ...data, backupConfiguration: data["backupConfiguration"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainBackupConfiguration(data["backupConfiguration"]) : undefined, backupRun: data["backupRun"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainBackupRun(data["backupRun"]) : undefined, creationTime: data["creationTime"] !== undefined ? data["creationTime"].toISOString() : undefined, customMetadata: data["customMetadata"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainCustomMetadataData(data["customMetadata"]) : undefined, machineConfiguration: data["machineConfiguration"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainMachineConfiguration(data["machineConfiguration"]) : undefined, updationTime: data["updationTime"] !== undefined ? data["updationTime"].toISOString() : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata { return { ...data, backupConfiguration: data["backupConfiguration"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainBackupConfiguration(data["backupConfiguration"]) : undefined, backupRun: data["backupRun"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainBackupRun(data["backupRun"]) : undefined, creationTime: data["creationTime"] !== undefined ? new Date(data["creationTime"]) : undefined, customMetadata: data["customMetadata"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainCustomMetadataData(data["customMetadata"]) : undefined, machineConfiguration: data["machineConfiguration"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainMachineConfiguration(data["machineConfiguration"]) : undefined, updationTime: data["updationTime"] !== undefined ? new Date(data["updationTime"]) : undefined, }; } /** * Common model for database resource recommendation signal data. */ export interface StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData { /** * Optional. Any other additional metadata specific to recommendation */ additionalMetadata?: { [key: string]: any }; /** * Required. last time recommendationw as refreshed */ lastRefreshTime?: Date; /** * Required. Recommendation state */ recommendationState?: | "UNSPECIFIED" | "ACTIVE" | "CLAIMED" | "SUCCEEDED" | "FAILED" | "DISMISSED"; /** * Required. Name of recommendation. Examples: * organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876 */ recommender?: string; /** * Required. ID of recommender. Examples: * "google.cloudsql.instance.PerformanceRecommender" */ recommenderId?: string; /** * Required. Contains an identifier for a subtype of recommendations produced * for the same recommender. Subtype is a function of content and impact, * meaning a new subtype might be added when significant changes to `content` * or `primary_impact.category` are introduced. See the Recommenders section * to see a list of subtypes for a given Recommender. Examples: For * recommender = "google.cloudsql.instance.PerformanceRecommender", * recommender_subtype can be * "MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE"/"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE" */ recommenderSubtype?: string; /** * Required. Database resource name associated with the signal. Resource name * to follow CAIS resource_name format as noted here * go/condor-common-datamodel */ resourceName?: string; /** * Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`, * `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc. */ signalType?: | "SIGNAL_TYPE_UNSPECIFIED" | "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER" | "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS" | "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES" | "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS" | "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA" | "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" | "SIGNAL_TYPE_SHORT_BACKUP_RETENTION" | "SIGNAL_TYPE_LAST_BACKUP_FAILED" | "SIGNAL_TYPE_LAST_BACKUP_OLD" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" | "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" | "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" | "SIGNAL_TYPE_VIOLATES_NIST_800_53" | "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" | "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" | "SIGNAL_TYPE_VIOLATES_ISO_27001" | "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" | "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" | "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" | "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" | "SIGNAL_TYPE_VIOLATES_HIPAA" | "SIGNAL_TYPE_VIOLATES_SOC2_V2017" | "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" | "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" | "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" | "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" | "SIGNAL_TYPE_LOGGING_MOST_ERRORS" | "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" | "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" | "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED" | "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" | "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS" | "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS" | "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" | "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS" | "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" | "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" | "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" | "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" | "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" | "SIGNAL_TYPE_NO_ROOT_PASSWORD" | "SIGNAL_TYPE_WEAK_ROOT_PASSWORD" | "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" | "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" | "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING" | "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" | "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" | "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" | "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" | "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" | "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" | "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" | "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" | "SIGNAL_TYPE_PUBLIC_IP_ENABLED" | "SIGNAL_TYPE_IDLE" | "SIGNAL_TYPE_OVERPROVISIONED" | "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" | "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" | "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" | "SIGNAL_TYPE_UNDERPROVISIONED" | "SIGNAL_TYPE_OUT_OF_DISK" | "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" | "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" | "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" | "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" | "SIGNAL_TYPE_QUOTA_LIMIT" | "SIGNAL_TYPE_NO_PASSWORD_POLICY" | "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" | "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" | "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" | "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" | "SIGNAL_TYPE_SUPERUSER_WRITING_TO_USER_TABLES" | "SIGNAL_TYPE_USER_GRANTED_ALL_PERMISSIONS" | "SIGNAL_TYPE_DATA_EXPORT_TO_EXTERNAL_CLOUD_STORAGE_BUCKET" | "SIGNAL_TYPE_DATA_EXPORT_TO_PUBLIC_CLOUD_STORAGE_BUCKET"; } function serializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData { return { ...data, lastRefreshTime: data["lastRefreshTime"] !== undefined ? data["lastRefreshTime"].toISOString() : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData(data: any): StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData { return { ...data, lastRefreshTime: data["lastRefreshTime"] !== undefined ? new Date(data["lastRefreshTime"]) : undefined, }; } /** * Proto representing the access that a user has to a specific feature/service. * NextId: 3. */ export interface StorageDatabasecenterPartnerapiV1mainEntitlement { /** * The current state of user's accessibility to a feature/benefit. */ entitlementState?: | "ENTITLEMENT_STATE_UNSPECIFIED" | "ENTITLED" | "REVOKED"; /** * An enum that represents the type of this entitlement. */ type?: | "ENTITLEMENT_TYPE_UNSPECIFIED" | "GEMINI"; } /** * Metadata for individual internal resources in an instance. e.g. spanner * instance can have multiple databases with unique configuration settings. * Similarly bigtable can have multiple clusters within same bigtable instance. */ export interface StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata { /** * Backup configuration for this database */ backupConfiguration?: StorageDatabasecenterPartnerapiV1mainBackupConfiguration; /** * Information about the last backup attempt for this database */ backupRun?: StorageDatabasecenterPartnerapiV1mainBackupRun; product?: StorageDatabasecenterProtoCommonProduct; resourceId?: StorageDatabasecenterPartnerapiV1mainDatabaseResourceId; /** * Required. internal resource name for spanner this will be database name * e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" */ resourceName?: string; } function serializeStorageDatabasecenterPartnerapiV1mainInternalResourceMetadata(data: any): StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata { return { ...data, backupConfiguration: data["backupConfiguration"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainBackupConfiguration(data["backupConfiguration"]) : undefined, backupRun: data["backupRun"] !== undefined ? serializeStorageDatabasecenterPartnerapiV1mainBackupRun(data["backupRun"]) : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainInternalResourceMetadata(data: any): StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata { return { ...data, backupConfiguration: data["backupConfiguration"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainBackupConfiguration(data["backupConfiguration"]) : undefined, backupRun: data["backupRun"] !== undefined ? deserializeStorageDatabasecenterPartnerapiV1mainBackupRun(data["backupRun"]) : undefined, }; } /** * MachineConfiguration describes the configuration of a machine specific to * Database Resource. */ export interface StorageDatabasecenterPartnerapiV1mainMachineConfiguration { /** * The number of CPUs. TODO(b/342344482, b/342346271) add proto validations * again after bug fix. */ cpuCount?: number; /** * Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations * again after bug fix. */ memorySizeInBytes?: bigint; /** * Optional. Number of shards (if applicable). */ shardCount?: number; } function serializeStorageDatabasecenterPartnerapiV1mainMachineConfiguration(data: any): StorageDatabasecenterPartnerapiV1mainMachineConfiguration { return { ...data, memorySizeInBytes: data["memorySizeInBytes"] !== undefined ? String(data["memorySizeInBytes"]) : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainMachineConfiguration(data: any): StorageDatabasecenterPartnerapiV1mainMachineConfiguration { return { ...data, memorySizeInBytes: data["memorySizeInBytes"] !== undefined ? BigInt(data["memorySizeInBytes"]) : undefined, }; } export interface StorageDatabasecenterPartnerapiV1mainObservabilityMetricData { /** * Required. Type of aggregation performed on the metric. */ aggregationType?: | "AGGREGATION_TYPE_UNSPECIFIED" | "PEAK" | "P99" | "P95" | "CURRENT"; /** * Required. Type of metric like CPU, Memory, etc. */ metricType?: | "METRIC_TYPE_UNSPECIFIED" | "CPU_UTILIZATION" | "MEMORY_UTILIZATION" | "NETWORK_CONNECTIONS" | "STORAGE_UTILIZATION" | "STORAGE_USED_BYTES"; /** * Required. The time the metric value was observed. */ observationTime?: Date; /** * Required. Database resource name associated with the signal. Resource name * to follow CAIS resource_name format as noted here * go/condor-common-datamodel */ resourceName?: string; /** * Required. Value of the metric type. */ value?: StorageDatabasecenterProtoCommonTypedValue; } function serializeStorageDatabasecenterPartnerapiV1mainObservabilityMetricData(data: any): StorageDatabasecenterPartnerapiV1mainObservabilityMetricData { return { ...data, observationTime: data["observationTime"] !== undefined ? data["observationTime"].toISOString() : undefined, value: data["value"] !== undefined ? serializeStorageDatabasecenterProtoCommonTypedValue(data["value"]) : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainObservabilityMetricData(data: any): StorageDatabasecenterPartnerapiV1mainObservabilityMetricData { return { ...data, observationTime: data["observationTime"] !== undefined ? new Date(data["observationTime"]) : undefined, value: data["value"] !== undefined ? deserializeStorageDatabasecenterProtoCommonTypedValue(data["value"]) : undefined, }; } /** * An error that occurred during a backup creation operation. */ export interface StorageDatabasecenterPartnerapiV1mainOperationError { /** * Identifies the specific error that occurred. REQUIRED */ code?: string; errorType?: | "OPERATION_ERROR_TYPE_UNSPECIFIED" | "KMS_KEY_ERROR" | "DATABASE_ERROR" | "STOCKOUT_ERROR" | "CANCELLATION_ERROR" | "SQLSERVER_ERROR" | "INTERNAL_ERROR"; /** * Additional information about the error encountered. REQUIRED */ message?: string; } export interface StorageDatabasecenterPartnerapiV1mainRetentionSettings { /** * Duration based retention period i.e. 172800 seconds (2 days) */ durationBasedRetention?: number /* Duration */; quantityBasedRetention?: number; /** * The unit that 'retained_backups' represents. */ retentionUnit?: | "RETENTION_UNIT_UNSPECIFIED" | "COUNT" | "TIME" | "DURATION" | "RETENTION_UNIT_OTHER"; timeBasedRetention?: number /* Duration */; /** * Timestamp based retention period i.e. 2024-05-01T00:00:00Z */ timestampBasedRetentionTime?: Date; } function serializeStorageDatabasecenterPartnerapiV1mainRetentionSettings(data: any): StorageDatabasecenterPartnerapiV1mainRetentionSettings { return { ...data, durationBasedRetention: data["durationBasedRetention"] !== undefined ? data["durationBasedRetention"] : undefined, timeBasedRetention: data["timeBasedRetention"] !== undefined ? data["timeBasedRetention"] : undefined, timestampBasedRetentionTime: data["timestampBasedRetentionTime"] !== undefined ? data["timestampBasedRetentionTime"].toISOString() : undefined, }; } function deserializeStorageDatabasecenterPartnerapiV1mainRetentionSettings(data: any): StorageDatabasecenterPartnerapiV1mainRetentionSettings { return { ...data, durationBasedRetention: data["durationBasedRetention"] !== undefined ? data["durationBasedRetention"] : undefined, timeBasedRetention: data["timeBasedRetention"] !== undefined ? data["timeBasedRetention"] : undefined, timestampBasedRetentionTime: data["timestampBasedRetentionTime"] !== undefined ? new Date(data["timestampBasedRetentionTime"]) : undefined, }; } /** * Message type for storing tags. Tags provide a way to create annotations for * resources, and in some cases conditionally allow or deny policies based on * whether a resource has a specific tag. */ export interface StorageDatabasecenterPartnerapiV1mainTags { /** * The Tag key/value mappings. */ tags?: { [key: string]: string }; } /** * Message type for storing user labels. User labels are used to tag App Engine * resources, allowing users to search for resources matching a set of labels * and to aggregate usage data by labels. */ export interface StorageDatabasecenterPartnerapiV1mainUserLabels { labels?: { [key: string]: string }; } /** * Product specification for Condor resources. */ export interface StorageDatabasecenterProtoCommonProduct { /** * The specific engine that the underlying database is running. */ engine?: | "ENGINE_UNSPECIFIED" | "ENGINE_MYSQL" | "MYSQL" | "ENGINE_POSTGRES" | "POSTGRES" | "ENGINE_SQL_SERVER" | "SQL_SERVER" | "ENGINE_NATIVE" | "NATIVE" | "ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT" | "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT" | "ENGINE_MEMORYSTORE_FOR_REDIS" | "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER" | "ENGINE_OTHER" | "ENGINE_FIRESTORE_WITH_NATIVE_MODE" | "ENGINE_FIRESTORE_WITH_DATASTORE_MODE"; /** * Type of specific database product. It could be CloudSQL, AlloyDB etc.. */ type?: | "PRODUCT_TYPE_UNSPECIFIED" | "PRODUCT_TYPE_CLOUD_SQL" | "CLOUD_SQL" | "PRODUCT_TYPE_ALLOYDB" | "ALLOYDB" | "PRODUCT_TYPE_SPANNER" | "PRODUCT_TYPE_ON_PREM" | "ON_PREM" | "PRODUCT_TYPE_MEMORYSTORE" | "PRODUCT_TYPE_BIGTABLE" | "PRODUCT_TYPE_OTHER" | "PRODUCT_TYPE_FIRESTORE"; /** * Version of the underlying database engine. Example values: For MySQL, it * could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" etc.. */ version?: string; } /** * TypedValue represents the value of a metric type. It can either be a double, * an int64, a string or a bool. */ export interface StorageDatabasecenterProtoCommonTypedValue { /** * For boolean value */ boolValue?: boolean; /** * For double value */ doubleValue?: number; /** * For integer value */ int64Value?: bigint; /** * For string value */ stringValue?: string; } function serializeStorageDatabasecenterProtoCommonTypedValue(data: any): StorageDatabasecenterProtoCommonTypedValue { return { ...data, int64Value: data["int64Value"] !== undefined ? String(data["int64Value"]) : undefined, }; } function deserializeStorageDatabasecenterProtoCommonTypedValue(data: any): StorageDatabasecenterProtoCommonTypedValue { return { ...data, int64Value: data["int64Value"] !== undefined ? BigInt(data["int64Value"]) : undefined, }; } /** * Restrictions on STRING type values */ export interface StringRestrictions { /** * The list of allowed values, if bounded. This field will be empty if there * is a unbounded number of allowed values. */ allowedValues?: string[]; } /** * SupportedDatabaseFlag gives general information about a database flag, like * type and allowed values. This is a static value that is defined on the server * side, and it cannot be modified by callers. To set the Database flags on a * particular Instance, a caller should modify the Instance.database_flags * field. */ export interface SupportedDatabaseFlag { /** * Whether the database flag accepts multiple values. If true, a * comma-separated list of stringified values may be specified. */ acceptsMultipleValues?: boolean; /** * The name of the database flag, e.g. "max_allowed_packets". The is a * possibly key for the Instance.database_flags map field. */ flagName?: string; /** * Restriction on INTEGER type value. */ integerRestrictions?: IntegerRestrictions; /** * The name of the flag resource, following Google Cloud conventions, e.g.: * * projects/{project}/locations/{location}/flags/{flag} This field currently * has no semantic meaning. */ name?: string; /** * Whether setting or updating this flag on an Instance requires a database * restart. If a flag that requires database restart is set, the backend will * automatically restart the database (making sure to satisfy any availability * SLO's). */ requiresDbRestart?: boolean; /** * Restriction on STRING type value. */ stringRestrictions?: StringRestrictions; /** * Major database engine versions for which this flag is supported. */ supportedDbVersions?: | "DATABASE_VERSION_UNSPECIFIED" | "POSTGRES_13" | "POSTGRES_14" | "POSTGRES_15" | "POSTGRES_16"[]; valueType?: | "VALUE_TYPE_UNSPECIFIED" | "STRING" | "INTEGER" | "FLOAT" | "NONE"; } function serializeSupportedDatabaseFlag(data: any): SupportedDatabaseFlag { return { ...data, integerRestrictions: data["integerRestrictions"] !== undefined ? serializeIntegerRestrictions(data["integerRestrictions"]) : undefined, }; } function deserializeSupportedDatabaseFlag(data: any): SupportedDatabaseFlag { return { ...data, integerRestrictions: data["integerRestrictions"] !== undefined ? deserializeIntegerRestrictions(data["integerRestrictions"]) : undefined, }; } /** * Message for switching over to a cluster */ export interface SwitchoverClusterRequest { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; } /** * A time based retention policy specifies that all backups within a certain * time period should be retained. */ export interface TimeBasedRetention { /** * The retention period. */ retentionPeriod?: number /* Duration */; } function serializeTimeBasedRetention(data: any): TimeBasedRetention { return { ...data, retentionPeriod: data["retentionPeriod"] !== undefined ? data["retentionPeriod"] : undefined, }; } function deserializeTimeBasedRetention(data: any): TimeBasedRetention { return { ...data, retentionPeriod: data["retentionPeriod"] !== undefined ? data["retentionPeriod"] : undefined, }; } /** * Contains information and all metadata related to TRIAL clusters. */ export interface TrialMetadata { /** * End time of the trial cluster. */ endTime?: Date; /** * grace end time of the cluster. */ graceEndTime?: Date; /** * start time of the trial cluster. */ startTime?: Date; /** * Upgrade time of trial cluster to Standard cluster. */ upgradeTime?: Date; } function serializeTrialMetadata(data: any): TrialMetadata { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, graceEndTime: data["graceEndTime"] !== undefined ? data["graceEndTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, upgradeTime: data["upgradeTime"] !== undefined ? data["upgradeTime"].toISOString() : undefined, }; } function deserializeTrialMetadata(data: any): TrialMetadata { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, graceEndTime: data["graceEndTime"] !== undefined ? new Date(data["graceEndTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, upgradeTime: data["upgradeTime"] !== undefined ? new Date(data["upgradeTime"]) : undefined, }; } /** * Upgrades a cluster. */ export interface UpgradeClusterRequest { /** * Optional. The current etag of the Cluster. If an etag is provided and does * not match the current etag of the Cluster, upgrade will be blocked and an * ABORTED error will be returned. */ etag?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server ignores the * request if it has already been completed. The server guarantees that for at * least 60 minutes since the first request. For example, consider a situation * where you make an initial request and the request times out. If you make * the request again with the same request ID, the server can check if the * original operation with the same request ID was received, and if so, * ignores the second request. This prevents clients from accidentally * creating duplicate commitments. The request ID must be a valid UUID with * the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Optional. If set, performs request validation, for example, permission * checks and any other type of validation, but does not actually execute the * create request. */ validateOnly?: boolean; /** * Required. The version the cluster is going to be upgraded to. */ version?: | "DATABASE_VERSION_UNSPECIFIED" | "POSTGRES_13" | "POSTGRES_14" | "POSTGRES_15" | "POSTGRES_16"; } /** * UpgradeClusterResponse contains the response for upgrade cluster operation. */ export interface UpgradeClusterResponse { /** * Array of upgrade details for the current cluster and all the secondary * clusters associated with this cluster. */ clusterUpgradeDetails?: ClusterUpgradeDetails[]; /** * A user friendly message summarising the upgrade operation details and the * next steps for the user if there is any. */ message?: string; /** * Status of upgrade operation. */ status?: | "STATUS_UNSPECIFIED" | "NOT_STARTED" | "IN_PROGRESS" | "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS" | "CANCEL_IN_PROGRESS" | "CANCELLED"; } /** * Message describing User object. */ export interface User { /** * Optional. List of database roles this user has. The database role strings * are subject to the PostgreSQL naming conventions. */ databaseRoles?: string[]; /** * Input only. If the user already exists and it has additional roles, keep * them granted. */ keepExtraRoles?: boolean; /** * Output only. Name of the resource in the form of * projects/{project}/locations/{location}/cluster/{cluster}/users/{user}. */ readonly name?: string; /** * Input only. Password for the user. */ password?: string; /** * Optional. Type of this user. */ userType?: | "USER_TYPE_UNSPECIFIED" | "ALLOYDB_BUILT_IN" | "ALLOYDB_IAM_USER"; } /** * The username/password for a database user. Used for specifying initial users * at cluster creation time. */ export interface UserPassword { /** * The initial password for the user. */ password?: string; /** * The database username. */ user?: string; } /** * A weekly schedule starts a backup at prescribed start times within a day, * for the specified days of the week. The weekly schedule message is flexible * and can be used to create many types of schedules. For example, to have a * daily backup that starts at 22:00, configure the `start_times` field to have * one element "22:00" and the `days_of_week` field to have all seven days of * the week. */ export interface WeeklySchedule { /** * The days of the week to perform a backup. If this field is left empty, the * default of every day of the week is used. */ daysOfWeek?: | "DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"[]; /** * The times during the day to start a backup. The start times are assumed to * be in UTC and to be an exact hour (e.g., 04:00:00). If no start times are * provided, a single fixed start time is chosen arbitrarily. */ startTimes?: GoogleTypeTimeOfDay[]; }