1. Packages
  2. Volcengine
  3. API Docs
  4. vedb_mysql
  5. Endpoint
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.vedb_mysql.Endpoint

Explore with Pulumi AI

Provides a resource to manage vedb mysql endpoint

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";

const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
    vpcName: "acc-test-vpc",
    cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
    subnetName: "acc-test-subnet",
    cidrBlock: "172.16.0.0/24",
    zoneId: fooZones.then(fooZones => fooZones.zones?.[2]?.id),
    vpcId: fooVpc.id,
});
const fooInstance = new volcengine.vedb_mysql.Instance("fooInstance", {
    chargeType: "PostPaid",
    storageChargeType: "PostPaid",
    dbEngineVersion: "MySQL_8_0",
    dbMinorVersion: "3.0",
    nodeNumber: 2,
    nodeSpec: "vedb.mysql.x4.large",
    subnetId: fooSubnet.id,
    instanceName: "tf-test",
    projectName: "testA",
    tags: [
        {
            key: "tftest",
            value: "tftest",
        },
        {
            key: "tftest2",
            value: "tftest2",
        },
    ],
});
const fooInstances = volcengine.vedb_mysql.InstancesOutput({
    instanceId: fooInstance.id,
});
const fooEndpoint = new volcengine.vedb_mysql.Endpoint("fooEndpoint", {
    endpointType: "Custom",
    instanceId: fooInstance.id,
    nodeIds: [
        fooInstances.apply(fooInstances => fooInstances.instances?.[0]?.nodes?.[0]?.nodeId),
        fooInstances.apply(fooInstances => fooInstances.instances?.[0]?.nodes?.[1]?.nodeId),
    ],
    readWriteMode: "ReadWrite",
    endpointName: "tf-test",
    description: "tf test",
    masterAcceptReadRequests: true,
    distributedTransaction: true,
    consistLevel: "Session",
    consistTimeout: 100000,
    consistTimeoutAction: "ReadMaster",
});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
    vpc_name="acc-test-vpc",
    cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
    subnet_name="acc-test-subnet",
    cidr_block="172.16.0.0/24",
    zone_id=foo_zones.zones[2].id,
    vpc_id=foo_vpc.id)
foo_instance = volcengine.vedb_mysql.Instance("fooInstance",
    charge_type="PostPaid",
    storage_charge_type="PostPaid",
    db_engine_version="MySQL_8_0",
    db_minor_version="3.0",
    node_number=2,
    node_spec="vedb.mysql.x4.large",
    subnet_id=foo_subnet.id,
    instance_name="tf-test",
    project_name="testA",
    tags=[
        volcengine.vedb_mysql.InstanceTagArgs(
            key="tftest",
            value="tftest",
        ),
        volcengine.vedb_mysql.InstanceTagArgs(
            key="tftest2",
            value="tftest2",
        ),
    ])
foo_instances = volcengine.vedb_mysql.instances_output(instance_id=foo_instance.id)
foo_endpoint = volcengine.vedb_mysql.Endpoint("fooEndpoint",
    endpoint_type="Custom",
    instance_id=foo_instance.id,
    node_ids=[
        foo_instances.instances[0].nodes[0].node_id,
        foo_instances.instances[0].nodes[1].node_id,
    ],
    read_write_mode="ReadWrite",
    endpoint_name="tf-test",
    description="tf test",
    master_accept_read_requests=True,
    distributed_transaction=True,
    consist_level="Session",
    consist_timeout=100000,
    consist_timeout_action="ReadMaster")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vedb_mysql"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooZones, err := ecs.Zones(ctx, nil, nil)
		if err != nil {
			return err
		}
		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
			VpcName:   pulumi.String("acc-test-vpc"),
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
			SubnetName: pulumi.String("acc-test-subnet"),
			CidrBlock:  pulumi.String("172.16.0.0/24"),
			ZoneId:     pulumi.String(fooZones.Zones[2].Id),
			VpcId:      fooVpc.ID(),
		})
		if err != nil {
			return err
		}
		fooInstance, err := vedb_mysql.NewInstance(ctx, "fooInstance", &vedb_mysql.InstanceArgs{
			ChargeType:        pulumi.String("PostPaid"),
			StorageChargeType: pulumi.String("PostPaid"),
			DbEngineVersion:   pulumi.String("MySQL_8_0"),
			DbMinorVersion:    pulumi.String("3.0"),
			NodeNumber:        pulumi.Int(2),
			NodeSpec:          pulumi.String("vedb.mysql.x4.large"),
			SubnetId:          fooSubnet.ID(),
			InstanceName:      pulumi.String("tf-test"),
			ProjectName:       pulumi.String("testA"),
			Tags: vedb_mysql.InstanceTagArray{
				&vedb_mysql.InstanceTagArgs{
					Key:   pulumi.String("tftest"),
					Value: pulumi.String("tftest"),
				},
				&vedb_mysql.InstanceTagArgs{
					Key:   pulumi.String("tftest2"),
					Value: pulumi.String("tftest2"),
				},
			},
		})
		if err != nil {
			return err
		}
		fooInstances := vedb_mysql.InstancesOutput(ctx, vedb_mysql.InstancesOutputArgs{
			InstanceId: fooInstance.ID(),
		}, nil)
		_, err = vedb_mysql.NewEndpoint(ctx, "fooEndpoint", &vedb_mysql.EndpointArgs{
			EndpointType: pulumi.String("Custom"),
			InstanceId:   fooInstance.ID(),
			NodeIds: pulumi.StringArray{
				fooInstances.ApplyT(func(fooInstances vedb_mysql.InstancesResult) (*string, error) {
					return &fooInstances.Instances[0].Nodes[0].NodeId, nil
				}).(pulumi.StringPtrOutput),
				fooInstances.ApplyT(func(fooInstances vedb_mysql.InstancesResult) (*string, error) {
					return &fooInstances.Instances[0].Nodes[1].NodeId, nil
				}).(pulumi.StringPtrOutput),
			},
			ReadWriteMode:            pulumi.String("ReadWrite"),
			EndpointName:             pulumi.String("tf-test"),
			Description:              pulumi.String("tf test"),
			MasterAcceptReadRequests: pulumi.Bool(true),
			DistributedTransaction:   pulumi.Bool(true),
			ConsistLevel:             pulumi.String("Session"),
			ConsistTimeout:           pulumi.Int(100000),
			ConsistTimeoutAction:     pulumi.String("ReadMaster"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var fooZones = Volcengine.Ecs.Zones.Invoke();

    var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
    {
        VpcName = "acc-test-vpc",
        CidrBlock = "172.16.0.0/16",
    });

    var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
    {
        SubnetName = "acc-test-subnet",
        CidrBlock = "172.16.0.0/24",
        ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[2]?.Id),
        VpcId = fooVpc.Id,
    });

    var fooInstance = new Volcengine.Vedb_mysql.Instance("fooInstance", new()
    {
        ChargeType = "PostPaid",
        StorageChargeType = "PostPaid",
        DbEngineVersion = "MySQL_8_0",
        DbMinorVersion = "3.0",
        NodeNumber = 2,
        NodeSpec = "vedb.mysql.x4.large",
        SubnetId = fooSubnet.Id,
        InstanceName = "tf-test",
        ProjectName = "testA",
        Tags = new[]
        {
            new Volcengine.Vedb_mysql.Inputs.InstanceTagArgs
            {
                Key = "tftest",
                Value = "tftest",
            },
            new Volcengine.Vedb_mysql.Inputs.InstanceTagArgs
            {
                Key = "tftest2",
                Value = "tftest2",
            },
        },
    });

    var fooInstances = Volcengine.Vedb_mysql.Instances.Invoke(new()
    {
        InstanceId = fooInstance.Id,
    });

    var fooEndpoint = new Volcengine.Vedb_mysql.Endpoint("fooEndpoint", new()
    {
        EndpointType = "Custom",
        InstanceId = fooInstance.Id,
        NodeIds = new[]
        {
            fooInstances.Apply(instancesResult => instancesResult.Instances[0]?.Nodes[0]?.NodeId),
            fooInstances.Apply(instancesResult => instancesResult.Instances[0]?.Nodes[1]?.NodeId),
        },
        ReadWriteMode = "ReadWrite",
        EndpointName = "tf-test",
        Description = "tf test",
        MasterAcceptReadRequests = true,
        DistributedTransaction = true,
        ConsistLevel = "Session",
        ConsistTimeout = 100000,
        ConsistTimeoutAction = "ReadMaster",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.vedb_mysql.Instance;
import com.pulumi.volcengine.vedb_mysql.InstanceArgs;
import com.pulumi.volcengine.vedb_mysql.inputs.InstanceTagArgs;
import com.pulumi.volcengine.vedb_mysql.Vedb_mysqlFunctions;
import com.pulumi.volcengine.vedb_mysql.inputs.InstancesArgs;
import com.pulumi.volcengine.vedb_mysql.Endpoint;
import com.pulumi.volcengine.vedb_mysql.EndpointArgs;
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) {
        final var fooZones = EcsFunctions.Zones();

        var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
            .vpcName("acc-test-vpc")
            .cidrBlock("172.16.0.0/16")
            .build());

        var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
            .subnetName("acc-test-subnet")
            .cidrBlock("172.16.0.0/24")
            .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[2].id()))
            .vpcId(fooVpc.id())
            .build());

        var fooInstance = new Instance("fooInstance", InstanceArgs.builder()        
            .chargeType("PostPaid")
            .storageChargeType("PostPaid")
            .dbEngineVersion("MySQL_8_0")
            .dbMinorVersion("3.0")
            .nodeNumber(2)
            .nodeSpec("vedb.mysql.x4.large")
            .subnetId(fooSubnet.id())
            .instanceName("tf-test")
            .projectName("testA")
            .tags(            
                InstanceTagArgs.builder()
                    .key("tftest")
                    .value("tftest")
                    .build(),
                InstanceTagArgs.builder()
                    .key("tftest2")
                    .value("tftest2")
                    .build())
            .build());

        final var fooInstances = Vedb_mysqlFunctions.Instances(InstancesArgs.builder()
            .instanceId(fooInstance.id())
            .build());

        var fooEndpoint = new Endpoint("fooEndpoint", EndpointArgs.builder()        
            .endpointType("Custom")
            .instanceId(fooInstance.id())
            .nodeIds(            
                fooInstances.applyValue(instancesResult -> instancesResult).applyValue(fooInstances -> fooInstances.applyValue(instancesResult -> instancesResult.instances()[0].nodes()[0].nodeId())),
                fooInstances.applyValue(instancesResult -> instancesResult).applyValue(fooInstances -> fooInstances.applyValue(instancesResult -> instancesResult.instances()[0].nodes()[1].nodeId())))
            .readWriteMode("ReadWrite")
            .endpointName("tf-test")
            .description("tf test")
            .masterAcceptReadRequests(true)
            .distributedTransaction(true)
            .consistLevel("Session")
            .consistTimeout(100000)
            .consistTimeoutAction("ReadMaster")
            .build());

    }
}
Copy
resources:
  fooVpc:
    type: volcengine:vpc:Vpc
    properties:
      vpcName: acc-test-vpc
      cidrBlock: 172.16.0.0/16
  fooSubnet:
    type: volcengine:vpc:Subnet
    properties:
      subnetName: acc-test-subnet
      cidrBlock: 172.16.0.0/24
      zoneId: ${fooZones.zones[2].id}
      vpcId: ${fooVpc.id}
  fooInstance:
    type: volcengine:vedb_mysql:Instance
    properties:
      chargeType: PostPaid
      storageChargeType: PostPaid
      dbEngineVersion: MySQL_8_0
      dbMinorVersion: '3.0'
      nodeNumber: 2
      nodeSpec: vedb.mysql.x4.large
      subnetId: ${fooSubnet.id}
      instanceName: tf-test
      projectName: testA
      tags:
        - key: tftest
          value: tftest
        - key: tftest2
          value: tftest2
  fooEndpoint:
    type: volcengine:vedb_mysql:Endpoint
    properties:
      endpointType: Custom
      instanceId: ${fooInstance.id}
      nodeIds:
        - ${fooInstances.instances[0].nodes[0].nodeId}
        - ${fooInstances.instances[0].nodes[1].nodeId}
      readWriteMode: ReadWrite
      endpointName: tf-test
      description: tf test
      masterAcceptReadRequests: true
      distributedTransaction: true
      consistLevel: Session
      consistTimeout: 100000
      consistTimeoutAction: ReadMaster
variables:
  fooZones:
    fn::invoke:
      Function: volcengine:ecs:Zones
      Arguments: {}
  fooInstances:
    fn::invoke:
      Function: volcengine:vedb_mysql:Instances
      Arguments:
        instanceId: ${fooInstance.id}
Copy

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,
             endpoint_type: Optional[str] = None,
             instance_id: Optional[str] = None,
             node_ids: Optional[Sequence[str]] = None,
             consist_level: Optional[str] = None,
             consist_timeout: Optional[int] = None,
             consist_timeout_action: Optional[str] = None,
             description: Optional[str] = None,
             distributed_transaction: Optional[bool] = None,
             endpoint_name: Optional[str] = None,
             master_accept_read_requests: Optional[bool] = None,
             read_write_mode: Optional[str] = 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:vedb_mysql:Endpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EndpointArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. EndpointArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EndpointArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 exampleendpointResourceResourceFromVedb_mysqlendpoint = new Volcengine.Vedb_mysql.Endpoint("exampleendpointResourceResourceFromVedb_mysqlendpoint", new()
{
    EndpointType = "string",
    InstanceId = "string",
    NodeIds = new[]
    {
        "string",
    },
    ConsistLevel = "string",
    ConsistTimeout = 0,
    ConsistTimeoutAction = "string",
    Description = "string",
    DistributedTransaction = false,
    EndpointName = "string",
    MasterAcceptReadRequests = false,
    ReadWriteMode = "string",
});
Copy
example, err := vedb_mysql.NewEndpoint(ctx, "exampleendpointResourceResourceFromVedb_mysqlendpoint", &vedb_mysql.EndpointArgs{
	EndpointType: pulumi.String("string"),
	InstanceId:   pulumi.String("string"),
	NodeIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ConsistLevel:             pulumi.String("string"),
	ConsistTimeout:           pulumi.Int(0),
	ConsistTimeoutAction:     pulumi.String("string"),
	Description:              pulumi.String("string"),
	DistributedTransaction:   pulumi.Bool(false),
	EndpointName:             pulumi.String("string"),
	MasterAcceptReadRequests: pulumi.Bool(false),
	ReadWriteMode:            pulumi.String("string"),
})
Copy
var exampleendpointResourceResourceFromVedb_mysqlendpoint = new Endpoint("exampleendpointResourceResourceFromVedb_mysqlendpoint", EndpointArgs.builder()
    .endpointType("string")
    .instanceId("string")
    .nodeIds("string")
    .consistLevel("string")
    .consistTimeout(0)
    .consistTimeoutAction("string")
    .description("string")
    .distributedTransaction(false)
    .endpointName("string")
    .masterAcceptReadRequests(false)
    .readWriteMode("string")
    .build());
Copy
exampleendpoint_resource_resource_from_vedb_mysqlendpoint = volcengine.vedb_mysql.Endpoint("exampleendpointResourceResourceFromVedb_mysqlendpoint",
    endpoint_type="string",
    instance_id="string",
    node_ids=["string"],
    consist_level="string",
    consist_timeout=0,
    consist_timeout_action="string",
    description="string",
    distributed_transaction=False,
    endpoint_name="string",
    master_accept_read_requests=False,
    read_write_mode="string")
Copy
const exampleendpointResourceResourceFromVedb_mysqlendpoint = new volcengine.vedb_mysql.Endpoint("exampleendpointResourceResourceFromVedb_mysqlendpoint", {
    endpointType: "string",
    instanceId: "string",
    nodeIds: ["string"],
    consistLevel: "string",
    consistTimeout: 0,
    consistTimeoutAction: "string",
    description: "string",
    distributedTransaction: false,
    endpointName: "string",
    masterAcceptReadRequests: false,
    readWriteMode: "string",
});
Copy
type: volcengine:vedb_mysql:Endpoint
properties:
    consistLevel: string
    consistTimeout: 0
    consistTimeoutAction: string
    description: string
    distributedTransaction: false
    endpointName: string
    endpointType: string
    instanceId: string
    masterAcceptReadRequests: false
    nodeIds:
        - string
    readWriteMode: string
Copy

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:

EndpointType
This property is required.
Changes to this property will trigger replacement.
string
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The id of the instance.
NodeIds This property is required. List<string>
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
ConsistLevel string
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
ConsistTimeout int
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
ConsistTimeoutAction string
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
Description string
Description information for connecting endpoint. The length cannot exceed 200 characters.
DistributedTransaction bool
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
EndpointName string
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
MasterAcceptReadRequests bool
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
ReadWriteMode string
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
EndpointType
This property is required.
Changes to this property will trigger replacement.
string
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The id of the instance.
NodeIds This property is required. []string
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
ConsistLevel string
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
ConsistTimeout int
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
ConsistTimeoutAction string
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
Description string
Description information for connecting endpoint. The length cannot exceed 200 characters.
DistributedTransaction bool
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
EndpointName string
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
MasterAcceptReadRequests bool
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
ReadWriteMode string
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
endpointType
This property is required.
Changes to this property will trigger replacement.
String
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The id of the instance.
nodeIds This property is required. List<String>
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
consistLevel String
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consistTimeout Integer
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consistTimeoutAction String
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description String
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributedTransaction Boolean
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpointName String
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
masterAcceptReadRequests Boolean
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
readWriteMode String
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
endpointType
This property is required.
Changes to this property will trigger replacement.
string
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The id of the instance.
nodeIds This property is required. string[]
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
consistLevel string
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consistTimeout number
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consistTimeoutAction string
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description string
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributedTransaction boolean
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpointName string
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
masterAcceptReadRequests boolean
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
readWriteMode string
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
endpoint_type
This property is required.
Changes to this property will trigger replacement.
str
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The id of the instance.
node_ids This property is required. Sequence[str]
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
consist_level str
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consist_timeout int
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consist_timeout_action str
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description str
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributed_transaction bool
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpoint_name str
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
master_accept_read_requests bool
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
read_write_mode str
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
endpointType
This property is required.
Changes to this property will trigger replacement.
String
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The id of the instance.
nodeIds This property is required. List<String>
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
consistLevel String
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consistTimeout Number
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consistTimeoutAction String
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description String
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributedTransaction Boolean
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpointName String
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
masterAcceptReadRequests Boolean
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
readWriteMode String
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).

Outputs

All input properties are implicitly available as output properties. Additionally, the Endpoint resource produces the following output properties:

EndpointId string
The id of the endpoint.
Id string
The provider-assigned unique ID for this managed resource.
EndpointId string
The id of the endpoint.
Id string
The provider-assigned unique ID for this managed resource.
endpointId String
The id of the endpoint.
id String
The provider-assigned unique ID for this managed resource.
endpointId string
The id of the endpoint.
id string
The provider-assigned unique ID for this managed resource.
endpoint_id str
The id of the endpoint.
id str
The provider-assigned unique ID for this managed resource.
endpointId String
The id of the endpoint.
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,
        consist_level: Optional[str] = None,
        consist_timeout: Optional[int] = None,
        consist_timeout_action: Optional[str] = None,
        description: Optional[str] = None,
        distributed_transaction: Optional[bool] = None,
        endpoint_id: Optional[str] = None,
        endpoint_name: Optional[str] = None,
        endpoint_type: Optional[str] = None,
        instance_id: Optional[str] = None,
        master_accept_read_requests: Optional[bool] = None,
        node_ids: Optional[Sequence[str]] = None,
        read_write_mode: Optional[str] = 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:vedb_mysql:Endpoint    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ConsistLevel string
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
ConsistTimeout int
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
ConsistTimeoutAction string
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
Description string
Description information for connecting endpoint. The length cannot exceed 200 characters.
DistributedTransaction bool
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
EndpointId string
The id of the endpoint.
EndpointName string
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
EndpointType Changes to this property will trigger replacement. string
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
InstanceId Changes to this property will trigger replacement. string
The id of the instance.
MasterAcceptReadRequests bool
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
NodeIds List<string>
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
ReadWriteMode string
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
ConsistLevel string
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
ConsistTimeout int
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
ConsistTimeoutAction string
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
Description string
Description information for connecting endpoint. The length cannot exceed 200 characters.
DistributedTransaction bool
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
EndpointId string
The id of the endpoint.
EndpointName string
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
EndpointType Changes to this property will trigger replacement. string
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
InstanceId Changes to this property will trigger replacement. string
The id of the instance.
MasterAcceptReadRequests bool
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
NodeIds []string
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
ReadWriteMode string
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
consistLevel String
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consistTimeout Integer
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consistTimeoutAction String
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description String
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributedTransaction Boolean
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpointId String
The id of the endpoint.
endpointName String
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
endpointType Changes to this property will trigger replacement. String
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instanceId Changes to this property will trigger replacement. String
The id of the instance.
masterAcceptReadRequests Boolean
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
nodeIds List<String>
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
readWriteMode String
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
consistLevel string
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consistTimeout number
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consistTimeoutAction string
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description string
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributedTransaction boolean
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpointId string
The id of the endpoint.
endpointName string
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
endpointType Changes to this property will trigger replacement. string
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instanceId Changes to this property will trigger replacement. string
The id of the instance.
masterAcceptReadRequests boolean
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
nodeIds string[]
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
readWriteMode string
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
consist_level str
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consist_timeout int
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consist_timeout_action str
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description str
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributed_transaction bool
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpoint_id str
The id of the endpoint.
endpoint_name str
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
endpoint_type Changes to this property will trigger replacement. str
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instance_id Changes to this property will trigger replacement. str
The id of the instance.
master_accept_read_requests bool
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
node_ids Sequence[str]
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
read_write_mode str
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).
consistLevel String
Consistency level. For detailed introduction of consistency level, please refer to consistency level. Value range: Eventual: eventual consistency. Session: session consistency. Global: global consistency. Description When the value of ReadWriteMode is ReadWrite, the selectable consistency levels are Eventual, Session (default), and Global. When the value of ReadWriteMode is ReadOnly, the consistency level is Eventual by default and cannot be changed.
consistTimeout Number
When there is a large delay, the timeout period for read-only nodes to synchronize the latest data, in us. The value range is from 1us to 100000000us, and the default value is 10000us. Explanation This parameter takes effect only when the value of ConsistLevel is Global or Session.
consistTimeoutAction String
Timeout policy after data synchronization timeout of read-only nodes supports the following two policies: ReturnError: Return SQL error (wait replication complete timeout, please retry). ReadMaster: Send a request to the master node (default). Description This parameter takes effect only when the value of ConsistLevel is Global or Session.
description String
Description information for connecting endpoint. The length cannot exceed 200 characters.
distributedTransaction Boolean
Set whether to enable transaction splitting. For detailed introduction to transaction splitting, please refer to transaction splitting. Value range: true: Enabled (default). false: Disabled. Description Only when the value of ReadWriteMode is ReadWrite, is enabling transaction splitting supported.
endpointId String
The id of the endpoint.
endpointName String
Connect the endpoint name. The setting rules are as follows: It cannot start with a number or a hyphen (-). It can only contain Chinese characters, letters, numbers, underscores (_), and hyphens (-). The length is 1 to 64 characters.
endpointType Changes to this property will trigger replacement. String
Connect endpoint type. The value is fixed as Custom, indicating a custom endpoint.
instanceId Changes to this property will trigger replacement. String
The id of the instance.
masterAcceptReadRequests Boolean
The master node accepts read requests. Value range: true: (default) After enabling the master node to accept read functions, non-transactional read requests will be sent to the master node or read-only nodes in a load-balanced mode according to the number of active requests. false: After disabling the master node from accepting read requests, at this time, the master node only accepts transactional read requests, and non-transactional read requests will not be sent to the master node. Description Only when the value of ReadWriteMode is ReadWrite, enabling the master node to accept reads is supported.
nodeIds List<String>
Connect the node IDs associated with the endpoint.The filling rules are as follows: When the value of ReadWriteMode is ReadWrite, at least two nodes must be passed in, and the master node must be passed in. When the value of ReadWriteMode is ReadOnly, one or more read-only nodes can be passed in.
readWriteMode String
Endpoint read-write mode. Values: ReadWrite: Read and write endpoint. ReadOnly: Read-only endpoint (default).

Import

VedbMysqlEndpoint can be imported using the instance id:endpoint id, e.g.

$ pulumi import volcengine:vedb_mysql/endpoint:Endpoint default vedbm-iqnh3a7z****:vedbm-2pf2xk5v****-Custom-50yv
Copy

Note: The master node endpoint only supports modifying the EndpointName and Description parameters. If values are passed in for other parameters, these values will be ignored without generating an error. The default endpoint does not support modifying the ReadWriteMode, AutoAddNewNodes, and Nodes parameters. If values are passed in for these parameters, these values will be ignored without generating an error.

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.