@yandex-cloud/nodejs-sdk
Version:
Yandex.Cloud NodeJS SDK
961 lines • 6.38 MB
TypeScript
/// <reference types="node" />
import { MessageType } from "../../../../../typeRegistry";
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, handleServerStreamingCall, Client, ClientUnaryCall, Metadata, CallOptions, ClientReadableStream, ServiceError } from "@grpc/grpc-js";
import _m0 from "protobufjs/minimal";
import { Cluster_Environment, ConnectionPoolerConfig, Resources, Access, PerformanceDiagnostics, DiskSizeAutoscaling, Cluster, Host } from "../../../../../yandex/cloud/mdb/postgresql/v1/cluster";
import { FieldMask } from "../../../../../google/protobuf/field_mask";
import { MaintenanceWindow } from "../../../../../yandex/cloud/mdb/postgresql/v1/maintenance";
import { TimeOfDay } from "../../../../../google/type/timeofday";
import { DatabaseSpec } from "../../../../../yandex/cloud/mdb/postgresql/v1/database";
import { UserSpec } from "../../../../../yandex/cloud/mdb/postgresql/v1/user";
import { Operation } from "../../../../../yandex/cloud/operation/operation";
import { Backup } from "../../../../../yandex/cloud/mdb/postgresql/v1/backup";
import { Postgresqlconfig96 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6";
import { Postgresqlconfig101c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c";
import { PostgresqlConfig10 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10";
import { PostgresqlConfig11 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql11";
import { Postgresqlconfig111c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql11_1c";
import { PostgresqlConfig12 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql12";
import { Postgresqlconfig121c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql12_1c";
import { PostgresqlConfig13 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql13";
import { Postgresqlconfig131c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql13_1c";
import { PostgresqlConfig14 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql14";
import { Postgresqlconfig141c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql14_1c";
import { PostgresqlConfig15 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql15";
import { Postgresqlconfig151c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql15_1c";
import { PostgresqlConfig16 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql16";
import { Postgresqlconfig161c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql16_1c";
import { Postgresqlhostconfig96 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host9_6";
import { Postgresqlhostconfig101c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host10_1c";
import { PostgresqlHostConfig10 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host10";
import { PostgresqlHostConfig11 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host11";
import { Postgresqlhostconfig111c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host11_1c";
import { PostgresqlHostConfig12 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host12";
import { Postgresqlhostconfig121c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host12_1c";
import { PostgresqlHostConfig13 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host13";
import { Postgresqlhostconfig131c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host13_1c";
import { PostgresqlHostConfig14 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host14";
import { Postgresqlhostconfig141c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host14_1c";
import { PostgresqlHostConfig15 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host15";
import { Postgresqlhostconfig151c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host15_1c";
import { PostgresqlHostConfig16 } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host16";
import { Postgresqlhostconfig161c } from "../../../../../yandex/cloud/mdb/postgresql/v1/config/host16_1c";
export declare const protobufPackage = "yandex.cloud.mdb.postgresql.v1";
export interface GetClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.GetClusterRequest";
/**
* ID of the PostgreSQL Cluster resource to return.
* To get the cluster ID use a [ClusterService.List] request.
*/
clusterId: string;
}
export interface ListClustersRequest {
$type: "yandex.cloud.mdb.postgresql.v1.ListClustersRequest";
/**
* ID of the folder to list PostgreSQL clusters in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*/
folderId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*/
pageToken: string;
/**
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*/
filter: string;
}
export interface ListClustersResponse {
$type: "yandex.cloud.mdb.postgresql.v1.ListClustersResponse";
/** List of PostgreSQL Cluster resources. */
clusters: Cluster[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface CreateClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.CreateClusterRequest";
/** ID of the folder to create the PostgreSQL cluster in. */
folderId: string;
/** Name of the PostgreSQL cluster. The name must be unique within the folder. */
name: string;
/** Description of the PostgreSQL cluster. */
description: string;
/**
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*/
labels: {
[key: string]: string;
};
/** Deployment environment of the PostgreSQL cluster. */
environment: Cluster_Environment;
/** Configuration and resources for hosts that should be created for the PostgreSQL cluster. */
configSpec?: ConfigSpec;
/** Descriptions of databases to be created in the PostgreSQL cluster. */
databaseSpecs: DatabaseSpec[];
/** Descriptions of database users to be created in the PostgreSQL cluster. */
userSpecs: UserSpec[];
/** Individual configurations for hosts that should be created for the PostgreSQL cluster. */
hostSpecs: HostSpec[];
/** ID of the network to create the cluster in. */
networkId: string;
/** User security groups */
securityGroupIds: string[];
/** Deletion Protection inhibits deletion of the cluster */
deletionProtection: boolean;
/** Host groups hosting VMs of the cluster. */
hostGroupIds: string[];
}
export interface CreateClusterRequest_LabelsEntry {
$type: "yandex.cloud.mdb.postgresql.v1.CreateClusterRequest.LabelsEntry";
key: string;
value: string;
}
export interface CreateClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.CreateClusterMetadata";
/** ID of the PostgreSQL cluster that is being created. */
clusterId: string;
}
export interface UpdateClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.UpdateClusterRequest";
/**
* ID of the PostgreSQL Cluster resource to update.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*/
clusterId: string;
/** Field mask that specifies which fields of the PostgreSQL Cluster resource should be updated. */
updateMask?: FieldMask;
/** New description of the PostgreSQL cluster. */
description: string;
/**
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*/
labels: {
[key: string]: string;
};
/** New configuration and resources for hosts in the cluster. */
configSpec?: ConfigSpec;
/** New name for the cluster. */
name: string;
/** New maintenance window settings for the cluster. */
maintenanceWindow?: MaintenanceWindow;
/** User security groups */
securityGroupIds: string[];
/** Deletion Protection inhibits deletion of the cluster */
deletionProtection: boolean;
}
export interface UpdateClusterRequest_LabelsEntry {
$type: "yandex.cloud.mdb.postgresql.v1.UpdateClusterRequest.LabelsEntry";
key: string;
value: string;
}
export interface UpdateClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.UpdateClusterMetadata";
/** ID of the PostgreSQL Cluster resource that is being updated. */
clusterId: string;
}
export interface DeleteClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.DeleteClusterRequest";
/**
* ID of the PostgreSQL cluster to delete.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*/
clusterId: string;
}
export interface DeleteClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.DeleteClusterMetadata";
/** ID of the PostgreSQL cluster that is being deleted. */
clusterId: string;
}
export interface StartClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.StartClusterRequest";
/** ID of the PostgreSQL cluster to start. */
clusterId: string;
}
export interface StartClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.StartClusterMetadata";
/** ID of the PostgreSQL cluster. */
clusterId: string;
}
export interface StopClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.StopClusterRequest";
/** ID of the PostgreSQL cluster to stop. */
clusterId: string;
}
export interface StopClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.StopClusterMetadata";
/** ID of the PostgreSQL cluster. */
clusterId: string;
}
export interface MoveClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.MoveClusterRequest";
/** ID of the PostgreSQL cluster to move. */
clusterId: string;
/** ID of the destination folder. */
destinationFolderId: string;
}
export interface MoveClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.MoveClusterMetadata";
/** ID of the PostgreSQL cluster being moved. */
clusterId: string;
/** ID of the source folder. */
sourceFolderId: string;
/** ID of the destnation folder. */
destinationFolderId: string;
}
export interface BackupClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.BackupClusterRequest";
/**
* ID of the PostgreSQL cluster to back up.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*/
clusterId: string;
}
export interface BackupClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.BackupClusterMetadata";
/** ID of the PostgreSQL cluster that is being backed up. */
clusterId: string;
/** ID of the PostgreSQL backup that is being created. */
backupId: string;
}
export interface RestoreClusterRequest {
$type: "yandex.cloud.mdb.postgresql.v1.RestoreClusterRequest";
/**
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*/
backupId: string;
/** Timestamp of the moment to which the PostgreSQL cluster should be restored. */
time?: Date;
/**
* Flag that indicates whether a database should be restored to the first backup point
* available just after the timestamp specified in the [time] field instead of just before.
*
* Possible values:
* * false (default) - the restore point refers to the first backup moment before [time].
* * true - the restore point refers to the first backup point after [time].
*/
timeInclusive: boolean;
/** Name of the new PostgreSQL cluster. The name must be unique within the folder. */
name: string;
/** Description of the new PostgreSQL cluster. */
description: string;
/**
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*/
labels: {
[key: string]: string;
};
/** Deployment environment of the new PostgreSQL cluster. */
environment: Cluster_Environment;
/** Configuration for the PostgreSQL cluster to be created. */
configSpec?: ConfigSpec;
/**
* Configurations for PostgreSQL hosts that should be created for
* the cluster that is being created from the backup.
*/
hostSpecs: HostSpec[];
/** ID of the network to create the PostgreSQL cluster in. */
networkId: string;
/** ID of the folder to create the PostgreSQL cluster in. */
folderId: string;
/** User security groups */
securityGroupIds: string[];
/** Deletion Protection inhibits deletion of the cluster */
deletionProtection: boolean;
/** Host groups hosting VMs of the cluster. */
hostGroupIds: string[];
}
export interface RestoreClusterRequest_LabelsEntry {
$type: "yandex.cloud.mdb.postgresql.v1.RestoreClusterRequest.LabelsEntry";
key: string;
value: string;
}
export interface RestoreClusterMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.RestoreClusterMetadata";
/** ID of the new PostgreSQL cluster that is being created from a backup. */
clusterId: string;
/** ID of the backup that is being used for creating a cluster. */
backupId: string;
}
export interface StartClusterFailoverRequest {
$type: "yandex.cloud.mdb.postgresql.v1.StartClusterFailoverRequest";
/** ID of PostgreSQL cluster. */
clusterId: string;
/** New master host. Switch to the most up-to-date replica if not provided. */
hostName: string;
}
export interface StartClusterFailoverMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.StartClusterFailoverMetadata";
/** ID of the PostgreSQL cluster being failovered. */
clusterId: string;
}
export interface RescheduleMaintenanceRequest {
$type: "yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest";
/** ID of the PostgreSQL cluster to reschedule the maintenance operation for. */
clusterId: string;
/** The type of reschedule request. */
rescheduleType: RescheduleMaintenanceRequest_RescheduleType;
/** The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen. */
delayedUntil?: Date;
}
export declare enum RescheduleMaintenanceRequest_RescheduleType {
RESCHEDULE_TYPE_UNSPECIFIED = 0,
/** IMMEDIATE - Start the maintenance operation immediately. */
IMMEDIATE = 1,
/** NEXT_AVAILABLE_WINDOW - Start the maintenance operation within the next available maintenance window. */
NEXT_AVAILABLE_WINDOW = 2,
/** SPECIFIC_TIME - Start the maintenance operation at the specific time. */
SPECIFIC_TIME = 3,
UNRECOGNIZED = -1
}
export declare function rescheduleMaintenanceRequest_RescheduleTypeFromJSON(object: any): RescheduleMaintenanceRequest_RescheduleType;
export declare function rescheduleMaintenanceRequest_RescheduleTypeToJSON(object: RescheduleMaintenanceRequest_RescheduleType): string;
/** Rescheduled maintenance operation metadata. */
export interface RescheduleMaintenanceMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceMetadata";
/** Required. ID of the PostgreSQL cluster. */
clusterId: string;
/** Required. The time until which this maintenance operation is to be delayed. */
delayedUntil?: Date;
}
export interface LogRecord {
$type: "yandex.cloud.mdb.postgresql.v1.LogRecord";
/** Log record timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. */
timestamp?: Date;
/** Contents of the log record. */
message: {
[key: string]: string;
};
}
export interface LogRecord_MessageEntry {
$type: "yandex.cloud.mdb.postgresql.v1.LogRecord.MessageEntry";
key: string;
value: string;
}
export interface ListClusterLogsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterLogsRequest";
/**
* ID of the PostgreSQL cluster to request logs for.
* To get the PostgreSQL cluster ID use a [ClusterService.List] request.
*/
clusterId: string;
/**
* Columns from the logs table to request.
* If no columns are specified, entire log records are returned.
*/
columnFilter: string[];
/** Type of the service to request logs about. */
serviceType: ListClusterLogsRequest_ServiceType;
/** Start timestamp for the logs request, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. */
fromTime?: Date;
/** End timestamp for the logs request, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. */
toTime?: Date;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClusterLogsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the
* [ListClusterLogsResponse.next_page_token] returned by the previous list request.
*/
pageToken: string;
/** Always return `next_page_token`, even if current page is empty. */
alwaysNextPageToken: boolean;
}
export declare enum ListClusterLogsRequest_ServiceType {
SERVICE_TYPE_UNSPECIFIED = 0,
/** POSTGRESQL - Logs of PostgreSQL activity. */
POSTGRESQL = 1,
/** POOLER - Logs of connection pooler activity. */
POOLER = 2,
UNRECOGNIZED = -1
}
export declare function listClusterLogsRequest_ServiceTypeFromJSON(object: any): ListClusterLogsRequest_ServiceType;
export declare function listClusterLogsRequest_ServiceTypeToJSON(object: ListClusterLogsRequest_ServiceType): string;
export interface ListClusterLogsResponse {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterLogsResponse";
/** Requested log records. */
logs: LogRecord[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClusterLogsRequest.page_size], use the [next_page_token] as the value
* for the [ListClusterLogsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
* This value is interchangeable with `next_record_token` from StreamLogs method.
*/
nextPageToken: string;
}
export interface StreamLogRecord {
$type: "yandex.cloud.mdb.postgresql.v1.StreamLogRecord";
/** One of the requested log records. */
record?: LogRecord;
/**
* This token allows you to continue streaming logs starting from the exact
* same record. To continue streaming, specify value of `next_record_token`
* as value for `record_token` parameter in the next StreamLogs request.
* This value is interchangeable with `next_page_token` from ListLogs method.
*/
nextRecordToken: string;
}
export interface StreamClusterLogsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.StreamClusterLogsRequest";
/** Required. ID of the PostgreSQL cluster. */
clusterId: string;
/** Columns from logs table to get in the response. */
columnFilter: string[];
serviceType: StreamClusterLogsRequest_ServiceType;
/** Start timestamp for the logs request. */
fromTime?: Date;
/**
* End timestamp for the logs request.
* If this field is not set, all existing logs will be sent and then the new ones as
* they appear. In essence it has 'tail -f' semantics.
*/
toTime?: Date;
/**
* Record token. Set `record_token` to the `next_record_token` returned by a previous StreamLogs
* request to start streaming from next log record.
*/
recordToken: string;
/**
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently filtering can be applied to the [LogRecord.logs.message.hostname],
* [LogRecord.logs.message.error_severity] (for POSTGRESQL service), [LogRecord.logs.message.level] (for POOLER service) fields.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-z0-9.-]{1,61}`.
* Examples of a filter:
* `message.hostname='node1.db.cloud.yandex.net'`
* `message.error_severity IN ("ERROR", "FATAL", "PANIC") AND message.hostname = "node1.db.cloud.yandex.net"`
*/
filter: string;
}
export declare enum StreamClusterLogsRequest_ServiceType {
SERVICE_TYPE_UNSPECIFIED = 0,
/** POSTGRESQL - Logs of PostgreSQL activity. */
POSTGRESQL = 1,
/** POOLER - Logs of connection pooler activity. */
POOLER = 2,
UNRECOGNIZED = -1
}
export declare function streamClusterLogsRequest_ServiceTypeFromJSON(object: any): StreamClusterLogsRequest_ServiceType;
export declare function streamClusterLogsRequest_ServiceTypeToJSON(object: StreamClusterLogsRequest_ServiceType): string;
export interface ListClusterOperationsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterOperationsRequest";
/** ID of the PostgreSQL Cluster resource to list operations for. */
clusterId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClusterOperationsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the [ListClusterOperationsResponse.next_page_token]
* returned by the previous list request.
*/
pageToken: string;
}
export interface ListClusterOperationsResponse {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterOperationsResponse";
/** List of Operation resources for the specified PostgreSQL cluster. */
operations: Operation[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClusterOperationsRequest.page_size], use the [next_page_token] as the value
* for the [ListClusterOperationsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface ListClusterBackupsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterBackupsRequest";
/**
* ID of the PostgreSQL cluster.
* To get the PostgreSQL cluster ID use a [ClusterService.List] request.
*/
clusterId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClusterBackupsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the [ListClusterBackupsResponse.next_page_token]
* returned by the previous list request.
*/
pageToken: string;
}
export interface ListClusterBackupsResponse {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterBackupsResponse";
/** List of PostgreSQL Backup resources. */
backups: Backup[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClusterBackupsRequest.page_size], use the [next_page_token] as the value
* for the [ListClusterBackupsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface ListClusterHostsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterHostsRequest";
/**
* ID of the PostgreSQL cluster.
* To get the PostgreSQL cluster ID use a [ClusterService.List] request.
*/
clusterId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClusterHostsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the [ListClusterHostsResponse.next_page_token]
* returned by the previous list request.
*/
pageToken: string;
}
export interface ListClusterHostsResponse {
$type: "yandex.cloud.mdb.postgresql.v1.ListClusterHostsResponse";
/** List of Host resources. */
hosts: Host[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClusterHostsRequest.page_size], use the [next_page_token] as the value
* for the [ListClusterHostsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface AddClusterHostsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.AddClusterHostsRequest";
/**
* ID of the PostgreSQL cluster to add hosts to.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*/
clusterId: string;
/** Configurations for PostgreSQL hosts that should be added to the cluster. */
hostSpecs: HostSpec[];
}
export interface AddClusterHostsMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.AddClusterHostsMetadata";
/** ID of the PostgreSQL cluster to which the hosts are being added. */
clusterId: string;
/** Names of hosts that are being added to the cluster. */
hostNames: string[];
}
export interface DeleteClusterHostsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.DeleteClusterHostsRequest";
/**
* ID of the PostgreSQL cluster to remove hosts from.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*/
clusterId: string;
/** Names of hosts to delete. */
hostNames: string[];
}
export interface DeleteClusterHostsMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.DeleteClusterHostsMetadata";
/** ID of the PostgreSQL cluster to remove hosts from. */
clusterId: string;
/** Names of hosts that are being deleted. */
hostNames: string[];
}
export interface UpdateClusterHostsRequest {
$type: "yandex.cloud.mdb.postgresql.v1.UpdateClusterHostsRequest";
/**
* ID of the PostgreSQL cluster to update hosts in.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*/
clusterId: string;
/** New configurations to apply to hosts. */
updateHostSpecs: UpdateHostSpec[];
}
export interface UpdateClusterHostsMetadata {
$type: "yandex.cloud.mdb.postgresql.v1.UpdateClusterHostsMetadata";
/** ID of the PostgreSQL cluster to update hosts in. */
clusterId: string;
/** Names of hosts that are being updated. */
hostNames: string[];
}
export interface UpdateHostSpec {
$type: "yandex.cloud.mdb.postgresql.v1.UpdateHostSpec";
/**
* Name of the host to update.
* To get the PostgreSQL host name, use a [ClusterService.ListHosts] request.
*/
hostName: string;
/**
* [Host.name] of the host to be used as the replication source (for cascading replication).
* To get the PostgreSQL host name, use a [ClusterService.ListHosts] request.
*/
replicationSource: string;
/**
* The host with the highest priority is the synchronous replica. All others are asynchronous.
* The synchronous replica replaces the master when needed.
*
* When a replica becomes the master, its priority is ignored.
*/
priority?: number;
/** Configuration of a PostgreSQL server for the host. */
configSpec?: ConfigHostSpec;
/** Field mask that specifies which fields of the PostgreSQL host should be updated. */
updateMask?: FieldMask;
/** Whether the host should get a public IP address on creation. */
assignPublicIp: boolean;
}
export interface HostSpec {
$type: "yandex.cloud.mdb.postgresql.v1.HostSpec";
/**
* ID of the availability zone where the host resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request.
*/
zoneId: string;
/**
* ID of the subnet that the host should belong to. This subnet should be a part
* of the network that the cluster belongs to.
* The ID of the network is set in the field [Cluster.network_id].
*/
subnetId: string;
/**
* Whether the host should get a public IP address on creation.
*
* After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign
* a public IP to a host without one, recreate the host with [assign_public_ip] set as needed.
*
* Possible values:
* * false - don't assign a public IP to the host.
* * true - the host should have a public IP address.
*/
assignPublicIp: boolean;
/** [Host.name] of the host to be used as the replication source (for cascading replication). */
replicationSource: string;
/**
* Priority of the host as a replica. A higher value corresponds to higher priority.
*
* The host with the highest priority is the synchronous replica. All others are asynchronous.
* The synchronous replica replaces the master when needed.
*
* When a replica becomes the master, its priority is ignored.
*/
priority?: number;
/** Configuration of a PostgreSQL server for the host. */
configSpec?: ConfigHostSpec;
}
export interface ConfigSpec {
$type: "yandex.cloud.mdb.postgresql.v1.ConfigSpec";
/**
* Version of PostgreSQL used in the cluster.
* Possible values: `9.6`, `10`, `10_1c`, `11`, `12`, `13`, `14`, `15`
*/
version: string;
/** Configuration for a PostgreSQL 9.6 cluster. */
postgresqlConfig96?: Postgresqlconfig96 | undefined;
/** Configuration for a PostgreSQL 10 1C cluster. */
postgresqlConfig101c?: Postgresqlconfig101c | undefined;
/** Configuration for a PostgreSQL 10 cluster. */
postgresqlConfig10?: PostgresqlConfig10 | undefined;
/** Configuration for a PostgreSQL 11 cluster. */
postgresqlConfig11?: PostgresqlConfig11 | undefined;
/** Configuration for a PostgreSQL 11 1C cluster. */
postgresqlConfig111c?: Postgresqlconfig111c | undefined;
/** Configuration for a PostgreSQL 12 cluster. */
postgresqlConfig12?: PostgresqlConfig12 | undefined;
/** Configuration for a PostgreSQL 12 1C cluster. */
postgresqlConfig121c?: Postgresqlconfig121c | undefined;
/** Configuration for a PostgreSQL 13 cluster. */
postgresqlConfig13?: PostgresqlConfig13 | undefined;
/** Configuration for a PostgreSQL 13 1C cluster. */
postgresqlConfig131c?: Postgresqlconfig131c | undefined;
/** Configuration for a PostgreSQL 14 cluster. */
postgresqlConfig14?: PostgresqlConfig14 | undefined;
/** Configuration for a PostgreSQL 14 1C cluster. */
postgresqlConfig141c?: Postgresqlconfig141c | undefined;
/** Configuration for a PostgreSQL 15 cluster. */
postgresqlConfig15?: PostgresqlConfig15 | undefined;
/** Configuration for a PostgreSQL 15 1C cluster. */
postgresqlConfig151c?: Postgresqlconfig151c | undefined;
/** Configuration for a PostgreSQL 16 cluster. */
postgresqlConfig16?: PostgresqlConfig16 | undefined;
/** Configuration for a PostgreSQL 16 1C cluster. */
postgresqlConfig161c?: Postgresqlconfig161c | undefined;
/** Configuration of the connection pooler. */
poolerConfig?: ConnectionPoolerConfig;
/** Resources allocated to PostgreSQL hosts. */
resources?: Resources;
/** Configuration setting which enables/disables autofailover in cluster. */
autofailover?: boolean;
/** Time to start the daily backup, in the UTC timezone. */
backupWindowStart?: TimeOfDay;
/** Retention policy of automated backups. */
backupRetainPeriodDays?: number;
/** Access policy to DB */
access?: Access;
/** Configuration of the performance diagnostics service. */
performanceDiagnostics?: PerformanceDiagnostics;
/** Disk size autoscaling */
diskSizeAutoscaling?: DiskSizeAutoscaling;
}
export interface ConfigHostSpec {
$type: "yandex.cloud.mdb.postgresql.v1.ConfigHostSpec";
/** Configuration for a host with PostgreSQL 9.6 server deployed. */
postgresqlConfig96?: Postgresqlhostconfig96 | undefined;
/** Configuration for a host with PostgreSQL 10 1C server deployed. */
postgresqlConfig101c?: Postgresqlhostconfig101c | undefined;
/** Configuration for a host with PostgreSQL 10 server deployed. */
postgresqlConfig10?: PostgresqlHostConfig10 | undefined;
/** Configuration for a host with PostgreSQL 11 server deployed. */
postgresqlConfig11?: PostgresqlHostConfig11 | undefined;
/** Configuration for a host with PostgreSQL 11 1C server deployed. */
postgresqlConfig111c?: Postgresqlhostconfig111c | undefined;
/** Configuration for a host with PostgreSQL 12 server deployed. */
postgresqlConfig12?: PostgresqlHostConfig12 | undefined;
/** Configuration for a host with PostgreSQL 12 1C server deployed. */
postgresqlConfig121c?: Postgresqlhostconfig121c | undefined;
/** Configuration for a host with PostgreSQL 13 server deployed. */
postgresqlConfig13?: PostgresqlHostConfig13 | undefined;
/** Configuration for a host with PostgreSQL 13 1C server deployed. */
postgresqlConfig131c?: Postgresqlhostconfig131c | undefined;
/** Configuration for a host with PostgreSQL 14 server deployed. */
postgresqlConfig14?: PostgresqlHostConfig14 | undefined;
/** Configuration for a host with PostgreSQL 14 1C server deployed. */
postgresqlConfig141c?: Postgresqlhostconfig141c | undefined;
/** Configuration for a host with PostgreSQL 15 server deployed. */
postgresqlConfig15?: PostgresqlHostConfig15 | undefined;
/** Configuration for a host with PostgreSQL 15 1C server deployed. */
postgresqlConfig151c?: Postgresqlhostconfig151c | undefined;
/** Configuration for a host with PostgreSQL 16 server deployed. */
postgresqlConfig16?: PostgresqlHostConfig16 | undefined;
/** Configuration for a host with PostgreSQL 16 1C server deployed. */
postgresqlConfig161c?: Postgresqlhostconfig161c | undefined;
}
export declare const GetClusterRequest: {
$type: "yandex.cloud.mdb.postgresql.v1.GetClusterRequest";
encode(message: GetClusterRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GetClusterRequest;
fromJSON(object: any): GetClusterRequest;
toJSON(message: GetClusterRequest): unknown;
fromPartial<I extends {
clusterId?: string | undefined;
} & {
clusterId?: string | undefined;
} & Record<Exclude<keyof I, "$type" | "clusterId">, never>>(object: I): GetClusterRequest;
};
export declare const ListClustersRequest: {
$type: "yandex.cloud.mdb.postgresql.v1.ListClustersRequest";
encode(message: ListClustersRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ListClustersRequest;
fromJSON(object: any): ListClustersRequest;
toJSON(message: ListClustersRequest): unknown;
fromPartial<I extends {
pageSize?: number | undefined;
pageToken?: string | undefined;
filter?: string | undefined;
folderId?: string | undefined;
} & {
pageSize?: number | undefined;
pageToken?: string | undefined;
filter?: string | undefined;
folderId?: string | undefined;
} & Record<Exclude<keyof I, "$type" | "pageSize" | "pageToken" | "filter" | "folderId">, never>>(object: I): ListClustersRequest;
};
export declare const ListClustersResponse: MessageType<ListClustersResponse>;
export declare const CreateClusterRequest: {
$type: "yandex.cloud.mdb.postgresql.v1.CreateClusterRequest";
encode(message: CreateClusterRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CreateClusterRequest;
fromJSON(object: any): CreateClusterRequest;
toJSON(message: CreateClusterRequest): unknown;
fromPartial<I extends {
description?: string | undefined;
name?: string | undefined;
folderId?: string | undefined;
labels?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
networkId?: string | undefined;
securityGroupIds?: string[] | undefined;
deletionProtection?: boolean | undefined;
hostGroupIds?: string[] | undefined;
configSpec?: {
resources?: {
diskTypeId?: string | undefined;
diskSize?: number | undefined;
resourcePresetId?: string | undefined;
} | undefined;
version?: string | undefined;
backupWindowStart?: {
seconds?: number | undefined;
nanos?: number | undefined;
hours?: number | undefined;
minutes?: number | undefined;
} | undefined;
access?: {
dataLens?: boolean | undefined;
webSql?: boolean | undefined;
serverless?: boolean | undefined;
dataTransfer?: boolean | undefined;
yandexQuery?: boolean | undefined;
} | undefined;
backupRetainPeriodDays?: number | undefined;
performanceDiagnostics?: {
enabled?: boolean | undefined;
sessionsSamplingInterval?: number | undefined;
statementsSamplingInterval?: number | undefined;
} | undefined;
postgresqlConfig96?: {
maxConnections?: number | undefined;
logStatement?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_LogStatement | undefined;
maxPreparedTransactions?: number | undefined;
logErrorVerbosity?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_LogErrorVerbosity | undefined;
walLevel?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_WalLevel | undefined;
synchronousCommit?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_SynchronousCommit | undefined;
constraintExclusion?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_ConstraintExclusion | undefined;
forceParallelMode?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_ForceParallelMode | undefined;
clientMinMessages?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_LogLevel | undefined;
logMinMessages?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_LogLevel | undefined;
logMinErrorStatement?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_LogLevel | undefined;
searchPath?: string | undefined;
defaultTransactionIsolation?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_TransactionIsolation | undefined;
byteaOutput?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_ByteaOutput | undefined;
xmlbinary?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_XmlBinary | undefined;
xmloption?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_XmlOption | undefined;
backslashQuote?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql9_6").Postgresqlconfig96_BackslashQuote | undefined;
sharedBuffers?: number | undefined;
tempBuffers?: number | undefined;
workMem?: number | undefined;
maintenanceWorkMem?: number | undefined;
replacementSortTuples?: number | undefined;
autovacuumWorkMem?: number | undefined;
tempFileLimit?: number | undefined;
vacuumCostDelay?: number | undefined;
vacuumCostPageHit?: number | undefined;
vacuumCostPageMiss?: number | undefined;
vacuumCostPageDirty?: number | undefined;
vacuumCostLimit?: number | undefined;
bgwriterDelay?: number | undefined;
bgwriterLruMaxpages?: number | undefined;
bgwriterLruMultiplier?: number | undefined;
bgwriterFlushAfter?: number | undefined;
backendFlushAfter?: number | undefined;
oldSnapshotThreshold?: number | undefined;
checkpointTimeout?: number | undefined;
checkpointCompletionTarget?: number | undefined;
checkpointFlushAfter?: number | undefined;
maxWalSize?: number | undefined;
minWalSize?: number | undefined;
maxStandbyStreamingDelay?: number | undefined;
defaultStatisticsTarget?: number | undefined;
cursorTupleFraction?: number | undefined;
fromCollapseLimit?: number | undefined;
joinCollapseLimit?: number | undefined;
logMinDurationStatement?: number | undefined;
logCheckpoints?: boolean | undefined;
logConnections?: boolean | undefined;
logDisconnections?: boolean | undefined;
logDuration?: boolean | undefined;
logLockWaits?: boolean | undefined;
logTempFiles?: number | undefined;
rowSecurity?: boolean | undefined;
statementTimeout?: number | undefined;
lockTimeout?: number | undefined;
idleInTransactionSessionTimeout?: number | undefined;
ginPendingListLimit?: number | undefined;
deadlockTimeout?: number | undefined;
maxLocksPerTransaction?: number | undefined;
maxPredLocksPerTransaction?: number | undefined;
arrayNulls?: boolean | undefined;
defaultWithOids?: boolean | undefined;
escapeStringWarning?: boolean | undefined;
loCompatPrivileges?: boolean | undefined;
operatorPrecedenceWarning?: boolean | undefined;
quoteAllIdentifiers?: boolean | undefined;
standardConformingStrings?: boolean | undefined;
synchronizeSeqscans?: boolean | undefined;
transformNullEquals?: boolean | undefined;
exitOnError?: boolean | undefined;
seqPageCost?: number | undefined;
randomPageCost?: number | undefined;
sqlInheritance?: boolean | undefined;
autovacuumMaxWorkers?: number | undefined;
autovacuumVacuumCostDelay?: number | undefined;
autovacuumVacuumCostLimit?: number | undefined;
autovacuumNaptime?: number | undefined;
archiveTimeout?: number | undefined;
trackActivityQuerySize?: number | undefined;
effectiveIoConcurrency?: number | undefined;
effectiveCacheSize?: number | undefined;
} | undefined;
postgresqlConfig101c?: {
timezone?: string | undefined;
maxConnections?: number | undefined;
logStatement?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_LogStatement | undefined;
maxPreparedTransactions?: number | undefined;
logErrorVerbosity?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_LogErrorVerbosity | undefined;
walLevel?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_WalLevel | undefined;
synchronousCommit?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_SynchronousCommit | undefined;
constraintExclusion?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_ConstraintExclusion | undefined;
forceParallelMode?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_ForceParallelMode | undefined;
clientMinMessages?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_LogLevel | undefined;
logMinMessages?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_LogLevel | undefined;
logMinErrorStatement?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_LogLevel | undefined;
searchPath?: string | undefined;
defaultTransactionIsolation?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_TransactionIsolation | undefined;
byteaOutput?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_ByteaOutput | undefined;
xmlbinary?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_XmlBinary | undefined;
xmloption?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_XmlOption | undefined;
backslashQuote?: import("../../../../../yandex/cloud/mdb/postgresql/v1/config/postgresql10_1c").Postgresqlconfig101c_BackslashQuote | undefined;
sharedBuffers?: number | undefined;
tempBuffers?: number | undefined;
workMem?: number | undefined;
maintenanceWorkMem?: number | undefined;
replacementSortTuples?: number | undefined;
autovacuumWorkMem?: number | undefined;
tempFileLimit?: number | undefined;
vacuumCostDelay?: number | undefined;
vacuumCostPageHit?: number | undefined;
vacuumCostPageMiss?: number | undefined;
vacuumCostPageDirty?: number | undefined;
vacuumCostLimit?: number | undefined;
bgwriterDelay?: number | undefined;
bgwriterLruMaxpages?: number | undefined;
bgwriterLruMultiplier?: number | undefined;
bgwriterFlushAfter?: number | undefined;
backendFlushAfter?: number | undefined;
oldSnapshotThreshold?: number | undefined;
checkpointTimeout?: number | undefined;
checkpointCompletionTarget?: number | undefined;
checkpointFlushAfter?: number | undefined;
maxWalSize?: number | undefined;
minWalSize?: number | undefined;
maxStandbyStreamingDelay?: number | undefined;
defaultStatisticsTarget?: number | undefined;
cursorTupleFraction?: number | u