Provides a resource to manage rds postgresql database endpoint
Example Usage
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 pulumi
import pulumi_volcengine as volcengine
cluster = volcengine.rds_postgresql.DatabaseEndpoint("cluster",
endpoint_id="postgres-72715e0d9f58-cluster",
endpoint_name="默认终端",
endpoint_type="Cluster",
instance_id="postgres-72715e0d9f58",
read_only_node_distribution_type="Custom",
read_only_node_max_delay_time=40,
read_write_mode="ReadWrite",
read_write_proxy_connection=20,
write_node_halt_writing=False,
read_write_splitting=True,
read_only_node_weights=[volcengine.rds_postgresql.DatabaseEndpointReadOnlyNodeWeightArgs(
node_id=None,
node_type="Primary",
weight=200,
)],
dns_visibility=True,
port="5432")
example = volcengine.rds_postgresql.DatabaseEndpoint("example",
instance_id="postgres-72715e0d9f58",
endpoint_name="tf-test",
endpoint_type="Custom",
nodes="Primary",
read_write_mode="ReadWrite")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_postgresql"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rds_postgresql.NewDatabaseEndpoint(ctx, "cluster", &rds_postgresql.DatabaseEndpointArgs{
EndpointId: pulumi.String("postgres-72715e0d9f58-cluster"),
EndpointName: pulumi.String("默认终端"),
EndpointType: pulumi.String("Cluster"),
InstanceId: pulumi.String("postgres-72715e0d9f58"),
ReadOnlyNodeDistributionType: pulumi.String("Custom"),
ReadOnlyNodeMaxDelayTime: pulumi.Int(40),
ReadWriteMode: pulumi.String("ReadWrite"),
ReadWriteProxyConnection: pulumi.Int(20),
WriteNodeHaltWriting: pulumi.Bool(false),
ReadWriteSplitting: pulumi.Bool(true),
ReadOnlyNodeWeights: rds_postgresql.DatabaseEndpointReadOnlyNodeWeightArray{
&rds_postgresql.DatabaseEndpointReadOnlyNodeWeightArgs{
NodeId: nil,
NodeType: pulumi.String("Primary"),
Weight: pulumi.Int(200),
},
},
DnsVisibility: pulumi.Bool(true),
Port: pulumi.String("5432"),
})
if err != nil {
return err
}
_, err = rds_postgresql.NewDatabaseEndpoint(ctx, "example", &rds_postgresql.DatabaseEndpointArgs{
InstanceId: pulumi.String("postgres-72715e0d9f58"),
EndpointName: pulumi.String("tf-test"),
EndpointType: pulumi.String("Custom"),
Nodes: pulumi.String("Primary"),
ReadWriteMode: pulumi.String("ReadWrite"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var cluster = new Volcengine.Rds_postgresql.DatabaseEndpoint("cluster", new()
{
EndpointId = "postgres-72715e0d9f58-cluster",
EndpointName = "默认终端",
EndpointType = "Cluster",
InstanceId = "postgres-72715e0d9f58",
ReadOnlyNodeDistributionType = "Custom",
ReadOnlyNodeMaxDelayTime = 40,
ReadWriteMode = "ReadWrite",
ReadWriteProxyConnection = 20,
WriteNodeHaltWriting = false,
ReadWriteSplitting = true,
ReadOnlyNodeWeights = new[]
{
new Volcengine.Rds_postgresql.Inputs.DatabaseEndpointReadOnlyNodeWeightArgs
{
NodeId = null,
NodeType = "Primary",
Weight = 200,
},
},
DnsVisibility = true,
Port = "5432",
});
var example = new Volcengine.Rds_postgresql.DatabaseEndpoint("example", new()
{
InstanceId = "postgres-72715e0d9f58",
EndpointName = "tf-test",
EndpointType = "Custom",
Nodes = "Primary",
ReadWriteMode = "ReadWrite",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.rds_postgresql.DatabaseEndpoint;
import com.pulumi.volcengine.rds_postgresql.DatabaseEndpointArgs;
import com.pulumi.volcengine.rds_postgresql.inputs.DatabaseEndpointReadOnlyNodeWeightArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var cluster = new DatabaseEndpoint("cluster", DatabaseEndpointArgs.builder()
.endpointId("postgres-72715e0d9f58-cluster")
.endpointName("默认终端")
.endpointType("Cluster")
.instanceId("postgres-72715e0d9f58")
.readOnlyNodeDistributionType("Custom")
.readOnlyNodeMaxDelayTime(40)
.readWriteMode("ReadWrite")
.readWriteProxyConnection(20)
.writeNodeHaltWriting(false)
.readWriteSplitting(true)
.readOnlyNodeWeights(DatabaseEndpointReadOnlyNodeWeightArgs.builder()
.nodeId(null)
.nodeType("Primary")
.weight(200)
.build())
.dnsVisibility(true)
.port(5432)
.build());
var example = new DatabaseEndpoint("example", DatabaseEndpointArgs.builder()
.instanceId("postgres-72715e0d9f58")
.endpointName("tf-test")
.endpointType("Custom")
.nodes("Primary")
.readWriteMode("ReadWrite")
.build());
}
}
resources:
cluster:
type: volcengine:rds_postgresql:DatabaseEndpoint
properties:
endpointId: postgres-72715e0d9f58-cluster
endpointName: 默认终端
endpointType: Cluster
instanceId: postgres-72715e0d9f58
readOnlyNodeDistributionType: Custom
readOnlyNodeMaxDelayTime: 40
readWriteMode: ReadWrite
readWriteProxyConnection: 20
writeNodeHaltWriting: false
readWriteSplitting: true
readOnlyNodeWeights:
- nodeId: null
nodeType: Primary
weight: 200
dnsVisibility: true
port: 5432
example:
type: volcengine:rds_postgresql:DatabaseEndpoint
properties:
instanceId: postgres-72715e0d9f58
endpointName: tf-test
endpointType: Custom
nodes: Primary
readWriteMode: ReadWrite
Create DatabaseEndpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabaseEndpoint(name: string, args: DatabaseEndpointArgs, opts?: CustomResourceOptions);@overload
def DatabaseEndpoint(resource_name: str,
args: DatabaseEndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DatabaseEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint_name: Optional[str] = None,
instance_id: Optional[str] = None,
port: Optional[str] = None,
read_only_node_distribution_type: Optional[str] = None,
endpoint_type: Optional[str] = None,
global_read_only: Optional[bool] = None,
domain_prefix: Optional[str] = None,
nodes: Optional[str] = None,
dns_visibility: Optional[bool] = None,
endpoint_id: Optional[str] = None,
read_only_node_max_delay_time: Optional[int] = None,
read_only_node_weights: Optional[Sequence[DatabaseEndpointReadOnlyNodeWeightArgs]] = None,
read_write_mode: Optional[str] = None,
read_write_proxy_connection: Optional[int] = None,
read_write_splitting: Optional[bool] = None,
write_node_halt_writing: Optional[bool] = None)func NewDatabaseEndpoint(ctx *Context, name string, args DatabaseEndpointArgs, opts ...ResourceOption) (*DatabaseEndpoint, error)public DatabaseEndpoint(string name, DatabaseEndpointArgs args, CustomResourceOptions? opts = null)
public DatabaseEndpoint(String name, DatabaseEndpointArgs args)
public DatabaseEndpoint(String name, DatabaseEndpointArgs args, CustomResourceOptions options)
type: volcengine:rds_postgresql:DatabaseEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatabaseEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DatabaseEndpointArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabaseEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseEndpointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var databaseEndpointResource = new Volcengine.Rds_postgresql.DatabaseEndpoint("databaseEndpointResource", new()
{
EndpointName = "string",
InstanceId = "string",
Port = "string",
ReadOnlyNodeDistributionType = "string",
EndpointType = "string",
GlobalReadOnly = false,
DomainPrefix = "string",
Nodes = "string",
DnsVisibility = false,
EndpointId = "string",
ReadOnlyNodeMaxDelayTime = 0,
ReadOnlyNodeWeights = new[]
{
new Volcengine.Rds_postgresql.Inputs.DatabaseEndpointReadOnlyNodeWeightArgs
{
NodeId = "string",
NodeType = "string",
Weight = 0,
},
},
ReadWriteMode = "string",
ReadWriteProxyConnection = 0,
ReadWriteSplitting = false,
WriteNodeHaltWriting = false,
});
example, err := rds_postgresql.NewDatabaseEndpoint(ctx, "databaseEndpointResource", &rds_postgresql.DatabaseEndpointArgs{
EndpointName: pulumi.String("string"),
InstanceId: pulumi.String("string"),
Port: pulumi.String("string"),
ReadOnlyNodeDistributionType: pulumi.String("string"),
EndpointType: pulumi.String("string"),
GlobalReadOnly: pulumi.Bool(false),
DomainPrefix: pulumi.String("string"),
Nodes: pulumi.String("string"),
DnsVisibility: pulumi.Bool(false),
EndpointId: pulumi.String("string"),
ReadOnlyNodeMaxDelayTime: pulumi.Int(0),
ReadOnlyNodeWeights: rds_postgresql.DatabaseEndpointReadOnlyNodeWeightArray{
&rds_postgresql.DatabaseEndpointReadOnlyNodeWeightArgs{
NodeId: pulumi.String("string"),
NodeType: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
ReadWriteMode: pulumi.String("string"),
ReadWriteProxyConnection: pulumi.Int(0),
ReadWriteSplitting: pulumi.Bool(false),
WriteNodeHaltWriting: pulumi.Bool(false),
})
var databaseEndpointResource = new DatabaseEndpoint("databaseEndpointResource", DatabaseEndpointArgs.builder()
.endpointName("string")
.instanceId("string")
.port("string")
.readOnlyNodeDistributionType("string")
.endpointType("string")
.globalReadOnly(false)
.domainPrefix("string")
.nodes("string")
.dnsVisibility(false)
.endpointId("string")
.readOnlyNodeMaxDelayTime(0)
.readOnlyNodeWeights(DatabaseEndpointReadOnlyNodeWeightArgs.builder()
.nodeId("string")
.nodeType("string")
.weight(0)
.build())
.readWriteMode("string")
.readWriteProxyConnection(0)
.readWriteSplitting(false)
.writeNodeHaltWriting(false)
.build());
database_endpoint_resource = volcengine.rds_postgresql.DatabaseEndpoint("databaseEndpointResource",
endpoint_name="string",
instance_id="string",
port="string",
read_only_node_distribution_type="string",
endpoint_type="string",
global_read_only=False,
domain_prefix="string",
nodes="string",
dns_visibility=False,
endpoint_id="string",
read_only_node_max_delay_time=0,
read_only_node_weights=[{
"node_id": "string",
"node_type": "string",
"weight": 0,
}],
read_write_mode="string",
read_write_proxy_connection=0,
read_write_splitting=False,
write_node_halt_writing=False)
const databaseEndpointResource = new volcengine.rds_postgresql.DatabaseEndpoint("databaseEndpointResource", {
endpointName: "string",
instanceId: "string",
port: "string",
readOnlyNodeDistributionType: "string",
endpointType: "string",
globalReadOnly: false,
domainPrefix: "string",
nodes: "string",
dnsVisibility: false,
endpointId: "string",
readOnlyNodeMaxDelayTime: 0,
readOnlyNodeWeights: [{
nodeId: "string",
nodeType: "string",
weight: 0,
}],
readWriteMode: "string",
readWriteProxyConnection: 0,
readWriteSplitting: false,
writeNodeHaltWriting: false,
});
type: volcengine:rds_postgresql:DatabaseEndpoint
properties:
dnsVisibility: false
domainPrefix: string
endpointId: string
endpointName: string
endpointType: string
globalReadOnly: false
instanceId: string
nodes: string
port: string
readOnlyNodeDistributionType: string
readOnlyNodeMaxDelayTime: 0
readOnlyNodeWeights:
- nodeId: string
nodeType: string
weight: 0
readWriteMode: string
readWriteProxyConnection: 0
readWriteSplitting: false
writeNodeHaltWriting: false
DatabaseEndpoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DatabaseEndpoint resource accepts the following input properties:
- Endpoint
Name string - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- Instance
Id string - The ID of the RDS PostgreSQL instance.
- Dns
Visibility bool - 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.
- Domain
Prefix string - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- Endpoint
Id string - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- Endpoint
Type string - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - Global
Read boolOnly - 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.
- Nodes 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".
- Port string
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- Read
Only stringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- Read
Only intNode Max Delay Time - 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.
- Read
Only List<DatabaseNode Weights Endpoint Read Only Node Weight> - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- Read
Write stringMode - ReadWrite or ReadOnly.
- Read
Write intProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- Read
Write boolSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- Write
Node boolHalt Writing - 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.
- Endpoint
Name string - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- Instance
Id string - The ID of the RDS PostgreSQL instance.
- Dns
Visibility bool - 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.
- Domain
Prefix string - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- Endpoint
Id string - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- Endpoint
Type string - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - Global
Read boolOnly - 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.
- Nodes 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".
- Port string
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- Read
Only stringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- Read
Only intNode Max Delay Time - 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.
- Read
Only []DatabaseNode Weights Endpoint Read Only Node Weight Args - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- Read
Write stringMode - ReadWrite or ReadOnly.
- Read
Write intProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- Read
Write boolSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- Write
Node boolHalt Writing - 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.
- endpoint
Name String - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- instance
Id String - The ID of the RDS PostgreSQL instance.
- dns
Visibility Boolean - 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.
- domain
Prefix String - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint
Id String - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint
Type String - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global
Read BooleanOnly - 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.
- nodes 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".
- port String
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read
Only StringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read
Only IntegerNode Max Delay Time - 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.
- read
Only List<DatabaseNode Weights Endpoint Read Only Node Weight> - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read
Write StringMode - ReadWrite or ReadOnly.
- read
Write IntegerProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read
Write BooleanSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write
Node BooleanHalt Writing - 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.
- endpoint
Name string - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- instance
Id string - The ID of the RDS PostgreSQL instance.
- dns
Visibility boolean - 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.
- domain
Prefix string - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint
Id string - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint
Type string - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global
Read booleanOnly - 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.
- nodes 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".
- port string
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read
Only stringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read
Only numberNode Max Delay Time - 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.
- read
Only DatabaseNode Weights Endpoint Read Only Node Weight[] - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read
Write stringMode - ReadWrite or ReadOnly.
- read
Write numberProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read
Write booleanSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write
Node booleanHalt Writing - 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.
- endpoint_
name str - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- instance_
id str - The ID of the RDS PostgreSQL instance.
- dns_
visibility bool - 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.
- domain_
prefix str - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint_
id str - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint_
type str - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global_
read_ boolonly - 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.
- nodes str
- 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".
- port str
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read_
only_ strnode_ distribution_ type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read_
only_ intnode_ max_ delay_ time - 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.
- read_
only_ Sequence[Databasenode_ weights Endpoint Read Only Node Weight Args] - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read_
write_ strmode - ReadWrite or ReadOnly.
- read_
write_ intproxy_ connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read_
write_ boolsplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write_
node_ boolhalt_ writing - 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.
- endpoint
Name String - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- instance
Id String - The ID of the RDS PostgreSQL instance.
- dns
Visibility Boolean - 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.
- domain
Prefix String - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint
Id String - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint
Type String - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global
Read BooleanOnly - 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.
- nodes 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".
- port String
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read
Only StringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read
Only NumberNode Max Delay Time - 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.
- read
Only List<Property Map>Node Weights - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read
Write StringMode - ReadWrite or ReadOnly.
- read
Write NumberProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read
Write BooleanSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write
Node BooleanHalt Writing - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseEndpoint resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DatabaseEndpoint Resource
Get an existing DatabaseEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DatabaseEndpointState, opts?: CustomResourceOptions): DatabaseEndpoint@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dns_visibility: Optional[bool] = None,
domain_prefix: Optional[str] = None,
endpoint_id: Optional[str] = None,
endpoint_name: Optional[str] = None,
endpoint_type: Optional[str] = None,
global_read_only: Optional[bool] = None,
instance_id: Optional[str] = None,
nodes: Optional[str] = None,
port: Optional[str] = None,
read_only_node_distribution_type: Optional[str] = None,
read_only_node_max_delay_time: Optional[int] = None,
read_only_node_weights: Optional[Sequence[DatabaseEndpointReadOnlyNodeWeightArgs]] = None,
read_write_mode: Optional[str] = None,
read_write_proxy_connection: Optional[int] = None,
read_write_splitting: Optional[bool] = None,
write_node_halt_writing: Optional[bool] = None) -> DatabaseEndpointfunc GetDatabaseEndpoint(ctx *Context, name string, id IDInput, state *DatabaseEndpointState, opts ...ResourceOption) (*DatabaseEndpoint, error)public static DatabaseEndpoint Get(string name, Input<string> id, DatabaseEndpointState? state, CustomResourceOptions? opts = null)public static DatabaseEndpoint get(String name, Output<String> id, DatabaseEndpointState state, CustomResourceOptions options)resources: _: type: volcengine:rds_postgresql:DatabaseEndpoint get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dns
Visibility bool - 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.
- Domain
Prefix string - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- Endpoint
Id string - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- Endpoint
Name string - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- Endpoint
Type string - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - Global
Read boolOnly - 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.
- Instance
Id string - The ID of the RDS PostgreSQL instance.
- Nodes 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".
- Port string
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- Read
Only stringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- Read
Only intNode Max Delay Time - 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.
- Read
Only List<DatabaseNode Weights Endpoint Read Only Node Weight> - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- Read
Write stringMode - ReadWrite or ReadOnly.
- Read
Write intProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- Read
Write boolSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- Write
Node boolHalt Writing - 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.
- Dns
Visibility bool - 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.
- Domain
Prefix string - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- Endpoint
Id string - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- Endpoint
Name string - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- Endpoint
Type string - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - Global
Read boolOnly - 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.
- Instance
Id string - The ID of the RDS PostgreSQL instance.
- Nodes 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".
- Port string
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- Read
Only stringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- Read
Only intNode Max Delay Time - 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.
- Read
Only []DatabaseNode Weights Endpoint Read Only Node Weight Args - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- Read
Write stringMode - ReadWrite or ReadOnly.
- Read
Write intProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- Read
Write boolSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- Write
Node boolHalt Writing - 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.
- dns
Visibility Boolean - 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.
- domain
Prefix String - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint
Id String - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint
Name String - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- endpoint
Type String - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global
Read BooleanOnly - 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.
- instance
Id String - The ID of the RDS PostgreSQL instance.
- nodes 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".
- port String
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read
Only StringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read
Only IntegerNode Max Delay Time - 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.
- read
Only List<DatabaseNode Weights Endpoint Read Only Node Weight> - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read
Write StringMode - ReadWrite or ReadOnly.
- read
Write IntegerProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read
Write BooleanSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write
Node BooleanHalt Writing - 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.
- dns
Visibility boolean - 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.
- domain
Prefix string - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint
Id string - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint
Name string - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- endpoint
Type string - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global
Read booleanOnly - 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.
- instance
Id string - The ID of the RDS PostgreSQL instance.
- nodes 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".
- port string
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read
Only stringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read
Only numberNode Max Delay Time - 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.
- read
Only DatabaseNode Weights Endpoint Read Only Node Weight[] - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read
Write stringMode - ReadWrite or ReadOnly.
- read
Write numberProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read
Write booleanSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write
Node booleanHalt Writing - 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.
- dns_
visibility bool - 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.
- domain_
prefix str - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint_
id str - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint_
name str - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- endpoint_
type str - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global_
read_ boolonly - 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.
- instance_
id str - The ID of the RDS PostgreSQL instance.
- nodes str
- 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".
- port str
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read_
only_ strnode_ distribution_ type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read_
only_ intnode_ max_ delay_ time - 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.
- read_
only_ Sequence[Databasenode_ weights Endpoint Read Only Node Weight Args] - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read_
write_ strmode - ReadWrite or ReadOnly.
- read_
write_ intproxy_ connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read_
write_ boolsplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write_
node_ boolhalt_ writing - 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.
- dns
Visibility Boolean - 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.
- domain
Prefix String - Private address domain prefix to modify. Do not set this field when creating a endpoint.
- endpoint
Id String - The ID of the connection endpoint. The ID of the default endpoint is in the form of instance_id-cluster.
- endpoint
Name String - The name of the connection endpoint. If not provided, the connection endpoint will be automatically named Custom Endpoint.
- endpoint
Type String - Type of the connection endpoint. Valid values:
Custom(custom endpoint),Cluster(default endpoint). When create a new endpoint, the value must beCustom. The default cluster endpoint does not support creation; you can use import to bring it under Terraform management. - global
Read BooleanOnly - 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.
- instance
Id String - The ID of the RDS PostgreSQL instance.
- nodes 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".
- port String
- Private address port to modify. The value range is 1000~65534. Do not set this field when creating a endpoint.
- read
Only StringNode Distribution Type - Read-only weight distribution mode, Default or Custom. Default: Standard weight allocation. Custom: Custom weight allocation.
- read
Only NumberNode Max Delay Time - 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.
- read
Only List<Property Map>Node Weights - Custom read weight allocation. This parameter needs to be set when the value of read_only_node_distribution_type is Custom.
- read
Write StringMode - ReadWrite or ReadOnly.
- read
Write NumberProxy Connection - The number of proxy connections set for the terminal after enabling read-write separation. The minimum value of the proxy connection count is 20.
- read
Write BooleanSplitting - Whether to enable read-write separation. Only default endpoint supports this feature.
- write
Node BooleanHalt Writing - 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.
Supporting Types
DatabaseEndpointReadOnlyNodeWeight, DatabaseEndpointReadOnlyNodeWeightArgs
Import
RdsPostgresqlDatabaseEndpoint can be imported using the id, e.g.
$ pulumi import volcengine:rds_postgresql/databaseEndpoint:DatabaseEndpoint default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
