alicloud.polardb.ZonalEndpoint
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:
- Db
Cluster stringId - The Id of cluster that can run database.
- Db
Cluster Dictionary<string, string>Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- Auto
Add stringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - Db
Endpoint stringDescription - The name of the endpoint.
- Endpoint
Config 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.
- Endpoint
Type string - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - Net
Type string - The network type of the endpoint address.
- Nodes
Keys List<string> - The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
- Read
Write stringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - Vpc
Id string - The ID of ENS VPC where to use the DB.
- Vswitch
Id string - The ID of ENS virtual switch where to use the DB.
- Db
Cluster stringId - The Id of cluster that can run database.
- Db
Cluster map[string]stringNodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- Auto
Add stringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - Db
Endpoint stringDescription - The name of the endpoint.
- Endpoint
Config 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.
- Endpoint
Type string - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - Net
Type string - The network type of the endpoint address.
- Nodes
Keys []string - The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
- Read
Write stringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - Vpc
Id string - The ID of ENS VPC where to use the DB.
- Vswitch
Id string - The ID of ENS virtual switch where to use the DB.
- db
Cluster StringId - The Id of cluster that can run database.
- db
Cluster Map<String,String>Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- auto
Add StringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - db
Endpoint StringDescription - The name of the endpoint.
- endpoint
Config 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.
- endpoint
Type String - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - net
Type String - The network type of the endpoint address.
- nodes
Keys List<String> - The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
- read
Write StringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - vpc
Id String - The ID of ENS VPC where to use the DB.
- vswitch
Id String - The ID of ENS virtual switch where to use the DB.
- db
Cluster stringId - The Id of cluster that can run database.
- db
Cluster {[key: string]: string}Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- auto
Add stringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - db
Endpoint stringDescription - The name of the endpoint.
- endpoint
Config {[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.
- endpoint
Type string - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - net
Type string - The network type of the endpoint address.
- nodes
Keys string[] - The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
- read
Write stringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - vpc
Id string - The ID of ENS VPC where to use the DB.
- vswitch
Id string - The ID of ENS virtual switch where to use the DB.
- db_
cluster_ strid - The Id of cluster that can run database.
- db_
cluster_ Mapping[str, str]nodes_ ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- auto_
add_ strnew_ nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - db_
endpoint_ strdescription - 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 toCustom. However when creating a new endpoint, it also only can beCustom. - 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_ strmode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - 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.
- db
Cluster StringId - The Id of cluster that can run database.
- db
Cluster Map<String>Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- auto
Add StringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - db
Endpoint StringDescription - The name of the endpoint.
- endpoint
Config 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.
- endpoint
Type String - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - net
Type String - The network type of the endpoint address.
- nodes
Keys List<String> - The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
- read
Write StringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - vpc
Id String - The ID of ENS VPC where to use the DB.
- vswitch
Id 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:
- Connection
Prefix 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.
- Db
Endpoint stringId - 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.
- Connection
Prefix 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.
- Db
Endpoint stringId - 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 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.
- db
Endpoint StringId - 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.
- connection
Prefix 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.
- db
Endpoint stringId - 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_ strid - 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.
- connection
Prefix 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.
- db
Endpoint StringId - 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) -> ZonalEndpointfunc 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.
- Auto
Add stringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - Connection
Prefix 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.
- Db
Cluster stringId - The Id of cluster that can run database.
- Db
Cluster Dictionary<string, string>Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- Db
Endpoint stringDescription - The name of the endpoint.
- Db
Endpoint stringId - The ID of the cluster endpoint.
- Endpoint
Config 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.
- Endpoint
Type string - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - Net
Type string - The network type of the endpoint address.
- Nodes List<string>
- Node id list for endpoint configuration.
- Nodes
Keys 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.
- Read
Write stringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - Vpc
Id string - The ID of ENS VPC where to use the DB.
- Vswitch
Id string - The ID of ENS virtual switch where to use the DB.
- Auto
Add stringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - Connection
Prefix 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.
- Db
Cluster stringId - The Id of cluster that can run database.
- Db
Cluster map[string]stringNodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- Db
Endpoint stringDescription - The name of the endpoint.
- Db
Endpoint stringId - The ID of the cluster endpoint.
- Endpoint
Config 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.
- Endpoint
Type string - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - Net
Type string - The network type of the endpoint address.
- Nodes []string
- Node id list for endpoint configuration.
- Nodes
Keys []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.
- Read
Write stringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - Vpc
Id string - The ID of ENS VPC where to use the DB.
- Vswitch
Id string - The ID of ENS virtual switch where to use the DB.
- auto
Add StringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - connection
Prefix 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.
- db
Cluster StringId - The Id of cluster that can run database.
- db
Cluster Map<String,String>Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- db
Endpoint StringDescription - The name of the endpoint.
- db
Endpoint StringId - The ID of the cluster endpoint.
- endpoint
Config 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.
- endpoint
Type String - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - net
Type String - The network type of the endpoint address.
- nodes List<String>
- Node id list for endpoint configuration.
- nodes
Keys 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.
- read
Write StringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - vpc
Id String - The ID of ENS VPC where to use the DB.
- vswitch
Id String - The ID of ENS virtual switch where to use the DB.
- auto
Add stringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - connection
Prefix 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.
- db
Cluster stringId - The Id of cluster that can run database.
- db
Cluster {[key: string]: string}Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- db
Endpoint stringDescription - The name of the endpoint.
- db
Endpoint stringId - The ID of the cluster endpoint.
- endpoint
Config {[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.
- endpoint
Type string - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - net
Type string - The network type of the endpoint address.
- nodes string[]
- Node id list for endpoint configuration.
- nodes
Keys 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.
- read
Write stringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - vpc
Id string - The ID of ENS VPC where to use the DB.
- vswitch
Id string - The ID of ENS virtual switch where to use the DB.
- auto_
add_ strnew_ nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - 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_ strid - The Id of cluster that can run database.
- db_
cluster_ Mapping[str, str]nodes_ ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- db_
endpoint_ strdescription - The name of the endpoint.
- db_
endpoint_ strid - 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 toCustom. However when creating a new endpoint, it also only can beCustom. - 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_ strmode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - 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.
- auto
Add StringNew Nodes - Whether the new node automatically joins the default cluster address. Valid values are
Enable,Disable. When creating a new custom endpoint, default toEnable. - connection
Prefix 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.
- db
Cluster StringId - The Id of cluster that can run database.
- db
Cluster Map<String>Nodes Ids - referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
- db
Endpoint StringDescription - The name of the endpoint.
- db
Endpoint StringId - The ID of the cluster endpoint.
- endpoint
Config 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.
- endpoint
Type String - Type of the endpoint. Valid values are
Custom,Cluster,Primary, default toCustom. However when creating a new endpoint, it also only can beCustom. - net
Type String - The network type of the endpoint address.
- nodes List<String>
- Node id list for endpoint configuration.
- nodes
Keys 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.
- read
Write StringMode - Read or write mode. Valid values are
ReadWrite,ReadOnly. When creating a new custom endpoint, default toReadOnly. - vpc
Id String - The ID of ENS VPC where to use the DB.
- vswitch
Id 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
alicloudTerraform Provider.
