import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * Provides a resource to manage rds postgresql database endpoint
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const cluster = new volcengine.rds_postgresql.DatabaseEndpoint("cluster", {
 *     endpointId: "postgres-72715e0d9f58-cluster",
 *     endpointName: "默认终端",
 *     endpointType: "Cluster",
 *     instanceId: "postgres-72715e0d9f58",
 *     readOnlyNodeDistributionType: "Custom",
 *     readOnlyNodeMaxDelayTime: 40,
 *     readWriteMode: "ReadWrite",
 *     readWriteProxyConnection: 20,
 *     writeNodeHaltWriting: false,
 *     readWriteSplitting: true,
 *     readOnlyNodeWeights: [{
 *         nodeId: undefined,
 *         nodeType: "Primary",
 *         weight: 200,
 *     }],
 *     dnsVisibility: true,
 *     port: "5432",
 * });
 * const example = new volcengine.rds_postgresql.DatabaseEndpoint("example", {
 *     instanceId: "postgres-72715e0d9f58",
 *     endpointName: "tf-test",
 *     endpointType: "Custom",
 *     nodes: "Primary",
 *     readWriteMode: "ReadWrite",
 * });
 * ```
 *
 * ## Import
 *
 * RdsPostgresqlDatabaseEndpoint can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:rds_postgresql/databaseEndpoint:DatabaseEndpoint default resource_id
 * ```
 */
export declare class DatabaseEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing DatabaseEndpoint 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<pulumi.ID>, state?: DatabaseEndpointState, opts?: pulumi.CustomResourceOptions): DatabaseEndpoint;
    /**
     * Returns true if the given object is an instance of DatabaseEndpoint.  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 DatabaseEndpoint;
    /**
     * Whether to enable public network resolution. false: Default value, Volcano Engine private network resolution. true: Volcano Engine private network and public network resolution. Do not set this field when creating a endpoint.
     */
    readonly dnsVisibility: pulumi.Output<boolean>;
    /**
     * Private address domain prefix to modify. Do not set this field when creating a endpoint.
     */
    readonly domainPrefix: pulumi.Output<string | undefined>;
    /**
     * The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
     */
    readonly endpointId: pulumi.Output<string>;
    /**
     * The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
     */
    readonly endpointName: pulumi.Output<string>;
    /**
     * Type of the connection endpoint. Valid values: `Custom`(custom endpoint), `Cluster`(default endpoint). When create a new
     * endpoint, the value must be `Custom`. The default cluster endpoint does not support creation; you can use import to
     * bring it under Terraform management.
     */
    readonly endpointType: pulumi.Output<string | undefined>;
    /**
     * Whether to enable the global read-only mode for the instance. There is no default value. If no value is passed, the request will be ignored. Do not set this field when creating a endpoint.
     */
    readonly globalReadOnly: pulumi.Output<boolean | undefined>;
    /**
     * The ID of the RDS PostgreSQL instance.
     */
    readonly instanceId: pulumi.Output<string>;
    /**
     * List of nodes configured for the connection endpoint. Required when EndpointType is Custom. The primary node does not need to pass the node ID; it is sufficient to pass the string "Primary".
     */
    readonly nodes: pulumi.Output<string | undefined>;
    /**
     * Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
     */
    readonly port: pulumi.Output<string>;
    /**
     * Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
     */
    readonly readOnlyNodeDistributionType: pulumi.Output<string>;
    /**
     * The maximum delay threshold for read-only nodes. When the delay time of a read-only node exceeds this value, read traffic will not be sent to that node. The value range is 0~3600. Default value is 30 seconds.
     */
    readonly readOnlyNodeMaxDelayTime: pulumi.Output<number>;
    /**
     * Custom read weight allocation. This parameter needs to be set when the value of readOnlyNodeDistributionType is Custom.
     */
    readonly readOnlyNodeWeights: pulumi.Output<outputs.rds_postgresql.DatabaseEndpointReadOnlyNodeWeight[]>;
    /**
     * ReadWrite or ReadOnly.
     */
    readonly readWriteMode: pulumi.Output<string | undefined>;
    /**
     * The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
     */
    readonly readWriteProxyConnection: pulumi.Output<number>;
    /**
     * Whether to enable read-write separation. Only default endpoint supports this feature.
     */
    readonly readWriteSplitting: pulumi.Output<boolean>;
    /**
     * Whether to prohibit the terminal from sending write requests to the write node. To avoid having no available connection endpoints to carry write operations, this configuration can only be enabled when the instance has other read-write endpoints.
     */
    readonly writeNodeHaltWriting: pulumi.Output<boolean>;
    /**
     * Create a DatabaseEndpoint 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: DatabaseEndpointArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering DatabaseEndpoint resources.
 */
export interface DatabaseEndpointState {
    /**
     * Whether to enable public network resolution. false: Default value, Volcano Engine private network resolution. true: Volcano Engine private network and public network resolution. Do not set this field when creating a endpoint.
     */
    dnsVisibility?: pulumi.Input<boolean>;
    /**
     * Private address domain prefix to modify. Do not set this field when creating a endpoint.
     */
    domainPrefix?: pulumi.Input<string>;
    /**
     * The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
     */
    endpointId?: pulumi.Input<string>;
    /**
     * The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
     */
    endpointName?: pulumi.Input<string>;
    /**
     * Type of the connection endpoint. Valid values: `Custom`(custom endpoint), `Cluster`(default endpoint). When create a new
     * endpoint, the value must be `Custom`. The default cluster endpoint does not support creation; you can use import to
     * bring it under Terraform management.
     */
    endpointType?: pulumi.Input<string>;
    /**
     * Whether to enable the global read-only mode for the instance. There is no default value. If no value is passed, the request will be ignored. Do not set this field when creating a endpoint.
     */
    globalReadOnly?: pulumi.Input<boolean>;
    /**
     * The ID of the RDS PostgreSQL instance.
     */
    instanceId?: pulumi.Input<string>;
    /**
     * List of nodes configured for the connection endpoint. Required when EndpointType is Custom. The primary node does not need to pass the node ID; it is sufficient to pass the string "Primary".
     */
    nodes?: pulumi.Input<string>;
    /**
     * Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
     */
    port?: pulumi.Input<string>;
    /**
     * Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
     */
    readOnlyNodeDistributionType?: pulumi.Input<string>;
    /**
     * The maximum delay threshold for read-only nodes. When the delay time of a read-only node exceeds this value, read traffic will not be sent to that node. The value range is 0~3600. Default value is 30 seconds.
     */
    readOnlyNodeMaxDelayTime?: pulumi.Input<number>;
    /**
     * Custom read weight allocation. This parameter needs to be set when the value of readOnlyNodeDistributionType is Custom.
     */
    readOnlyNodeWeights?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.DatabaseEndpointReadOnlyNodeWeight>[]>;
    /**
     * ReadWrite or ReadOnly.
     */
    readWriteMode?: pulumi.Input<string>;
    /**
     * The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
     */
    readWriteProxyConnection?: pulumi.Input<number>;
    /**
     * Whether to enable read-write separation. Only default endpoint supports this feature.
     */
    readWriteSplitting?: pulumi.Input<boolean>;
    /**
     * Whether to prohibit the terminal from sending write requests to the write node. To avoid having no available connection endpoints to carry write operations, this configuration can only be enabled when the instance has other read-write endpoints.
     */
    writeNodeHaltWriting?: pulumi.Input<boolean>;
}
/**
 * The set of arguments for constructing a DatabaseEndpoint resource.
 */
export interface DatabaseEndpointArgs {
    /**
     * Whether to enable public network resolution. false: Default value, Volcano Engine private network resolution. true: Volcano Engine private network and public network resolution. Do not set this field when creating a endpoint.
     */
    dnsVisibility?: pulumi.Input<boolean>;
    /**
     * Private address domain prefix to modify. Do not set this field when creating a endpoint.
     */
    domainPrefix?: pulumi.Input<string>;
    /**
     * The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
     */
    endpointId?: pulumi.Input<string>;
    /**
     * The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
     */
    endpointName: pulumi.Input<string>;
    /**
     * Type of the connection endpoint. Valid values: `Custom`(custom endpoint), `Cluster`(default endpoint). When create a new
     * endpoint, the value must be `Custom`. The default cluster endpoint does not support creation; you can use import to
     * bring it under Terraform management.
     */
    endpointType?: pulumi.Input<string>;
    /**
     * Whether to enable the global read-only mode for the instance. There is no default value. If no value is passed, the request will be ignored. Do not set this field when creating a endpoint.
     */
    globalReadOnly?: pulumi.Input<boolean>;
    /**
     * The ID of the RDS PostgreSQL instance.
     */
    instanceId: pulumi.Input<string>;
    /**
     * List of nodes configured for the connection endpoint. Required when EndpointType is Custom. The primary node does not need to pass the node ID; it is sufficient to pass the string "Primary".
     */
    nodes?: pulumi.Input<string>;
    /**
     * Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
     */
    port?: pulumi.Input<string>;
    /**
     * Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
     */
    readOnlyNodeDistributionType?: pulumi.Input<string>;
    /**
     * The maximum delay threshold for read-only nodes. When the delay time of a read-only node exceeds this value, read traffic will not be sent to that node. The value range is 0~3600. Default value is 30 seconds.
     */
    readOnlyNodeMaxDelayTime?: pulumi.Input<number>;
    /**
     * Custom read weight allocation. This parameter needs to be set when the value of readOnlyNodeDistributionType is Custom.
     */
    readOnlyNodeWeights?: pulumi.Input<pulumi.Input<inputs.rds_postgresql.DatabaseEndpointReadOnlyNodeWeight>[]>;
    /**
     * ReadWrite or ReadOnly.
     */
    readWriteMode?: pulumi.Input<string>;
    /**
     * The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
     */
    readWriteProxyConnection?: pulumi.Input<number>;
    /**
     * Whether to enable read-write separation. Only default endpoint supports this feature.
     */
    readWriteSplitting?: pulumi.Input<boolean>;
    /**
     * Whether to prohibit the terminal from sending write requests to the write node. To avoid having no available connection endpoints to carry write operations, this configuration can only be enabled when the instance has other read-write endpoints.
     */
    writeNodeHaltWriting?: pulumi.Input<boolean>;
}
