1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. polardb
  5. ZonalEndpoint
Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi

alicloud.polardb.ZonalEndpoint

Start a Neo task
Explain and create an alicloud.polardb.ZonalEndpoint resource
alicloud logo
Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi

    Provides a PolarDB Zonal endpoint resource to manage custom endpoint of PolarDB cluster.

    NOTE: Available since v1.262.0. NOTE: The primary endpoint and the default cluster endpoint can not be created or deleted manually.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    // The advanced configuration for all nodes in the cluster except for the RW node, including db_node_class, hot_replica_mode, and imci_switch properties.
    const dbClusterNodesConfigs = config.getObject<Record<string, {dbNodeClass?: string, dbNodeRole?: string, hotReplicaMode?: string, imciSwitch?: string}>>("dbClusterNodesConfigs") || {
        db_node_1: {
            dbNodeClass: "polar.mysql.x4.medium.c",
            dbNodeRole: "Writer",
            hotReplicaMode: null,
            imciSwitch: null,
        },
        db_node_2: {
            dbNodeClass: "polar.mysql.x4.medium.c",
            dbNodeRole: "Reader",
            hotReplicaMode: null,
            imciSwitch: null,
        },
    };
    const _default = new alicloud.ens.Network("default", {
        networkName: "terraform-example",
        description: "LoadBalancerNetworkDescription_test",
        cidrBlock: "192.168.2.0/24",
        ensRegionId: "tr-Istanbul-1",
    });
    const defaultVswitch = new alicloud.ens.Vswitch("default", {
        description: "LoadBalancerVSwitchDescription_test",
        cidrBlock: "192.168.2.0/24",
        vswitchName: "terraform-example",
        ensRegionId: "tr-Istanbul-1",
        networkId: _default.id,
    });
    const defaultZonalDbCluster = new alicloud.polardb.ZonalDbCluster("default", {
        dbNodeClass: "polar.mysql.x4.medium.c",
        description: "terraform-example",
        ensRegionId: "tr-Istanbul-1",
        vpcId: _default.id,
        vswitchId: defaultVswitch.id,
        dbClusterNodesConfigs: Object.entries(dbClusterNodesConfigs).reduce((__obj, [node, config]) => ({ ...__obj, [node]: JSON.stringify(Object.entries(config).filter(([k, v]) => v != null).reduce((__obj, [k, v]) => ({ ...__obj, [k]: v }))) })),
    });
    const defaultZonalEndpoint = new alicloud.polardb.ZonalEndpoint("default", {
        dbClusterId: defaultZonalDbCluster.id,
        dbClusterNodesIds: defaultZonalDbCluster.dbClusterNodesIds,
        endpointConfig: {},
        nodesKeys: [
            "db_node_1",
            "db_node_2",
        ],
        readWriteMode: "ReadWrite",
    });
    
    import pulumi
    import json
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    # The advanced configuration for all nodes in the cluster except for the RW node, including db_node_class, hot_replica_mode, and imci_switch properties.
    db_cluster_nodes_configs = config.get_object("dbClusterNodesConfigs")
    if db_cluster_nodes_configs is None:
        db_cluster_nodes_configs = {
            "db_node_1": {
                "dbNodeClass": "polar.mysql.x4.medium.c",
                "dbNodeRole": "Writer",
                "hotReplicaMode": None,
                "imciSwitch": None,
            },
            "db_node_2": {
                "dbNodeClass": "polar.mysql.x4.medium.c",
                "dbNodeRole": "Reader",
                "hotReplicaMode": None,
                "imciSwitch": None,
            },
        }
    default = alicloud.ens.Network("default",
        network_name="terraform-example",
        description="LoadBalancerNetworkDescription_test",
        cidr_block="192.168.2.0/24",
        ens_region_id="tr-Istanbul-1")
    default_vswitch = alicloud.ens.Vswitch("default",
        description="LoadBalancerVSwitchDescription_test",
        cidr_block="192.168.2.0/24",
        vswitch_name="terraform-example",
        ens_region_id="tr-Istanbul-1",
        network_id=default.id)
    default_zonal_db_cluster = alicloud.polardb.ZonalDbCluster("default",
        db_node_class="polar.mysql.x4.medium.c",
        description="terraform-example",
        ens_region_id="tr-Istanbul-1",
        vpc_id=default.id,
        vswitch_id=default_vswitch.id,
        db_cluster_nodes_configs={node: json.dumps({k: v for k, v in config if v != None}) for node, config in db_cluster_nodes_configs})
    default_zonal_endpoint = alicloud.polardb.ZonalEndpoint("default",
        db_cluster_id=default_zonal_db_cluster.id,
        db_cluster_nodes_ids=default_zonal_db_cluster.db_cluster_nodes_ids,
        endpoint_config={},
        nodes_keys=[
            "db_node_1",
            "db_node_2",
        ],
        read_write_mode="ReadWrite")
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        // The advanced configuration for all nodes in the cluster except for the RW node, including db_node_class, hot_replica_mode, and imci_switch properties.
        var dbClusterNodesConfigs = config.GetObject<Dictionary<string, DbClusterNodesConfigs>>("dbClusterNodesConfigs") ?? 
        {
            { "db_node_1", 
            {
                { "dbNodeClass", "polar.mysql.x4.medium.c" },
                { "dbNodeRole", "Writer" },
                { "hotReplicaMode", null },
                { "imciSwitch", null },
            } },
            { "db_node_2", 
            {
                { "dbNodeClass", "polar.mysql.x4.medium.c" },
                { "dbNodeRole", "Reader" },
                { "hotReplicaMode", null },
                { "imciSwitch", null },
            } },
        };
        var @default = new AliCloud.Ens.Network("default", new()
        {
            NetworkName = "terraform-example",
            Description = "LoadBalancerNetworkDescription_test",
            CidrBlock = "192.168.2.0/24",
            EnsRegionId = "tr-Istanbul-1",
        });
    
        var defaultVswitch = new AliCloud.Ens.Vswitch("default", new()
        {
            Description = "LoadBalancerVSwitchDescription_test",
            CidrBlock = "192.168.2.0/24",
            VswitchName = "terraform-example",
            EnsRegionId = "tr-Istanbul-1",
            NetworkId = @default.Id,
        });
    
        var defaultZonalDbCluster = new AliCloud.PolarDB.ZonalDbCluster("default", new()
        {
            DbNodeClass = "polar.mysql.x4.medium.c",
            Description = "terraform-example",
            EnsRegionId = "tr-Istanbul-1",
            VpcId = @default.Id,
            VswitchId = defaultVswitch.Id,
            DbClusterNodesConfigs = dbClusterNodesConfigs.Select(pair => new { pair.Key, pair.Value }).ToDictionary(item => {
                var node = item.Key;
                return node;
            }, item => {
                var config = item.Value;
                return JsonSerializer.Serialize(.ToDictionary(item => {
                    var k = item.Key;
                    return k;
                }, item => {
                    var v = item.Value;
                    return v;
                }));
            }),
        });
    
        var defaultZonalEndpoint = new AliCloud.PolarDB.ZonalEndpoint("default", new()
        {
            DbClusterId = defaultZonalDbCluster.Id,
            DbClusterNodesIds = defaultZonalDbCluster.DbClusterNodesIds,
            EndpointConfig = null,
            NodesKeys = new[]
            {
                "db_node_1",
                "db_node_2",
            },
            ReadWriteMode = "ReadWrite",
        });
    
    });
    
    public class DbClusterNodesConfigs
    {
        public string dbNodeClass { get; set; }
        public string dbNodeRole { get; set; }
        public string hotReplicaMode { get; set; }
        public string imciSwitch { get; set; }
    }
    
    Example coming soon!
    
    Example coming soon!
    

    Create ZonalEndpoint Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ZonalEndpoint(name: string, args: ZonalEndpointArgs, opts?: CustomResourceOptions);
    @overload
    def ZonalEndpoint(resource_name: str,
                      args: ZonalEndpointArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZonalEndpoint(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      db_cluster_id: Optional[str] = None,
                      db_cluster_nodes_ids: Optional[Mapping[str, str]] = None,
                      auto_add_new_nodes: Optional[str] = None,
                      db_endpoint_description: Optional[str] = None,
                      endpoint_config: Optional[Mapping[str, str]] = None,
                      endpoint_type: Optional[str] = None,
                      net_type: Optional[str] = None,
                      nodes_keys: Optional[Sequence[str]] = None,
                      read_write_mode: Optional[str] = None,
                      vpc_id: Optional[str] = None,
                      vswitch_id: Optional[str] = None)
    func NewZonalEndpoint(ctx *Context, name string, args ZonalEndpointArgs, opts ...ResourceOption) (*ZonalEndpoint, error)
    public ZonalEndpoint(string name, ZonalEndpointArgs args, CustomResourceOptions? opts = null)
    public ZonalEndpoint(String name, ZonalEndpointArgs args)
    public ZonalEndpoint(String name, ZonalEndpointArgs args, CustomResourceOptions options)
    
    type: alicloud:polardb:ZonalEndpoint
    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 ZonalEndpointArgs
    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 ZonalEndpointArgs
    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 ZonalEndpointArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZonalEndpointArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZonalEndpointArgs
    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 zonalEndpointResource = new AliCloud.PolarDB.ZonalEndpoint("zonalEndpointResource", new()
    {
        DbClusterId = "string",
        DbClusterNodesIds = 
        {
            { "string", "string" },
        },
        AutoAddNewNodes = "string",
        DbEndpointDescription = "string",
        EndpointConfig = 
        {
            { "string", "string" },
        },
        EndpointType = "string",
        NetType = "string",
        NodesKeys = new[]
        {
            "string",
        },
        ReadWriteMode = "string",
        VpcId = "string",
        VswitchId = "string",
    });
    
    example, err := polardb.NewZonalEndpoint(ctx, "zonalEndpointResource", &polardb.ZonalEndpointArgs{
    	DbClusterId: pulumi.String("string"),
    	DbClusterNodesIds: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	AutoAddNewNodes:       pulumi.String("string"),
    	DbEndpointDescription: pulumi.String("string"),
    	EndpointConfig: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	EndpointType: pulumi.String("string"),
    	NetType:      pulumi.String("string"),
    	NodesKeys: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ReadWriteMode: pulumi.String("string"),
    	VpcId:         pulumi.String("string"),
    	VswitchId:     pulumi.String("string"),
    })
    
    var zonalEndpointResource = new ZonalEndpoint("zonalEndpointResource", ZonalEndpointArgs.builder()
        .dbClusterId("string")
        .dbClusterNodesIds(Map.of("string", "string"))
        .autoAddNewNodes("string")
        .dbEndpointDescription("string")
        .endpointConfig(Map.of("string", "string"))
        .endpointType("string")
        .netType("string")
        .nodesKeys("string")
        .readWriteMode("string")
        .vpcId("string")
        .vswitchId("string")
        .build());
    
    zonal_endpoint_resource = alicloud.polardb.ZonalEndpoint("zonalEndpointResource",
        db_cluster_id="string",
        db_cluster_nodes_ids={
            "string": "string",
        },
        auto_add_new_nodes="string",
        db_endpoint_description="string",
        endpoint_config={
            "string": "string",
        },
        endpoint_type="string",
        net_type="string",
        nodes_keys=["string"],
        read_write_mode="string",
        vpc_id="string",
        vswitch_id="string")
    
    const zonalEndpointResource = new alicloud.polardb.ZonalEndpoint("zonalEndpointResource", {
        dbClusterId: "string",
        dbClusterNodesIds: {
            string: "string",
        },
        autoAddNewNodes: "string",
        dbEndpointDescription: "string",
        endpointConfig: {
            string: "string",
        },
        endpointType: "string",
        netType: "string",
        nodesKeys: ["string"],
        readWriteMode: "string",
        vpcId: "string",
        vswitchId: "string",
    });
    
    type: alicloud:polardb:ZonalEndpoint
    properties:
        autoAddNewNodes: string
        dbClusterId: string
        dbClusterNodesIds:
            string: string
        dbEndpointDescription: string
        endpointConfig:
            string: string
        endpointType: string
        netType: string
        nodesKeys:
            - string
        readWriteMode: string
        vpcId: string
        vswitchId: string
    

    ZonalEndpoint 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 ZonalEndpoint resource accepts the following input properties:

    DbClusterId string
    The Id of cluster that can run database.
    DbClusterNodesIds Dictionary<string, string>
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    DbEndpointDescription string
    The name of the endpoint.
    EndpointConfig Dictionary<string, string>
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    EndpointType string
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    NodesKeys List<string>
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    VpcId string
    The ID of ENS VPC where to use the DB.
    VswitchId string
    The ID of ENS virtual switch where to use the DB.
    DbClusterId string
    The Id of cluster that can run database.
    DbClusterNodesIds map[string]string
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    DbEndpointDescription string
    The name of the endpoint.
    EndpointConfig map[string]string
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    EndpointType string
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    NodesKeys []string
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    VpcId string
    The ID of ENS VPC where to use the DB.
    VswitchId string
    The ID of ENS virtual switch where to use the DB.
    dbClusterId String
    The Id of cluster that can run database.
    dbClusterNodesIds Map<String,String>
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    dbEndpointDescription String
    The name of the endpoint.
    endpointConfig Map<String,String>
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpointType String
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodesKeys List<String>
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpcId String
    The ID of ENS VPC where to use the DB.
    vswitchId String
    The ID of ENS virtual switch where to use the DB.
    dbClusterId string
    The Id of cluster that can run database.
    dbClusterNodesIds {[key: string]: string}
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    autoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    dbEndpointDescription string
    The name of the endpoint.
    endpointConfig {[key: string]: string}
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpointType string
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType string
    The network type of the endpoint address.
    nodesKeys string[]
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    readWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpcId string
    The ID of ENS VPC where to use the DB.
    vswitchId string
    The ID of ENS virtual switch where to use the DB.
    db_cluster_id str
    The Id of cluster that can run database.
    db_cluster_nodes_ids Mapping[str, str]
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    auto_add_new_nodes str
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    db_endpoint_description str
    The name of the endpoint.
    endpoint_config Mapping[str, str]
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpoint_type str
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    net_type str
    The network type of the endpoint address.
    nodes_keys Sequence[str]
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    read_write_mode str
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpc_id str
    The ID of ENS VPC where to use the DB.
    vswitch_id str
    The ID of ENS virtual switch where to use the DB.
    dbClusterId String
    The Id of cluster that can run database.
    dbClusterNodesIds Map<String>
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    dbEndpointDescription String
    The name of the endpoint.
    endpointConfig Map<String>
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpointType String
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodesKeys List<String>
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpcId String
    The ID of ENS VPC where to use the DB.
    vswitchId String
    The ID of ENS virtual switch where to use the DB.

    Outputs

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

    ConnectionPrefix string
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    DbEndpointId string
    The ID of the cluster endpoint.
    Id string
    The provider-assigned unique ID for this managed resource.
    Nodes List<string>
    Node id list for endpoint configuration.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ConnectionPrefix string
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    DbEndpointId string
    The ID of the cluster endpoint.
    Id string
    The provider-assigned unique ID for this managed resource.
    Nodes []string
    Node id list for endpoint configuration.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    connectionPrefix String
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    dbEndpointId String
    The ID of the cluster endpoint.
    id String
    The provider-assigned unique ID for this managed resource.
    nodes List<String>
    Node id list for endpoint configuration.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    connectionPrefix string
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    dbEndpointId string
    The ID of the cluster endpoint.
    id string
    The provider-assigned unique ID for this managed resource.
    nodes string[]
    Node id list for endpoint configuration.
    port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    connection_prefix str
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    db_endpoint_id str
    The ID of the cluster endpoint.
    id str
    The provider-assigned unique ID for this managed resource.
    nodes Sequence[str]
    Node id list for endpoint configuration.
    port str
    Port of the specified endpoint. Valid values: 3000 to 5999.
    connectionPrefix String
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    dbEndpointId String
    The ID of the cluster endpoint.
    id String
    The provider-assigned unique ID for this managed resource.
    nodes List<String>
    Node id list for endpoint configuration.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.

    Look up Existing ZonalEndpoint Resource

    Get an existing ZonalEndpoint 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?: ZonalEndpointState, opts?: CustomResourceOptions): ZonalEndpoint
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_add_new_nodes: Optional[str] = None,
            connection_prefix: Optional[str] = None,
            db_cluster_id: Optional[str] = None,
            db_cluster_nodes_ids: Optional[Mapping[str, str]] = None,
            db_endpoint_description: Optional[str] = None,
            db_endpoint_id: Optional[str] = None,
            endpoint_config: Optional[Mapping[str, str]] = None,
            endpoint_type: Optional[str] = None,
            net_type: Optional[str] = None,
            nodes: Optional[Sequence[str]] = None,
            nodes_keys: Optional[Sequence[str]] = None,
            port: Optional[str] = None,
            read_write_mode: Optional[str] = None,
            vpc_id: Optional[str] = None,
            vswitch_id: Optional[str] = None) -> ZonalEndpoint
    func GetZonalEndpoint(ctx *Context, name string, id IDInput, state *ZonalEndpointState, opts ...ResourceOption) (*ZonalEndpoint, error)
    public static ZonalEndpoint Get(string name, Input<string> id, ZonalEndpointState? state, CustomResourceOptions? opts = null)
    public static ZonalEndpoint get(String name, Output<String> id, ZonalEndpointState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:polardb:ZonalEndpoint    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.
    The following state arguments are supported:
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    ConnectionPrefix string
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    DbClusterId string
    The Id of cluster that can run database.
    DbClusterNodesIds Dictionary<string, string>
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    DbEndpointDescription string
    The name of the endpoint.
    DbEndpointId string
    The ID of the cluster endpoint.
    EndpointConfig Dictionary<string, string>
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    EndpointType string
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    Nodes List<string>
    Node id list for endpoint configuration.
    NodesKeys List<string>
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    VpcId string
    The ID of ENS VPC where to use the DB.
    VswitchId string
    The ID of ENS virtual switch where to use the DB.
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    ConnectionPrefix string
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    DbClusterId string
    The Id of cluster that can run database.
    DbClusterNodesIds map[string]string
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    DbEndpointDescription string
    The name of the endpoint.
    DbEndpointId string
    The ID of the cluster endpoint.
    EndpointConfig map[string]string
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    EndpointType string
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    Nodes []string
    Node id list for endpoint configuration.
    NodesKeys []string
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    VpcId string
    The ID of ENS VPC where to use the DB.
    VswitchId string
    The ID of ENS virtual switch where to use the DB.
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    connectionPrefix String
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    dbClusterId String
    The Id of cluster that can run database.
    dbClusterNodesIds Map<String,String>
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    dbEndpointDescription String
    The name of the endpoint.
    dbEndpointId String
    The ID of the cluster endpoint.
    endpointConfig Map<String,String>
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpointType String
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodes List<String>
    Node id list for endpoint configuration.
    nodesKeys List<String>
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpcId String
    The ID of ENS VPC where to use the DB.
    vswitchId String
    The ID of ENS virtual switch where to use the DB.
    autoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    connectionPrefix string
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    dbClusterId string
    The Id of cluster that can run database.
    dbClusterNodesIds {[key: string]: string}
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    dbEndpointDescription string
    The name of the endpoint.
    dbEndpointId string
    The ID of the cluster endpoint.
    endpointConfig {[key: string]: string}
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpointType string
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType string
    The network type of the endpoint address.
    nodes string[]
    Node id list for endpoint configuration.
    nodesKeys string[]
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpcId string
    The ID of ENS VPC where to use the DB.
    vswitchId string
    The ID of ENS virtual switch where to use the DB.
    auto_add_new_nodes str
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    connection_prefix str
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    db_cluster_id str
    The Id of cluster that can run database.
    db_cluster_nodes_ids Mapping[str, str]
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    db_endpoint_description str
    The name of the endpoint.
    db_endpoint_id str
    The ID of the cluster endpoint.
    endpoint_config Mapping[str, str]
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpoint_type str
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    net_type str
    The network type of the endpoint address.
    nodes Sequence[str]
    Node id list for endpoint configuration.
    nodes_keys Sequence[str]
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    port str
    Port of the specified endpoint. Valid values: 3000 to 5999.
    read_write_mode str
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpc_id str
    The ID of ENS VPC where to use the DB.
    vswitch_id str
    The ID of ENS virtual switch where to use the DB.
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Enable.
    connectionPrefix String
    Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
    dbClusterId String
    The Id of cluster that can run database.
    dbClusterNodesIds Map<String>
    referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
    dbEndpointDescription String
    The name of the endpoint.
    dbEndpointId String
    The ID of the cluster endpoint.
    endpointConfig Map<String>
    The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the description of EndpointConfig in the Request parameters table for details.
    endpointType String
    Type of the endpoint. Valid values are Custom, Cluster, Primary, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodes List<String>
    Node id list for endpoint configuration.
    nodesKeys List<String>
    The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    vpcId String
    The ID of ENS VPC where to use the DB.
    vswitchId String
    The ID of ENS virtual switch where to use the DB.

    Import

    PolarDB Zonal endpoint can be imported using the id, e.g.

    $ pulumi import alicloud:polardb/zonalEndpoint:ZonalEndpoint example pc-abc123456:pe-abc123456
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate