volcengine.rds_mysql.Endpoint
Explore with Pulumi AI
Provides a resource to manage rds mysql endpoint
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.rds_mysql.Endpoint("foo", {
autoAddNewNodes: true,
description: "tf-test-1",
domain: "mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com",
endpointName: "tf-test-1",
instanceId: "mysql-38c3d4f05f6e",
nodes: [
"Primary",
"mysql-38c3d4f05f6e-r3b0d",
],
port: 3306,
readOnlyNodeDistributionType: "Custom",
readOnlyNodeMaxDelayTime: 30,
readOnlyNodeWeights: [
{
nodeId: "mysql-38c3d4f05f6e-r3b0d",
nodeType: "ReadOnly",
weight: 0,
},
{
nodeType: "Primary",
weight: 100,
},
],
readWriteMode: "ReadWrite",
readWriteSpliting: true,
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.rds_mysql.Endpoint("foo",
auto_add_new_nodes=True,
description="tf-test-1",
domain="mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com",
endpoint_name="tf-test-1",
instance_id="mysql-38c3d4f05f6e",
nodes=[
"Primary",
"mysql-38c3d4f05f6e-r3b0d",
],
port=3306,
read_only_node_distribution_type="Custom",
read_only_node_max_delay_time=30,
read_only_node_weights=[
volcengine.rds_mysql.EndpointReadOnlyNodeWeightArgs(
node_id="mysql-38c3d4f05f6e-r3b0d",
node_type="ReadOnly",
weight=0,
),
volcengine.rds_mysql.EndpointReadOnlyNodeWeightArgs(
node_type="Primary",
weight=100,
),
],
read_write_mode="ReadWrite",
read_write_spliting=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_mysql"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rds_mysql.NewEndpoint(ctx, "foo", &rds_mysql.EndpointArgs{
AutoAddNewNodes: pulumi.Bool(true),
Description: pulumi.String("tf-test-1"),
Domain: pulumi.String("mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com"),
EndpointName: pulumi.String("tf-test-1"),
InstanceId: pulumi.String("mysql-38c3d4f05f6e"),
Nodes: pulumi.StringArray{
pulumi.String("Primary"),
pulumi.String("mysql-38c3d4f05f6e-r3b0d"),
},
Port: pulumi.Int(3306),
ReadOnlyNodeDistributionType: pulumi.String("Custom"),
ReadOnlyNodeMaxDelayTime: pulumi.Int(30),
ReadOnlyNodeWeights: rds_mysql.EndpointReadOnlyNodeWeightArray{
&rds_mysql.EndpointReadOnlyNodeWeightArgs{
NodeId: pulumi.String("mysql-38c3d4f05f6e-r3b0d"),
NodeType: pulumi.String("ReadOnly"),
Weight: pulumi.Int(0),
},
&rds_mysql.EndpointReadOnlyNodeWeightArgs{
NodeType: pulumi.String("Primary"),
Weight: pulumi.Int(100),
},
},
ReadWriteMode: pulumi.String("ReadWrite"),
ReadWriteSpliting: pulumi.Bool(true),
})
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 foo = new Volcengine.Rds_mysql.Endpoint("foo", new()
{
AutoAddNewNodes = true,
Description = "tf-test-1",
Domain = "mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com",
EndpointName = "tf-test-1",
InstanceId = "mysql-38c3d4f05f6e",
Nodes = new[]
{
"Primary",
"mysql-38c3d4f05f6e-r3b0d",
},
Port = 3306,
ReadOnlyNodeDistributionType = "Custom",
ReadOnlyNodeMaxDelayTime = 30,
ReadOnlyNodeWeights = new[]
{
new Volcengine.Rds_mysql.Inputs.EndpointReadOnlyNodeWeightArgs
{
NodeId = "mysql-38c3d4f05f6e-r3b0d",
NodeType = "ReadOnly",
Weight = 0,
},
new Volcengine.Rds_mysql.Inputs.EndpointReadOnlyNodeWeightArgs
{
NodeType = "Primary",
Weight = 100,
},
},
ReadWriteMode = "ReadWrite",
ReadWriteSpliting = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.rds_mysql.Endpoint;
import com.pulumi.volcengine.rds_mysql.EndpointArgs;
import com.pulumi.volcengine.rds_mysql.inputs.EndpointReadOnlyNodeWeightArgs;
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 foo = new Endpoint("foo", EndpointArgs.builder()
.autoAddNewNodes(true)
.description("tf-test-1")
.domain("mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com")
.endpointName("tf-test-1")
.instanceId("mysql-38c3d4f05f6e")
.nodes(
"Primary",
"mysql-38c3d4f05f6e-r3b0d")
.port("3306")
.readOnlyNodeDistributionType("Custom")
.readOnlyNodeMaxDelayTime(30)
.readOnlyNodeWeights(
EndpointReadOnlyNodeWeightArgs.builder()
.nodeId("mysql-38c3d4f05f6e-r3b0d")
.nodeType("ReadOnly")
.weight(0)
.build(),
EndpointReadOnlyNodeWeightArgs.builder()
.nodeType("Primary")
.weight(100)
.build())
.readWriteMode("ReadWrite")
.readWriteSpliting(true)
.build());
}
}
resources:
foo:
type: volcengine:rds_mysql:Endpoint
properties:
autoAddNewNodes: true
description: tf-test-1
domain: mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com
endpointName: tf-test-1
instanceId: mysql-38c3d4f05f6e
nodes:
- Primary
- mysql-38c3d4f05f6e-r3b0d
port: '3306'
readOnlyNodeDistributionType: Custom
readOnlyNodeMaxDelayTime: 30
readOnlyNodeWeights:
- nodeId: mysql-38c3d4f05f6e-r3b0d
nodeType: ReadOnly
weight: 0
- nodeType: Primary
weight: 100
readWriteMode: ReadWrite
readWriteSpliting: true
Create Endpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Endpoint(name: string, args: EndpointArgs, opts?: CustomResourceOptions);
@overload
def Endpoint(resource_name: str,
args: EndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Endpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
nodes: Optional[Sequence[str]] = None,
endpoint_id: Optional[str] = None,
auto_add_new_nodes: Optional[bool] = None,
endpoint_name: Optional[str] = None,
domain: Optional[str] = None,
description: Optional[str] = None,
port: Optional[int] = None,
read_only_node_distribution_type: Optional[str] = None,
read_only_node_max_delay_time: Optional[int] = None,
read_only_node_weights: Optional[Sequence[EndpointReadOnlyNodeWeightArgs]] = None,
read_write_mode: Optional[str] = None,
read_write_spliting: Optional[bool] = None)
func NewEndpoint(ctx *Context, name string, args EndpointArgs, opts ...ResourceOption) (*Endpoint, error)
public Endpoint(string name, EndpointArgs args, CustomResourceOptions? opts = null)
public Endpoint(String name, EndpointArgs args)
public Endpoint(String name, EndpointArgs args, CustomResourceOptions options)
type: volcengine:rds_mysql:Endpoint
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 EndpointArgs
- 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 EndpointArgs
- 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 EndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EndpointArgs
- 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 exampleendpointResourceResourceFromRds_mysqlendpoint = new Volcengine.Rds_mysql.Endpoint("exampleendpointResourceResourceFromRds_mysqlendpoint", new()
{
InstanceId = "string",
Nodes = new[]
{
"string",
},
EndpointId = "string",
AutoAddNewNodes = false,
EndpointName = "string",
Domain = "string",
Description = "string",
Port = 0,
ReadOnlyNodeDistributionType = "string",
ReadOnlyNodeMaxDelayTime = 0,
ReadOnlyNodeWeights = new[]
{
new Volcengine.Rds_mysql.Inputs.EndpointReadOnlyNodeWeightArgs
{
Weight = 0,
NodeId = "string",
NodeType = "string",
},
},
ReadWriteMode = "string",
ReadWriteSpliting = false,
});
example, err := rds_mysql.NewEndpoint(ctx, "exampleendpointResourceResourceFromRds_mysqlendpoint", &rds_mysql.EndpointArgs{
InstanceId: pulumi.String("string"),
Nodes: pulumi.StringArray{
pulumi.String("string"),
},
EndpointId: pulumi.String("string"),
AutoAddNewNodes: pulumi.Bool(false),
EndpointName: pulumi.String("string"),
Domain: pulumi.String("string"),
Description: pulumi.String("string"),
Port: pulumi.Int(0),
ReadOnlyNodeDistributionType: pulumi.String("string"),
ReadOnlyNodeMaxDelayTime: pulumi.Int(0),
ReadOnlyNodeWeights: rds_mysql.EndpointReadOnlyNodeWeightArray{
&rds_mysql.EndpointReadOnlyNodeWeightArgs{
Weight: pulumi.Int(0),
NodeId: pulumi.String("string"),
NodeType: pulumi.String("string"),
},
},
ReadWriteMode: pulumi.String("string"),
ReadWriteSpliting: pulumi.Bool(false),
})
var exampleendpointResourceResourceFromRds_mysqlendpoint = new com.pulumi.volcengine.rds_mysql.Endpoint("exampleendpointResourceResourceFromRds_mysqlendpoint", com.pulumi.volcengine.rds_mysql.EndpointArgs.builder()
.instanceId("string")
.nodes("string")
.endpointId("string")
.autoAddNewNodes(false)
.endpointName("string")
.domain("string")
.description("string")
.port(0)
.readOnlyNodeDistributionType("string")
.readOnlyNodeMaxDelayTime(0)
.readOnlyNodeWeights(EndpointReadOnlyNodeWeightArgs.builder()
.weight(0)
.nodeId("string")
.nodeType("string")
.build())
.readWriteMode("string")
.readWriteSpliting(false)
.build());
exampleendpoint_resource_resource_from_rds_mysqlendpoint = volcengine.rds_mysql.Endpoint("exampleendpointResourceResourceFromRds_mysqlendpoint",
instance_id="string",
nodes=["string"],
endpoint_id="string",
auto_add_new_nodes=False,
endpoint_name="string",
domain="string",
description="string",
port=0,
read_only_node_distribution_type="string",
read_only_node_max_delay_time=0,
read_only_node_weights=[{
"weight": 0,
"node_id": "string",
"node_type": "string",
}],
read_write_mode="string",
read_write_spliting=False)
const exampleendpointResourceResourceFromRds_mysqlendpoint = new volcengine.rds_mysql.Endpoint("exampleendpointResourceResourceFromRds_mysqlendpoint", {
instanceId: "string",
nodes: ["string"],
endpointId: "string",
autoAddNewNodes: false,
endpointName: "string",
domain: "string",
description: "string",
port: 0,
readOnlyNodeDistributionType: "string",
readOnlyNodeMaxDelayTime: 0,
readOnlyNodeWeights: [{
weight: 0,
nodeId: "string",
nodeType: "string",
}],
readWriteMode: "string",
readWriteSpliting: false,
});
type: volcengine:rds_mysql:Endpoint
properties:
autoAddNewNodes: false
description: string
domain: string
endpointId: string
endpointName: string
instanceId: string
nodes:
- string
port: 0
readOnlyNodeDistributionType: string
readOnlyNodeMaxDelayTime: 0
readOnlyNodeWeights:
- nodeId: string
nodeType: string
weight: 0
readWriteMode: string
readWriteSpliting: false
Endpoint 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 Endpoint resource accepts the following input properties:
- Instance
Id string - The id of the mysql instance.
- Nodes List<string>
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - Auto
Add boolNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- Description string
- The description of the endpoint.
- Domain string
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Endpoint
Id string - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- Endpoint
Name string - The name of the endpoint.
- Port int
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Read
Only stringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- Read
Only List<EndpointNode Weights Read Only Node Weight> - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- Read
Write stringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- Read
Write boolSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- Instance
Id string - The id of the mysql instance.
- Nodes []string
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - Auto
Add boolNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- Description string
- The description of the endpoint.
- Domain string
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Endpoint
Id string - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- Endpoint
Name string - The name of the endpoint.
- Port int
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Read
Only stringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- Read
Only []EndpointNode Weights Read Only Node Weight Args - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- Read
Write stringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- Read
Write boolSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- instance
Id String - The id of the mysql instance.
- nodes List<String>
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - auto
Add BooleanNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description String
- The description of the endpoint.
- domain String
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint
Id String - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint
Name String - The name of the endpoint.
- port Integer
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read
Only StringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read
Only List<EndpointNode Weights Read Only Node Weight> - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read
Write StringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read
Write BooleanSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- instance
Id string - The id of the mysql instance.
- nodes string[]
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - auto
Add booleanNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description string
- The description of the endpoint.
- domain string
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint
Id string - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint
Name string - The name of the endpoint.
- port number
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read
Only stringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read
Only EndpointNode Weights Read Only Node Weight[] - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read
Write stringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read
Write booleanSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- instance_
id str - The id of the mysql instance.
- nodes Sequence[str]
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - auto_
add_ boolnew_ nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description str
- The description of the endpoint.
- domain str
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint_
id str - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint_
name str - The name of the endpoint.
- port int
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read_
only_ strnode_ distribution_ type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read_
only_ Sequence[Endpointnode_ weights Read Only Node Weight Args] - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read_
write_ strmode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read_
write_ boolspliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- instance
Id String - The id of the mysql instance.
- nodes List<String>
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - auto
Add BooleanNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description String
- The description of the endpoint.
- domain String
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint
Id String - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint
Name String - The name of the endpoint.
- port Number
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read
Only StringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read
Only List<Property Map>Node Weights - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read
Write StringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read
Write BooleanSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
Outputs
All input properties are implicitly available as output properties. Additionally, the Endpoint 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 Endpoint Resource
Get an existing Endpoint 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?: EndpointState, opts?: CustomResourceOptions): Endpoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_add_new_nodes: Optional[bool] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
endpoint_id: Optional[str] = None,
endpoint_name: Optional[str] = None,
instance_id: Optional[str] = None,
nodes: Optional[Sequence[str]] = None,
port: Optional[int] = None,
read_only_node_distribution_type: Optional[str] = None,
read_only_node_max_delay_time: Optional[int] = None,
read_only_node_weights: Optional[Sequence[EndpointReadOnlyNodeWeightArgs]] = None,
read_write_mode: Optional[str] = None,
read_write_spliting: Optional[bool] = None) -> Endpoint
func GetEndpoint(ctx *Context, name string, id IDInput, state *EndpointState, opts ...ResourceOption) (*Endpoint, error)
public static Endpoint Get(string name, Input<string> id, EndpointState? state, CustomResourceOptions? opts = null)
public static Endpoint get(String name, Output<String> id, EndpointState state, CustomResourceOptions options)
resources: _: type: volcengine:rds_mysql:Endpoint 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.
- Auto
Add boolNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- Description string
- The description of the endpoint.
- Domain string
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Endpoint
Id string - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- Endpoint
Name string - The name of the endpoint.
- Instance
Id string - The id of the mysql instance.
- Nodes List<string>
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - Port int
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Read
Only stringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- Read
Only List<EndpointNode Weights Read Only Node Weight> - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- Read
Write stringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- Read
Write boolSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- Auto
Add boolNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- Description string
- The description of the endpoint.
- Domain string
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Endpoint
Id string - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- Endpoint
Name string - The name of the endpoint.
- Instance
Id string - The id of the mysql instance.
- Nodes []string
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - Port int
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- Read
Only stringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- Read
Only []EndpointNode Weights Read Only Node Weight Args - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- Read
Write stringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- Read
Write boolSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- auto
Add BooleanNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description String
- The description of the endpoint.
- domain String
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint
Id String - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint
Name String - The name of the endpoint.
- instance
Id String - The id of the mysql instance.
- nodes List<String>
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - port Integer
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read
Only StringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read
Only List<EndpointNode Weights Read Only Node Weight> - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read
Write StringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read
Write BooleanSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- auto
Add booleanNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description string
- The description of the endpoint.
- domain string
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint
Id string - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint
Name string - The name of the endpoint.
- instance
Id string - The id of the mysql instance.
- nodes string[]
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - port number
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read
Only stringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read
Only EndpointNode Weights Read Only Node Weight[] - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read
Write stringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read
Write booleanSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- auto_
add_ boolnew_ nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description str
- The description of the endpoint.
- domain str
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint_
id str - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint_
name str - The name of the endpoint.
- instance_
id str - The id of the mysql instance.
- nodes Sequence[str]
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - port int
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read_
only_ strnode_ distribution_ type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read_
only_ Sequence[Endpointnode_ weights Read Only Node Weight Args] - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read_
write_ strmode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read_
write_ boolspliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
- auto
Add BooleanNew Nodes - When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are: true: Automatically add. false: Do not automatically add (default).
- description String
- The description of the endpoint.
- domain String
- Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- endpoint
Id String - The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
- endpoint
Name String - The name of the endpoint.
- instance
Id String - The id of the mysql instance.
- nodes List<String>
- List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in
Primary
. - port Number
- The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
- read
Only StringNode Distribution Type - Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values: Default: Automatically allocate weights based on specifications (default). 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, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
- read
Only List<Property Map>Node Weights - Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
- read
Write StringMode - Reading and writing mode: ReadWrite, ReadOnly(Default).
- read
Write BooleanSpliting - Enable read-write separation. Possible values: TRUE, FALSE. This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
Supporting Types
EndpointReadOnlyNodeWeight, EndpointReadOnlyNodeWeightArgs
- Weight int
- The read weight of the node increases by 100, with a maximum value of 10000.
- Node
Id string - Read-only nodes require NodeId to be passed, while primary nodes do not require it.
- Node
Type string - The primary node needs to pass in the NodeType as Primary, while the read-only node does not need to pass it in.
- Weight int
- The read weight of the node increases by 100, with a maximum value of 10000.
- Node
Id string - Read-only nodes require NodeId to be passed, while primary nodes do not require it.
- Node
Type string - The primary node needs to pass in the NodeType as Primary, while the read-only node does not need to pass it in.
- weight Integer
- The read weight of the node increases by 100, with a maximum value of 10000.
- node
Id String - Read-only nodes require NodeId to be passed, while primary nodes do not require it.
- node
Type String - The primary node needs to pass in the NodeType as Primary, while the read-only node does not need to pass it in.
- weight number
- The read weight of the node increases by 100, with a maximum value of 10000.
- node
Id string - Read-only nodes require NodeId to be passed, while primary nodes do not require it.
- node
Type string - The primary node needs to pass in the NodeType as Primary, while the read-only node does not need to pass it in.
- weight int
- The read weight of the node increases by 100, with a maximum value of 10000.
- node_
id str - Read-only nodes require NodeId to be passed, while primary nodes do not require it.
- node_
type str - The primary node needs to pass in the NodeType as Primary, while the read-only node does not need to pass it in.
- weight Number
- The read weight of the node increases by 100, with a maximum value of 10000.
- node
Id String - Read-only nodes require NodeId to be passed, while primary nodes do not require it.
- node
Type String - The primary node needs to pass in the NodeType as Primary, while the read-only node does not need to pass it in.
Import
RdsMysqlEndpoint can be imported using the instance id and endpoint id, e.g.
$ pulumi import volcengine:rds_mysql/endpoint:Endpoint default mysql-3c25f219***:mysql-3c25f219****-custom-eeb5
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
volcengine
Terraform Provider.