import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * The connection endpoint is a network proxy service positioned between the database and the application, handling all requests from the application to the database. It features high availability, high performance, maintainability, and ease of use, and supports advanced functions such as read/write splitting and load balancing. The PostgreSQL cloud database provides two types of endpoints: default endpoint and custom read-only endpoint. * * ## Import * * ```sh * $ pulumi import volcenginecc:rdspostgresql/dbEndpoint:DbEndpoint example "instance_id|endpoint_id" * ``` */ export declare class DbEndpoint extends pulumi.CustomResource { /** * Get an existing DbEndpoint resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: DbEndpointState, opts?: pulumi.CustomResourceOptions): DbEndpoint; /** * Returns true if the given object is an instance of DbEndpoint. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DbEndpoint; /** * When the endpoint type is read/write or read-only, you can configure whether new nodes are automatically added. Values: Enable: Automatically add. Disable: Do not automatically add (default). */ readonly autoAddNewNodes: pulumi.Output; /** * Address description */ readonly description: pulumi.Output; /** * Whether global read-only is enabled. Enable: Enabled. Disable: Not enabled. */ readonly enableReadOnly: pulumi.Output; /** * Whether read/write splitting is enabled. Values: Enable: Enabled. Disable: Not enabled. */ readonly enableReadWriteSplitting: pulumi.Output; /** * Instance connection endpoint ID. */ readonly endpointId: pulumi.Output; /** * Instance connection endpoint name. */ readonly endpointName: pulumi.Output; /** * Endpoint type: Cluster: default endpoint (created by default). Custom: custom endpoint. */ readonly endpointType: pulumi.Output; /** * Public service zone connection address */ readonly innerAddresses: pulumi.Output; /** * Instance ID. */ readonly instanceId: pulumi.Output; /** * List of nodes configured for the connection endpoint. Note: Required when EndpointType is Custom. The primary node does not require a node ID; use the string 'Primary'. */ readonly nodes: pulumi.Output; /** * Private network connection address */ readonly privateAddresses: pulumi.Output; /** * Public network connection address */ readonly publicAddresses: pulumi.Output; /** * Read-only weight allocation mode. Values: Default: standard weight allocation (default). Custom: custom weight allocation. */ readonly readOnlyNodeDistributionType: pulumi.Output; /** * Maximum latency threshold for read-only nodes. When the latency of a read-only node exceeds this value, read traffic will not be sent to that node. Unit: seconds. Range: 0~3600. Default: 30. Note: This parameter can be set for default endpoints with read/write splitting enabled. */ readonly readOnlyNodeMaxDelayTime: pulumi.Output; readonly readOnlyNodeWeights: pulumi.Output; /** * Read/write mode: ReadWrite: read/write. ReadOnly: read-only. */ readonly readWriteMode: pulumi.Output; /** * After enabling read/write splitting for the endpoint, set the number of proxy connections for the endpoint. The minimum value for proxy connections is 20. The maximum value depends on the specifications of the primary node; different specifications support different maximum proxy connections. For details, see product specifications. */ readonly readWriteProxyConnection: pulumi.Output; /** * Whether the endpoint sends write requests to the write node (currently only the primary node is the write node). Values: true: Yes (default). false: No. */ readonly writeNodeHaltWriting: pulumi.Output; /** * Create a DbEndpoint resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: DbEndpointArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DbEndpoint resources. */ export interface DbEndpointState { /** * When the endpoint type is read/write or read-only, you can configure whether new nodes are automatically added. Values: Enable: Automatically add. Disable: Do not automatically add (default). */ autoAddNewNodes?: pulumi.Input; /** * Address description */ description?: pulumi.Input; /** * Whether global read-only is enabled. Enable: Enabled. Disable: Not enabled. */ enableReadOnly?: pulumi.Input; /** * Whether read/write splitting is enabled. Values: Enable: Enabled. Disable: Not enabled. */ enableReadWriteSplitting?: pulumi.Input; /** * Instance connection endpoint ID. */ endpointId?: pulumi.Input; /** * Instance connection endpoint name. */ endpointName?: pulumi.Input; /** * Endpoint type: Cluster: default endpoint (created by default). Custom: custom endpoint. */ endpointType?: pulumi.Input; /** * Public service zone connection address */ innerAddresses?: pulumi.Input; /** * Instance ID. */ instanceId?: pulumi.Input; /** * List of nodes configured for the connection endpoint. Note: Required when EndpointType is Custom. The primary node does not require a node ID; use the string 'Primary'. */ nodes?: pulumi.Input; /** * Private network connection address */ privateAddresses?: pulumi.Input; /** * Public network connection address */ publicAddresses?: pulumi.Input; /** * Read-only weight allocation mode. Values: Default: standard weight allocation (default). Custom: custom weight allocation. */ readOnlyNodeDistributionType?: pulumi.Input; /** * Maximum latency threshold for read-only nodes. When the latency of a read-only node exceeds this value, read traffic will not be sent to that node. Unit: seconds. Range: 0~3600. Default: 30. Note: This parameter can be set for default endpoints with read/write splitting enabled. */ readOnlyNodeMaxDelayTime?: pulumi.Input; readOnlyNodeWeights?: pulumi.Input[]>; /** * Read/write mode: ReadWrite: read/write. ReadOnly: read-only. */ readWriteMode?: pulumi.Input; /** * After enabling read/write splitting for the endpoint, set the number of proxy connections for the endpoint. The minimum value for proxy connections is 20. The maximum value depends on the specifications of the primary node; different specifications support different maximum proxy connections. For details, see product specifications. */ readWriteProxyConnection?: pulumi.Input; /** * Whether the endpoint sends write requests to the write node (currently only the primary node is the write node). Values: true: Yes (default). false: No. */ writeNodeHaltWriting?: pulumi.Input; } /** * The set of arguments for constructing a DbEndpoint resource. */ export interface DbEndpointArgs { /** * Whether read/write splitting is enabled. Values: Enable: Enabled. Disable: Not enabled. */ enableReadWriteSplitting?: pulumi.Input; /** * Instance connection endpoint name. */ endpointName?: pulumi.Input; /** * Endpoint type: Cluster: default endpoint (created by default). Custom: custom endpoint. */ endpointType?: pulumi.Input; /** * Public service zone connection address */ innerAddresses?: pulumi.Input; /** * Instance ID. */ instanceId?: pulumi.Input; /** * List of nodes configured for the connection endpoint. Note: Required when EndpointType is Custom. The primary node does not require a node ID; use the string 'Primary'. */ nodes?: pulumi.Input; /** * Private network connection address */ privateAddresses?: pulumi.Input; /** * Public network connection address */ publicAddresses?: pulumi.Input; /** * Read-only weight allocation mode. Values: Default: standard weight allocation (default). Custom: custom weight allocation. */ readOnlyNodeDistributionType?: pulumi.Input; /** * Maximum latency threshold for read-only nodes. When the latency of a read-only node exceeds this value, read traffic will not be sent to that node. Unit: seconds. Range: 0~3600. Default: 30. Note: This parameter can be set for default endpoints with read/write splitting enabled. */ readOnlyNodeMaxDelayTime?: pulumi.Input; readOnlyNodeWeights?: pulumi.Input[]>; /** * Read/write mode: ReadWrite: read/write. ReadOnly: read-only. */ readWriteMode?: pulumi.Input; /** * After enabling read/write splitting for the endpoint, set the number of proxy connections for the endpoint. The minimum value for proxy connections is 20. The maximum value depends on the specifications of the primary node; different specifications support different maximum proxy connections. For details, see product specifications. */ readWriteProxyConnection?: pulumi.Input; /** * Whether the endpoint sends write requests to the write node (currently only the primary node is the write node). Values: true: Yes (default). false: No. */ writeNodeHaltWriting?: pulumi.Input; }