pulumi-alicloud 3.88.0a1761888283__py3-none-any.whl → 3.88.0a1761969289__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-alicloud might be problematic. Click here for more details.
- pulumi_alicloud/__init__.py +59 -0
- pulumi_alicloud/cfg/_inputs.py +27 -24
- pulumi_alicloud/cfg/aggregator.py +142 -53
- pulumi_alicloud/cfg/outputs.py +18 -15
- pulumi_alicloud/cloudfirewall/__init__.py +1 -0
- pulumi_alicloud/cloudfirewall/get_tls_inspect_ca_certificates.py +214 -0
- pulumi_alicloud/cloudfirewall/outputs.py +30 -0
- pulumi_alicloud/cms/_inputs.py +870 -10
- pulumi_alicloud/cms/get_site_monitors.py +2 -2
- pulumi_alicloud/cms/outputs.py +606 -6
- pulumi_alicloud/cms/site_monitor.py +360 -89
- pulumi_alicloud/cr/registry_enterprise_instance.py +63 -0
- pulumi_alicloud/dts/instance.py +14 -14
- pulumi_alicloud/eci/container_group.py +47 -0
- pulumi_alicloud/ecs/security_group_rule.py +7 -7
- pulumi_alicloud/ens/load_balancer.py +8 -4
- pulumi_alicloud/esa/__init__.py +1 -0
- pulumi_alicloud/esa/_inputs.py +611 -0
- pulumi_alicloud/esa/cache_rule.py +47 -0
- pulumi_alicloud/esa/certificate.py +21 -54
- pulumi_alicloud/esa/compression_rule.py +47 -0
- pulumi_alicloud/esa/load_balancer.py +999 -0
- pulumi_alicloud/esa/outputs.py +469 -0
- pulumi_alicloud/eventbridge/event_source.py +57 -57
- pulumi_alicloud/ga/_inputs.py +56 -16
- pulumi_alicloud/ga/outputs.py +39 -11
- pulumi_alicloud/lindorm/instance_v2.py +358 -70
- pulumi_alicloud/oss/_inputs.py +53 -0
- pulumi_alicloud/oss/bucket_logging.py +80 -29
- pulumi_alicloud/oss/bucket_replication.py +55 -8
- pulumi_alicloud/oss/outputs.py +31 -0
- pulumi_alicloud/polardb/__init__.py +2 -0
- pulumi_alicloud/polardb/cluster.py +14 -14
- pulumi_alicloud/polardb/zonal_account.py +449 -0
- pulumi_alicloud/polardb/zonal_db_cluster.py +2 -2
- pulumi_alicloud/polardb/zonal_endpoint.py +865 -0
- pulumi_alicloud/pulumi-plugin.json +1 -1
- pulumi_alicloud/ram/policy.py +2 -2
- pulumi_alicloud/resourcemanager/__init__.py +2 -0
- pulumi_alicloud/resourcemanager/_inputs.py +745 -0
- pulumi_alicloud/resourcemanager/delivery_channel.py +449 -0
- pulumi_alicloud/resourcemanager/multi_account_delivery_channel.py +470 -0
- pulumi_alicloud/resourcemanager/outputs.py +643 -0
- pulumi_alicloud/sae/_inputs.py +60 -0
- pulumi_alicloud/sae/application.py +1 -1
- pulumi_alicloud/sae/outputs.py +42 -0
- pulumi_alicloud/sls/__init__.py +1 -0
- pulumi_alicloud/sls/get_indexs.py +304 -0
- pulumi_alicloud/sls/outputs.py +148 -0
- pulumi_alicloud/star_rocks_instance.py +8 -2
- pulumi_alicloud/starrocks/__init__.py +12 -0
- pulumi_alicloud/starrocks/_inputs.py +656 -0
- pulumi_alicloud/starrocks/instance.py +1427 -0
- pulumi_alicloud/starrocks/node_group.py +1298 -0
- pulumi_alicloud/starrocks/outputs.py +508 -0
- pulumi_alicloud/vpc/_inputs.py +84 -0
- pulumi_alicloud/vpc/gateway_endpoint.py +8 -8
- pulumi_alicloud/vpc/network_acl_entries.py +16 -20
- pulumi_alicloud/vpc/outputs.py +48 -0
- pulumi_alicloud/wafv3/_inputs.py +396 -0
- pulumi_alicloud/wafv3/defense_rule.py +40 -110
- pulumi_alicloud/wafv3/outputs.py +303 -0
- {pulumi_alicloud-3.88.0a1761888283.dist-info → pulumi_alicloud-3.88.0a1761969289.dist-info}/METADATA +1 -1
- {pulumi_alicloud-3.88.0a1761888283.dist-info → pulumi_alicloud-3.88.0a1761969289.dist-info}/RECORD +66 -54
- {pulumi_alicloud-3.88.0a1761888283.dist-info → pulumi_alicloud-3.88.0a1761969289.dist-info}/WHEEL +0 -0
- {pulumi_alicloud-3.88.0a1761888283.dist-info → pulumi_alicloud-3.88.0a1761969289.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from .. import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['ZonalEndpointArgs', 'ZonalEndpoint']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class ZonalEndpointArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
db_cluster_id: pulumi.Input[_builtins.str],
|
|
23
|
+
db_cluster_nodes_ids: pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]],
|
|
24
|
+
auto_add_new_nodes: Optional[pulumi.Input[_builtins.str]] = None,
|
|
25
|
+
db_endpoint_description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
26
|
+
endpoint_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
27
|
+
endpoint_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
28
|
+
net_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
29
|
+
nodes_keys: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
30
|
+
read_write_mode: Optional[pulumi.Input[_builtins.str]] = None,
|
|
31
|
+
vpc_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
32
|
+
vswitch_id: Optional[pulumi.Input[_builtins.str]] = None):
|
|
33
|
+
"""
|
|
34
|
+
The set of arguments for constructing a ZonalEndpoint resource.
|
|
35
|
+
:param pulumi.Input[_builtins.str] db_cluster_id: The Id of cluster that can run database.
|
|
36
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] db_cluster_nodes_ids: referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
37
|
+
:param pulumi.Input[_builtins.str] auto_add_new_nodes: Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
38
|
+
:param pulumi.Input[_builtins.str] db_endpoint_description: The name of the endpoint.
|
|
39
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] endpoint_config: 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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
40
|
+
:param pulumi.Input[_builtins.str] endpoint_type: 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`.
|
|
41
|
+
:param pulumi.Input[_builtins.str] net_type: The network type of the endpoint address.
|
|
42
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] nodes_keys: The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
43
|
+
:param pulumi.Input[_builtins.str] read_write_mode: Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
44
|
+
:param pulumi.Input[_builtins.str] vpc_id: The ID of ENS VPC where to use the DB.
|
|
45
|
+
:param pulumi.Input[_builtins.str] vswitch_id: The ID of ENS virtual switch where to use the DB.
|
|
46
|
+
"""
|
|
47
|
+
pulumi.set(__self__, "db_cluster_id", db_cluster_id)
|
|
48
|
+
pulumi.set(__self__, "db_cluster_nodes_ids", db_cluster_nodes_ids)
|
|
49
|
+
if auto_add_new_nodes is not None:
|
|
50
|
+
pulumi.set(__self__, "auto_add_new_nodes", auto_add_new_nodes)
|
|
51
|
+
if db_endpoint_description is not None:
|
|
52
|
+
pulumi.set(__self__, "db_endpoint_description", db_endpoint_description)
|
|
53
|
+
if endpoint_config is not None:
|
|
54
|
+
pulumi.set(__self__, "endpoint_config", endpoint_config)
|
|
55
|
+
if endpoint_type is not None:
|
|
56
|
+
pulumi.set(__self__, "endpoint_type", endpoint_type)
|
|
57
|
+
if net_type is not None:
|
|
58
|
+
pulumi.set(__self__, "net_type", net_type)
|
|
59
|
+
if nodes_keys is not None:
|
|
60
|
+
pulumi.set(__self__, "nodes_keys", nodes_keys)
|
|
61
|
+
if read_write_mode is not None:
|
|
62
|
+
pulumi.set(__self__, "read_write_mode", read_write_mode)
|
|
63
|
+
if vpc_id is not None:
|
|
64
|
+
pulumi.set(__self__, "vpc_id", vpc_id)
|
|
65
|
+
if vswitch_id is not None:
|
|
66
|
+
pulumi.set(__self__, "vswitch_id", vswitch_id)
|
|
67
|
+
|
|
68
|
+
@_builtins.property
|
|
69
|
+
@pulumi.getter(name="dbClusterId")
|
|
70
|
+
def db_cluster_id(self) -> pulumi.Input[_builtins.str]:
|
|
71
|
+
"""
|
|
72
|
+
The Id of cluster that can run database.
|
|
73
|
+
"""
|
|
74
|
+
return pulumi.get(self, "db_cluster_id")
|
|
75
|
+
|
|
76
|
+
@db_cluster_id.setter
|
|
77
|
+
def db_cluster_id(self, value: pulumi.Input[_builtins.str]):
|
|
78
|
+
pulumi.set(self, "db_cluster_id", value)
|
|
79
|
+
|
|
80
|
+
@_builtins.property
|
|
81
|
+
@pulumi.getter(name="dbClusterNodesIds")
|
|
82
|
+
def db_cluster_nodes_ids(self) -> pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]:
|
|
83
|
+
"""
|
|
84
|
+
referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
85
|
+
"""
|
|
86
|
+
return pulumi.get(self, "db_cluster_nodes_ids")
|
|
87
|
+
|
|
88
|
+
@db_cluster_nodes_ids.setter
|
|
89
|
+
def db_cluster_nodes_ids(self, value: pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]):
|
|
90
|
+
pulumi.set(self, "db_cluster_nodes_ids", value)
|
|
91
|
+
|
|
92
|
+
@_builtins.property
|
|
93
|
+
@pulumi.getter(name="autoAddNewNodes")
|
|
94
|
+
def auto_add_new_nodes(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
95
|
+
"""
|
|
96
|
+
Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
97
|
+
"""
|
|
98
|
+
return pulumi.get(self, "auto_add_new_nodes")
|
|
99
|
+
|
|
100
|
+
@auto_add_new_nodes.setter
|
|
101
|
+
def auto_add_new_nodes(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
102
|
+
pulumi.set(self, "auto_add_new_nodes", value)
|
|
103
|
+
|
|
104
|
+
@_builtins.property
|
|
105
|
+
@pulumi.getter(name="dbEndpointDescription")
|
|
106
|
+
def db_endpoint_description(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
107
|
+
"""
|
|
108
|
+
The name of the endpoint.
|
|
109
|
+
"""
|
|
110
|
+
return pulumi.get(self, "db_endpoint_description")
|
|
111
|
+
|
|
112
|
+
@db_endpoint_description.setter
|
|
113
|
+
def db_endpoint_description(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
114
|
+
pulumi.set(self, "db_endpoint_description", value)
|
|
115
|
+
|
|
116
|
+
@_builtins.property
|
|
117
|
+
@pulumi.getter(name="endpointConfig")
|
|
118
|
+
def endpoint_config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
|
|
119
|
+
"""
|
|
120
|
+
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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
121
|
+
"""
|
|
122
|
+
return pulumi.get(self, "endpoint_config")
|
|
123
|
+
|
|
124
|
+
@endpoint_config.setter
|
|
125
|
+
def endpoint_config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
|
|
126
|
+
pulumi.set(self, "endpoint_config", value)
|
|
127
|
+
|
|
128
|
+
@_builtins.property
|
|
129
|
+
@pulumi.getter(name="endpointType")
|
|
130
|
+
def endpoint_type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
131
|
+
"""
|
|
132
|
+
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`.
|
|
133
|
+
"""
|
|
134
|
+
return pulumi.get(self, "endpoint_type")
|
|
135
|
+
|
|
136
|
+
@endpoint_type.setter
|
|
137
|
+
def endpoint_type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
138
|
+
pulumi.set(self, "endpoint_type", value)
|
|
139
|
+
|
|
140
|
+
@_builtins.property
|
|
141
|
+
@pulumi.getter(name="netType")
|
|
142
|
+
def net_type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
143
|
+
"""
|
|
144
|
+
The network type of the endpoint address.
|
|
145
|
+
"""
|
|
146
|
+
return pulumi.get(self, "net_type")
|
|
147
|
+
|
|
148
|
+
@net_type.setter
|
|
149
|
+
def net_type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
150
|
+
pulumi.set(self, "net_type", value)
|
|
151
|
+
|
|
152
|
+
@_builtins.property
|
|
153
|
+
@pulumi.getter(name="nodesKeys")
|
|
154
|
+
def nodes_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
155
|
+
"""
|
|
156
|
+
The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
157
|
+
"""
|
|
158
|
+
return pulumi.get(self, "nodes_keys")
|
|
159
|
+
|
|
160
|
+
@nodes_keys.setter
|
|
161
|
+
def nodes_keys(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
162
|
+
pulumi.set(self, "nodes_keys", value)
|
|
163
|
+
|
|
164
|
+
@_builtins.property
|
|
165
|
+
@pulumi.getter(name="readWriteMode")
|
|
166
|
+
def read_write_mode(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
167
|
+
"""
|
|
168
|
+
Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
169
|
+
"""
|
|
170
|
+
return pulumi.get(self, "read_write_mode")
|
|
171
|
+
|
|
172
|
+
@read_write_mode.setter
|
|
173
|
+
def read_write_mode(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
174
|
+
pulumi.set(self, "read_write_mode", value)
|
|
175
|
+
|
|
176
|
+
@_builtins.property
|
|
177
|
+
@pulumi.getter(name="vpcId")
|
|
178
|
+
def vpc_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
179
|
+
"""
|
|
180
|
+
The ID of ENS VPC where to use the DB.
|
|
181
|
+
"""
|
|
182
|
+
return pulumi.get(self, "vpc_id")
|
|
183
|
+
|
|
184
|
+
@vpc_id.setter
|
|
185
|
+
def vpc_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
186
|
+
pulumi.set(self, "vpc_id", value)
|
|
187
|
+
|
|
188
|
+
@_builtins.property
|
|
189
|
+
@pulumi.getter(name="vswitchId")
|
|
190
|
+
def vswitch_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
191
|
+
"""
|
|
192
|
+
The ID of ENS virtual switch where to use the DB.
|
|
193
|
+
"""
|
|
194
|
+
return pulumi.get(self, "vswitch_id")
|
|
195
|
+
|
|
196
|
+
@vswitch_id.setter
|
|
197
|
+
def vswitch_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
198
|
+
pulumi.set(self, "vswitch_id", value)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
@pulumi.input_type
|
|
202
|
+
class _ZonalEndpointState:
|
|
203
|
+
def __init__(__self__, *,
|
|
204
|
+
auto_add_new_nodes: Optional[pulumi.Input[_builtins.str]] = None,
|
|
205
|
+
connection_prefix: Optional[pulumi.Input[_builtins.str]] = None,
|
|
206
|
+
db_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
207
|
+
db_cluster_nodes_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
208
|
+
db_endpoint_description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
209
|
+
db_endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
210
|
+
endpoint_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
211
|
+
endpoint_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
212
|
+
net_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
213
|
+
nodes: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
214
|
+
nodes_keys: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
215
|
+
port: Optional[pulumi.Input[_builtins.str]] = None,
|
|
216
|
+
read_write_mode: Optional[pulumi.Input[_builtins.str]] = None,
|
|
217
|
+
vpc_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
218
|
+
vswitch_id: Optional[pulumi.Input[_builtins.str]] = None):
|
|
219
|
+
"""
|
|
220
|
+
Input properties used for looking up and filtering ZonalEndpoint resources.
|
|
221
|
+
:param pulumi.Input[_builtins.str] auto_add_new_nodes: Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
222
|
+
:param pulumi.Input[_builtins.str] connection_prefix: 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.
|
|
223
|
+
:param pulumi.Input[_builtins.str] db_cluster_id: The Id of cluster that can run database.
|
|
224
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] db_cluster_nodes_ids: referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
225
|
+
:param pulumi.Input[_builtins.str] db_endpoint_description: The name of the endpoint.
|
|
226
|
+
:param pulumi.Input[_builtins.str] db_endpoint_id: The ID of the cluster endpoint.
|
|
227
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] endpoint_config: 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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
228
|
+
:param pulumi.Input[_builtins.str] endpoint_type: 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`.
|
|
229
|
+
:param pulumi.Input[_builtins.str] net_type: The network type of the endpoint address.
|
|
230
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] nodes: Node id list for endpoint configuration.
|
|
231
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] nodes_keys: The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
232
|
+
:param pulumi.Input[_builtins.str] port: Port of the specified endpoint. Valid values: 3000 to 5999.
|
|
233
|
+
:param pulumi.Input[_builtins.str] read_write_mode: Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
234
|
+
:param pulumi.Input[_builtins.str] vpc_id: The ID of ENS VPC where to use the DB.
|
|
235
|
+
:param pulumi.Input[_builtins.str] vswitch_id: The ID of ENS virtual switch where to use the DB.
|
|
236
|
+
"""
|
|
237
|
+
if auto_add_new_nodes is not None:
|
|
238
|
+
pulumi.set(__self__, "auto_add_new_nodes", auto_add_new_nodes)
|
|
239
|
+
if connection_prefix is not None:
|
|
240
|
+
pulumi.set(__self__, "connection_prefix", connection_prefix)
|
|
241
|
+
if db_cluster_id is not None:
|
|
242
|
+
pulumi.set(__self__, "db_cluster_id", db_cluster_id)
|
|
243
|
+
if db_cluster_nodes_ids is not None:
|
|
244
|
+
pulumi.set(__self__, "db_cluster_nodes_ids", db_cluster_nodes_ids)
|
|
245
|
+
if db_endpoint_description is not None:
|
|
246
|
+
pulumi.set(__self__, "db_endpoint_description", db_endpoint_description)
|
|
247
|
+
if db_endpoint_id is not None:
|
|
248
|
+
pulumi.set(__self__, "db_endpoint_id", db_endpoint_id)
|
|
249
|
+
if endpoint_config is not None:
|
|
250
|
+
pulumi.set(__self__, "endpoint_config", endpoint_config)
|
|
251
|
+
if endpoint_type is not None:
|
|
252
|
+
pulumi.set(__self__, "endpoint_type", endpoint_type)
|
|
253
|
+
if net_type is not None:
|
|
254
|
+
pulumi.set(__self__, "net_type", net_type)
|
|
255
|
+
if nodes is not None:
|
|
256
|
+
pulumi.set(__self__, "nodes", nodes)
|
|
257
|
+
if nodes_keys is not None:
|
|
258
|
+
pulumi.set(__self__, "nodes_keys", nodes_keys)
|
|
259
|
+
if port is not None:
|
|
260
|
+
pulumi.set(__self__, "port", port)
|
|
261
|
+
if read_write_mode is not None:
|
|
262
|
+
pulumi.set(__self__, "read_write_mode", read_write_mode)
|
|
263
|
+
if vpc_id is not None:
|
|
264
|
+
pulumi.set(__self__, "vpc_id", vpc_id)
|
|
265
|
+
if vswitch_id is not None:
|
|
266
|
+
pulumi.set(__self__, "vswitch_id", vswitch_id)
|
|
267
|
+
|
|
268
|
+
@_builtins.property
|
|
269
|
+
@pulumi.getter(name="autoAddNewNodes")
|
|
270
|
+
def auto_add_new_nodes(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
271
|
+
"""
|
|
272
|
+
Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
273
|
+
"""
|
|
274
|
+
return pulumi.get(self, "auto_add_new_nodes")
|
|
275
|
+
|
|
276
|
+
@auto_add_new_nodes.setter
|
|
277
|
+
def auto_add_new_nodes(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
278
|
+
pulumi.set(self, "auto_add_new_nodes", value)
|
|
279
|
+
|
|
280
|
+
@_builtins.property
|
|
281
|
+
@pulumi.getter(name="connectionPrefix")
|
|
282
|
+
def connection_prefix(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
283
|
+
"""
|
|
284
|
+
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.
|
|
285
|
+
"""
|
|
286
|
+
return pulumi.get(self, "connection_prefix")
|
|
287
|
+
|
|
288
|
+
@connection_prefix.setter
|
|
289
|
+
def connection_prefix(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
290
|
+
pulumi.set(self, "connection_prefix", value)
|
|
291
|
+
|
|
292
|
+
@_builtins.property
|
|
293
|
+
@pulumi.getter(name="dbClusterId")
|
|
294
|
+
def db_cluster_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
295
|
+
"""
|
|
296
|
+
The Id of cluster that can run database.
|
|
297
|
+
"""
|
|
298
|
+
return pulumi.get(self, "db_cluster_id")
|
|
299
|
+
|
|
300
|
+
@db_cluster_id.setter
|
|
301
|
+
def db_cluster_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
302
|
+
pulumi.set(self, "db_cluster_id", value)
|
|
303
|
+
|
|
304
|
+
@_builtins.property
|
|
305
|
+
@pulumi.getter(name="dbClusterNodesIds")
|
|
306
|
+
def db_cluster_nodes_ids(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
|
|
307
|
+
"""
|
|
308
|
+
referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
309
|
+
"""
|
|
310
|
+
return pulumi.get(self, "db_cluster_nodes_ids")
|
|
311
|
+
|
|
312
|
+
@db_cluster_nodes_ids.setter
|
|
313
|
+
def db_cluster_nodes_ids(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
|
|
314
|
+
pulumi.set(self, "db_cluster_nodes_ids", value)
|
|
315
|
+
|
|
316
|
+
@_builtins.property
|
|
317
|
+
@pulumi.getter(name="dbEndpointDescription")
|
|
318
|
+
def db_endpoint_description(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
319
|
+
"""
|
|
320
|
+
The name of the endpoint.
|
|
321
|
+
"""
|
|
322
|
+
return pulumi.get(self, "db_endpoint_description")
|
|
323
|
+
|
|
324
|
+
@db_endpoint_description.setter
|
|
325
|
+
def db_endpoint_description(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
326
|
+
pulumi.set(self, "db_endpoint_description", value)
|
|
327
|
+
|
|
328
|
+
@_builtins.property
|
|
329
|
+
@pulumi.getter(name="dbEndpointId")
|
|
330
|
+
def db_endpoint_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
331
|
+
"""
|
|
332
|
+
The ID of the cluster endpoint.
|
|
333
|
+
"""
|
|
334
|
+
return pulumi.get(self, "db_endpoint_id")
|
|
335
|
+
|
|
336
|
+
@db_endpoint_id.setter
|
|
337
|
+
def db_endpoint_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
338
|
+
pulumi.set(self, "db_endpoint_id", value)
|
|
339
|
+
|
|
340
|
+
@_builtins.property
|
|
341
|
+
@pulumi.getter(name="endpointConfig")
|
|
342
|
+
def endpoint_config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
|
|
343
|
+
"""
|
|
344
|
+
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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
345
|
+
"""
|
|
346
|
+
return pulumi.get(self, "endpoint_config")
|
|
347
|
+
|
|
348
|
+
@endpoint_config.setter
|
|
349
|
+
def endpoint_config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
|
|
350
|
+
pulumi.set(self, "endpoint_config", value)
|
|
351
|
+
|
|
352
|
+
@_builtins.property
|
|
353
|
+
@pulumi.getter(name="endpointType")
|
|
354
|
+
def endpoint_type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
355
|
+
"""
|
|
356
|
+
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`.
|
|
357
|
+
"""
|
|
358
|
+
return pulumi.get(self, "endpoint_type")
|
|
359
|
+
|
|
360
|
+
@endpoint_type.setter
|
|
361
|
+
def endpoint_type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
362
|
+
pulumi.set(self, "endpoint_type", value)
|
|
363
|
+
|
|
364
|
+
@_builtins.property
|
|
365
|
+
@pulumi.getter(name="netType")
|
|
366
|
+
def net_type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
367
|
+
"""
|
|
368
|
+
The network type of the endpoint address.
|
|
369
|
+
"""
|
|
370
|
+
return pulumi.get(self, "net_type")
|
|
371
|
+
|
|
372
|
+
@net_type.setter
|
|
373
|
+
def net_type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
374
|
+
pulumi.set(self, "net_type", value)
|
|
375
|
+
|
|
376
|
+
@_builtins.property
|
|
377
|
+
@pulumi.getter
|
|
378
|
+
def nodes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
379
|
+
"""
|
|
380
|
+
Node id list for endpoint configuration.
|
|
381
|
+
"""
|
|
382
|
+
return pulumi.get(self, "nodes")
|
|
383
|
+
|
|
384
|
+
@nodes.setter
|
|
385
|
+
def nodes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
386
|
+
pulumi.set(self, "nodes", value)
|
|
387
|
+
|
|
388
|
+
@_builtins.property
|
|
389
|
+
@pulumi.getter(name="nodesKeys")
|
|
390
|
+
def nodes_keys(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
391
|
+
"""
|
|
392
|
+
The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
393
|
+
"""
|
|
394
|
+
return pulumi.get(self, "nodes_keys")
|
|
395
|
+
|
|
396
|
+
@nodes_keys.setter
|
|
397
|
+
def nodes_keys(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
398
|
+
pulumi.set(self, "nodes_keys", value)
|
|
399
|
+
|
|
400
|
+
@_builtins.property
|
|
401
|
+
@pulumi.getter
|
|
402
|
+
def port(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
403
|
+
"""
|
|
404
|
+
Port of the specified endpoint. Valid values: 3000 to 5999.
|
|
405
|
+
"""
|
|
406
|
+
return pulumi.get(self, "port")
|
|
407
|
+
|
|
408
|
+
@port.setter
|
|
409
|
+
def port(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
410
|
+
pulumi.set(self, "port", value)
|
|
411
|
+
|
|
412
|
+
@_builtins.property
|
|
413
|
+
@pulumi.getter(name="readWriteMode")
|
|
414
|
+
def read_write_mode(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
415
|
+
"""
|
|
416
|
+
Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
417
|
+
"""
|
|
418
|
+
return pulumi.get(self, "read_write_mode")
|
|
419
|
+
|
|
420
|
+
@read_write_mode.setter
|
|
421
|
+
def read_write_mode(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
422
|
+
pulumi.set(self, "read_write_mode", value)
|
|
423
|
+
|
|
424
|
+
@_builtins.property
|
|
425
|
+
@pulumi.getter(name="vpcId")
|
|
426
|
+
def vpc_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
427
|
+
"""
|
|
428
|
+
The ID of ENS VPC where to use the DB.
|
|
429
|
+
"""
|
|
430
|
+
return pulumi.get(self, "vpc_id")
|
|
431
|
+
|
|
432
|
+
@vpc_id.setter
|
|
433
|
+
def vpc_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
434
|
+
pulumi.set(self, "vpc_id", value)
|
|
435
|
+
|
|
436
|
+
@_builtins.property
|
|
437
|
+
@pulumi.getter(name="vswitchId")
|
|
438
|
+
def vswitch_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
439
|
+
"""
|
|
440
|
+
The ID of ENS virtual switch where to use the DB.
|
|
441
|
+
"""
|
|
442
|
+
return pulumi.get(self, "vswitch_id")
|
|
443
|
+
|
|
444
|
+
@vswitch_id.setter
|
|
445
|
+
def vswitch_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
446
|
+
pulumi.set(self, "vswitch_id", value)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
@pulumi.type_token("alicloud:polardb/zonalEndpoint:ZonalEndpoint")
|
|
450
|
+
class ZonalEndpoint(pulumi.CustomResource):
|
|
451
|
+
@overload
|
|
452
|
+
def __init__(__self__,
|
|
453
|
+
resource_name: str,
|
|
454
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
455
|
+
auto_add_new_nodes: Optional[pulumi.Input[_builtins.str]] = None,
|
|
456
|
+
db_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
457
|
+
db_cluster_nodes_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
458
|
+
db_endpoint_description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
459
|
+
endpoint_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
460
|
+
endpoint_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
461
|
+
net_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
462
|
+
nodes_keys: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
463
|
+
read_write_mode: Optional[pulumi.Input[_builtins.str]] = None,
|
|
464
|
+
vpc_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
465
|
+
vswitch_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
466
|
+
__props__=None):
|
|
467
|
+
"""
|
|
468
|
+
Provides a PolarDB Zonal endpoint resource to manage custom endpoint of PolarDB cluster.
|
|
469
|
+
|
|
470
|
+
> **NOTE:** Available since v1.262.0.
|
|
471
|
+
**NOTE:** The primary endpoint and the default cluster endpoint can not be created or deleted manually.
|
|
472
|
+
|
|
473
|
+
## Example Usage
|
|
474
|
+
|
|
475
|
+
```python
|
|
476
|
+
import pulumi
|
|
477
|
+
import json
|
|
478
|
+
import pulumi_alicloud as alicloud
|
|
479
|
+
|
|
480
|
+
config = pulumi.Config()
|
|
481
|
+
# 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.
|
|
482
|
+
db_cluster_nodes_configs = config.get_object("dbClusterNodesConfigs")
|
|
483
|
+
if db_cluster_nodes_configs is None:
|
|
484
|
+
db_cluster_nodes_configs = {
|
|
485
|
+
"db_node_1": {
|
|
486
|
+
"dbNodeClass": "polar.mysql.x4.medium.c",
|
|
487
|
+
"dbNodeRole": "Writer",
|
|
488
|
+
"hotReplicaMode": None,
|
|
489
|
+
"imciSwitch": None,
|
|
490
|
+
},
|
|
491
|
+
"db_node_2": {
|
|
492
|
+
"dbNodeClass": "polar.mysql.x4.medium.c",
|
|
493
|
+
"dbNodeRole": "Reader",
|
|
494
|
+
"hotReplicaMode": None,
|
|
495
|
+
"imciSwitch": None,
|
|
496
|
+
},
|
|
497
|
+
}
|
|
498
|
+
default = alicloud.ens.Network("default",
|
|
499
|
+
network_name="terraform-example",
|
|
500
|
+
description="LoadBalancerNetworkDescription_test",
|
|
501
|
+
cidr_block="192.168.2.0/24",
|
|
502
|
+
ens_region_id="tr-Istanbul-1")
|
|
503
|
+
default_vswitch = alicloud.ens.Vswitch("default",
|
|
504
|
+
description="LoadBalancerVSwitchDescription_test",
|
|
505
|
+
cidr_block="192.168.2.0/24",
|
|
506
|
+
vswitch_name="terraform-example",
|
|
507
|
+
ens_region_id="tr-Istanbul-1",
|
|
508
|
+
network_id=default.id)
|
|
509
|
+
default_zonal_db_cluster = alicloud.polardb.ZonalDbCluster("default",
|
|
510
|
+
db_node_class="polar.mysql.x4.medium.c",
|
|
511
|
+
description="terraform-example",
|
|
512
|
+
ens_region_id="tr-Istanbul-1",
|
|
513
|
+
vpc_id=default.id,
|
|
514
|
+
vswitch_id=default_vswitch.id,
|
|
515
|
+
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})
|
|
516
|
+
default_zonal_endpoint = alicloud.polardb.ZonalEndpoint("default",
|
|
517
|
+
db_cluster_id=default_zonal_db_cluster.id,
|
|
518
|
+
db_cluster_nodes_ids=default_zonal_db_cluster.db_cluster_nodes_ids,
|
|
519
|
+
endpoint_config={},
|
|
520
|
+
nodes_keys=[
|
|
521
|
+
"db_node_1",
|
|
522
|
+
"db_node_2",
|
|
523
|
+
],
|
|
524
|
+
read_write_mode="ReadWrite")
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
## Import
|
|
528
|
+
|
|
529
|
+
PolarDB Zonal endpoint can be imported using the id, e.g.
|
|
530
|
+
|
|
531
|
+
```sh
|
|
532
|
+
$ pulumi import alicloud:polardb/zonalEndpoint:ZonalEndpoint example pc-abc123456:pe-abc123456
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
:param str resource_name: The name of the resource.
|
|
536
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
537
|
+
:param pulumi.Input[_builtins.str] auto_add_new_nodes: Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
538
|
+
:param pulumi.Input[_builtins.str] db_cluster_id: The Id of cluster that can run database.
|
|
539
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] db_cluster_nodes_ids: referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
540
|
+
:param pulumi.Input[_builtins.str] db_endpoint_description: The name of the endpoint.
|
|
541
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] endpoint_config: 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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
542
|
+
:param pulumi.Input[_builtins.str] endpoint_type: 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`.
|
|
543
|
+
:param pulumi.Input[_builtins.str] net_type: The network type of the endpoint address.
|
|
544
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] nodes_keys: The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
545
|
+
:param pulumi.Input[_builtins.str] read_write_mode: Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
546
|
+
:param pulumi.Input[_builtins.str] vpc_id: The ID of ENS VPC where to use the DB.
|
|
547
|
+
:param pulumi.Input[_builtins.str] vswitch_id: The ID of ENS virtual switch where to use the DB.
|
|
548
|
+
"""
|
|
549
|
+
...
|
|
550
|
+
@overload
|
|
551
|
+
def __init__(__self__,
|
|
552
|
+
resource_name: str,
|
|
553
|
+
args: ZonalEndpointArgs,
|
|
554
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
555
|
+
"""
|
|
556
|
+
Provides a PolarDB Zonal endpoint resource to manage custom endpoint of PolarDB cluster.
|
|
557
|
+
|
|
558
|
+
> **NOTE:** Available since v1.262.0.
|
|
559
|
+
**NOTE:** The primary endpoint and the default cluster endpoint can not be created or deleted manually.
|
|
560
|
+
|
|
561
|
+
## Example Usage
|
|
562
|
+
|
|
563
|
+
```python
|
|
564
|
+
import pulumi
|
|
565
|
+
import json
|
|
566
|
+
import pulumi_alicloud as alicloud
|
|
567
|
+
|
|
568
|
+
config = pulumi.Config()
|
|
569
|
+
# 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.
|
|
570
|
+
db_cluster_nodes_configs = config.get_object("dbClusterNodesConfigs")
|
|
571
|
+
if db_cluster_nodes_configs is None:
|
|
572
|
+
db_cluster_nodes_configs = {
|
|
573
|
+
"db_node_1": {
|
|
574
|
+
"dbNodeClass": "polar.mysql.x4.medium.c",
|
|
575
|
+
"dbNodeRole": "Writer",
|
|
576
|
+
"hotReplicaMode": None,
|
|
577
|
+
"imciSwitch": None,
|
|
578
|
+
},
|
|
579
|
+
"db_node_2": {
|
|
580
|
+
"dbNodeClass": "polar.mysql.x4.medium.c",
|
|
581
|
+
"dbNodeRole": "Reader",
|
|
582
|
+
"hotReplicaMode": None,
|
|
583
|
+
"imciSwitch": None,
|
|
584
|
+
},
|
|
585
|
+
}
|
|
586
|
+
default = alicloud.ens.Network("default",
|
|
587
|
+
network_name="terraform-example",
|
|
588
|
+
description="LoadBalancerNetworkDescription_test",
|
|
589
|
+
cidr_block="192.168.2.0/24",
|
|
590
|
+
ens_region_id="tr-Istanbul-1")
|
|
591
|
+
default_vswitch = alicloud.ens.Vswitch("default",
|
|
592
|
+
description="LoadBalancerVSwitchDescription_test",
|
|
593
|
+
cidr_block="192.168.2.0/24",
|
|
594
|
+
vswitch_name="terraform-example",
|
|
595
|
+
ens_region_id="tr-Istanbul-1",
|
|
596
|
+
network_id=default.id)
|
|
597
|
+
default_zonal_db_cluster = alicloud.polardb.ZonalDbCluster("default",
|
|
598
|
+
db_node_class="polar.mysql.x4.medium.c",
|
|
599
|
+
description="terraform-example",
|
|
600
|
+
ens_region_id="tr-Istanbul-1",
|
|
601
|
+
vpc_id=default.id,
|
|
602
|
+
vswitch_id=default_vswitch.id,
|
|
603
|
+
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})
|
|
604
|
+
default_zonal_endpoint = alicloud.polardb.ZonalEndpoint("default",
|
|
605
|
+
db_cluster_id=default_zonal_db_cluster.id,
|
|
606
|
+
db_cluster_nodes_ids=default_zonal_db_cluster.db_cluster_nodes_ids,
|
|
607
|
+
endpoint_config={},
|
|
608
|
+
nodes_keys=[
|
|
609
|
+
"db_node_1",
|
|
610
|
+
"db_node_2",
|
|
611
|
+
],
|
|
612
|
+
read_write_mode="ReadWrite")
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
## Import
|
|
616
|
+
|
|
617
|
+
PolarDB Zonal endpoint can be imported using the id, e.g.
|
|
618
|
+
|
|
619
|
+
```sh
|
|
620
|
+
$ pulumi import alicloud:polardb/zonalEndpoint:ZonalEndpoint example pc-abc123456:pe-abc123456
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
:param str resource_name: The name of the resource.
|
|
624
|
+
:param ZonalEndpointArgs args: The arguments to use to populate this resource's properties.
|
|
625
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
626
|
+
"""
|
|
627
|
+
...
|
|
628
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
629
|
+
resource_args, opts = _utilities.get_resource_args_opts(ZonalEndpointArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
630
|
+
if resource_args is not None:
|
|
631
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
632
|
+
else:
|
|
633
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
634
|
+
|
|
635
|
+
def _internal_init(__self__,
|
|
636
|
+
resource_name: str,
|
|
637
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
638
|
+
auto_add_new_nodes: Optional[pulumi.Input[_builtins.str]] = None,
|
|
639
|
+
db_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
640
|
+
db_cluster_nodes_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
641
|
+
db_endpoint_description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
642
|
+
endpoint_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
643
|
+
endpoint_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
644
|
+
net_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
645
|
+
nodes_keys: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
646
|
+
read_write_mode: Optional[pulumi.Input[_builtins.str]] = None,
|
|
647
|
+
vpc_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
648
|
+
vswitch_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
649
|
+
__props__=None):
|
|
650
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
651
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
652
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
653
|
+
if opts.id is None:
|
|
654
|
+
if __props__ is not None:
|
|
655
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
656
|
+
__props__ = ZonalEndpointArgs.__new__(ZonalEndpointArgs)
|
|
657
|
+
|
|
658
|
+
__props__.__dict__["auto_add_new_nodes"] = auto_add_new_nodes
|
|
659
|
+
if db_cluster_id is None and not opts.urn:
|
|
660
|
+
raise TypeError("Missing required property 'db_cluster_id'")
|
|
661
|
+
__props__.__dict__["db_cluster_id"] = db_cluster_id
|
|
662
|
+
if db_cluster_nodes_ids is None and not opts.urn:
|
|
663
|
+
raise TypeError("Missing required property 'db_cluster_nodes_ids'")
|
|
664
|
+
__props__.__dict__["db_cluster_nodes_ids"] = db_cluster_nodes_ids
|
|
665
|
+
__props__.__dict__["db_endpoint_description"] = db_endpoint_description
|
|
666
|
+
__props__.__dict__["endpoint_config"] = endpoint_config
|
|
667
|
+
__props__.__dict__["endpoint_type"] = endpoint_type
|
|
668
|
+
__props__.__dict__["net_type"] = net_type
|
|
669
|
+
__props__.__dict__["nodes_keys"] = nodes_keys
|
|
670
|
+
__props__.__dict__["read_write_mode"] = read_write_mode
|
|
671
|
+
__props__.__dict__["vpc_id"] = vpc_id
|
|
672
|
+
__props__.__dict__["vswitch_id"] = vswitch_id
|
|
673
|
+
__props__.__dict__["connection_prefix"] = None
|
|
674
|
+
__props__.__dict__["db_endpoint_id"] = None
|
|
675
|
+
__props__.__dict__["nodes"] = None
|
|
676
|
+
__props__.__dict__["port"] = None
|
|
677
|
+
super(ZonalEndpoint, __self__).__init__(
|
|
678
|
+
'alicloud:polardb/zonalEndpoint:ZonalEndpoint',
|
|
679
|
+
resource_name,
|
|
680
|
+
__props__,
|
|
681
|
+
opts)
|
|
682
|
+
|
|
683
|
+
@staticmethod
|
|
684
|
+
def get(resource_name: str,
|
|
685
|
+
id: pulumi.Input[str],
|
|
686
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
687
|
+
auto_add_new_nodes: Optional[pulumi.Input[_builtins.str]] = None,
|
|
688
|
+
connection_prefix: Optional[pulumi.Input[_builtins.str]] = None,
|
|
689
|
+
db_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
690
|
+
db_cluster_nodes_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
691
|
+
db_endpoint_description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
692
|
+
db_endpoint_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
693
|
+
endpoint_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
|
|
694
|
+
endpoint_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
695
|
+
net_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
696
|
+
nodes: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
697
|
+
nodes_keys: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
698
|
+
port: Optional[pulumi.Input[_builtins.str]] = None,
|
|
699
|
+
read_write_mode: Optional[pulumi.Input[_builtins.str]] = None,
|
|
700
|
+
vpc_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
701
|
+
vswitch_id: Optional[pulumi.Input[_builtins.str]] = None) -> 'ZonalEndpoint':
|
|
702
|
+
"""
|
|
703
|
+
Get an existing ZonalEndpoint resource's state with the given name, id, and optional extra
|
|
704
|
+
properties used to qualify the lookup.
|
|
705
|
+
|
|
706
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
707
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
708
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
709
|
+
:param pulumi.Input[_builtins.str] auto_add_new_nodes: Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
710
|
+
:param pulumi.Input[_builtins.str] connection_prefix: 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.
|
|
711
|
+
:param pulumi.Input[_builtins.str] db_cluster_id: The Id of cluster that can run database.
|
|
712
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] db_cluster_nodes_ids: referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
713
|
+
:param pulumi.Input[_builtins.str] db_endpoint_description: The name of the endpoint.
|
|
714
|
+
:param pulumi.Input[_builtins.str] db_endpoint_id: The ID of the cluster endpoint.
|
|
715
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] endpoint_config: 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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
716
|
+
:param pulumi.Input[_builtins.str] endpoint_type: 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`.
|
|
717
|
+
:param pulumi.Input[_builtins.str] net_type: The network type of the endpoint address.
|
|
718
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] nodes: Node id list for endpoint configuration.
|
|
719
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] nodes_keys: The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
720
|
+
:param pulumi.Input[_builtins.str] port: Port of the specified endpoint. Valid values: 3000 to 5999.
|
|
721
|
+
:param pulumi.Input[_builtins.str] read_write_mode: Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
722
|
+
:param pulumi.Input[_builtins.str] vpc_id: The ID of ENS VPC where to use the DB.
|
|
723
|
+
:param pulumi.Input[_builtins.str] vswitch_id: The ID of ENS virtual switch where to use the DB.
|
|
724
|
+
"""
|
|
725
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
726
|
+
|
|
727
|
+
__props__ = _ZonalEndpointState.__new__(_ZonalEndpointState)
|
|
728
|
+
|
|
729
|
+
__props__.__dict__["auto_add_new_nodes"] = auto_add_new_nodes
|
|
730
|
+
__props__.__dict__["connection_prefix"] = connection_prefix
|
|
731
|
+
__props__.__dict__["db_cluster_id"] = db_cluster_id
|
|
732
|
+
__props__.__dict__["db_cluster_nodes_ids"] = db_cluster_nodes_ids
|
|
733
|
+
__props__.__dict__["db_endpoint_description"] = db_endpoint_description
|
|
734
|
+
__props__.__dict__["db_endpoint_id"] = db_endpoint_id
|
|
735
|
+
__props__.__dict__["endpoint_config"] = endpoint_config
|
|
736
|
+
__props__.__dict__["endpoint_type"] = endpoint_type
|
|
737
|
+
__props__.__dict__["net_type"] = net_type
|
|
738
|
+
__props__.__dict__["nodes"] = nodes
|
|
739
|
+
__props__.__dict__["nodes_keys"] = nodes_keys
|
|
740
|
+
__props__.__dict__["port"] = port
|
|
741
|
+
__props__.__dict__["read_write_mode"] = read_write_mode
|
|
742
|
+
__props__.__dict__["vpc_id"] = vpc_id
|
|
743
|
+
__props__.__dict__["vswitch_id"] = vswitch_id
|
|
744
|
+
return ZonalEndpoint(resource_name, opts=opts, __props__=__props__)
|
|
745
|
+
|
|
746
|
+
@_builtins.property
|
|
747
|
+
@pulumi.getter(name="autoAddNewNodes")
|
|
748
|
+
def auto_add_new_nodes(self) -> pulumi.Output[_builtins.str]:
|
|
749
|
+
"""
|
|
750
|
+
Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Enable`.
|
|
751
|
+
"""
|
|
752
|
+
return pulumi.get(self, "auto_add_new_nodes")
|
|
753
|
+
|
|
754
|
+
@_builtins.property
|
|
755
|
+
@pulumi.getter(name="connectionPrefix")
|
|
756
|
+
def connection_prefix(self) -> pulumi.Output[_builtins.str]:
|
|
757
|
+
"""
|
|
758
|
+
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.
|
|
759
|
+
"""
|
|
760
|
+
return pulumi.get(self, "connection_prefix")
|
|
761
|
+
|
|
762
|
+
@_builtins.property
|
|
763
|
+
@pulumi.getter(name="dbClusterId")
|
|
764
|
+
def db_cluster_id(self) -> pulumi.Output[_builtins.str]:
|
|
765
|
+
"""
|
|
766
|
+
The Id of cluster that can run database.
|
|
767
|
+
"""
|
|
768
|
+
return pulumi.get(self, "db_cluster_id")
|
|
769
|
+
|
|
770
|
+
@_builtins.property
|
|
771
|
+
@pulumi.getter(name="dbClusterNodesIds")
|
|
772
|
+
def db_cluster_nodes_ids(self) -> pulumi.Output[Mapping[str, _builtins.str]]:
|
|
773
|
+
"""
|
|
774
|
+
referenced from the db_cluster_nodes_ids attribute of alicloud_polardb_zonal_db_cluster..
|
|
775
|
+
"""
|
|
776
|
+
return pulumi.get(self, "db_cluster_nodes_ids")
|
|
777
|
+
|
|
778
|
+
@_builtins.property
|
|
779
|
+
@pulumi.getter(name="dbEndpointDescription")
|
|
780
|
+
def db_endpoint_description(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
781
|
+
"""
|
|
782
|
+
The name of the endpoint.
|
|
783
|
+
"""
|
|
784
|
+
return pulumi.get(self, "db_endpoint_description")
|
|
785
|
+
|
|
786
|
+
@_builtins.property
|
|
787
|
+
@pulumi.getter(name="dbEndpointId")
|
|
788
|
+
def db_endpoint_id(self) -> pulumi.Output[_builtins.str]:
|
|
789
|
+
"""
|
|
790
|
+
The ID of the cluster endpoint.
|
|
791
|
+
"""
|
|
792
|
+
return pulumi.get(self, "db_endpoint_id")
|
|
793
|
+
|
|
794
|
+
@_builtins.property
|
|
795
|
+
@pulumi.getter(name="endpointConfig")
|
|
796
|
+
def endpoint_config(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
|
|
797
|
+
"""
|
|
798
|
+
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](https://www.alibabacloud.com/help/doc-detail/116593.htm).
|
|
799
|
+
"""
|
|
800
|
+
return pulumi.get(self, "endpoint_config")
|
|
801
|
+
|
|
802
|
+
@_builtins.property
|
|
803
|
+
@pulumi.getter(name="endpointType")
|
|
804
|
+
def endpoint_type(self) -> pulumi.Output[_builtins.str]:
|
|
805
|
+
"""
|
|
806
|
+
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`.
|
|
807
|
+
"""
|
|
808
|
+
return pulumi.get(self, "endpoint_type")
|
|
809
|
+
|
|
810
|
+
@_builtins.property
|
|
811
|
+
@pulumi.getter(name="netType")
|
|
812
|
+
def net_type(self) -> pulumi.Output[_builtins.str]:
|
|
813
|
+
"""
|
|
814
|
+
The network type of the endpoint address.
|
|
815
|
+
"""
|
|
816
|
+
return pulumi.get(self, "net_type")
|
|
817
|
+
|
|
818
|
+
@_builtins.property
|
|
819
|
+
@pulumi.getter
|
|
820
|
+
def nodes(self) -> pulumi.Output[Sequence[_builtins.str]]:
|
|
821
|
+
"""
|
|
822
|
+
Node id list for endpoint configuration.
|
|
823
|
+
"""
|
|
824
|
+
return pulumi.get(self, "nodes")
|
|
825
|
+
|
|
826
|
+
@_builtins.property
|
|
827
|
+
@pulumi.getter(name="nodesKeys")
|
|
828
|
+
def nodes_keys(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
|
|
829
|
+
"""
|
|
830
|
+
The list of backend nodes for the endpoint, with the attribute values derived from the map key of db_cluster_nodes_ids.
|
|
831
|
+
"""
|
|
832
|
+
return pulumi.get(self, "nodes_keys")
|
|
833
|
+
|
|
834
|
+
@_builtins.property
|
|
835
|
+
@pulumi.getter
|
|
836
|
+
def port(self) -> pulumi.Output[_builtins.str]:
|
|
837
|
+
"""
|
|
838
|
+
Port of the specified endpoint. Valid values: 3000 to 5999.
|
|
839
|
+
"""
|
|
840
|
+
return pulumi.get(self, "port")
|
|
841
|
+
|
|
842
|
+
@_builtins.property
|
|
843
|
+
@pulumi.getter(name="readWriteMode")
|
|
844
|
+
def read_write_mode(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
845
|
+
"""
|
|
846
|
+
Read or write mode. Valid values are `ReadWrite`, `ReadOnly`. When creating a new custom endpoint, default to `ReadOnly`.
|
|
847
|
+
"""
|
|
848
|
+
return pulumi.get(self, "read_write_mode")
|
|
849
|
+
|
|
850
|
+
@_builtins.property
|
|
851
|
+
@pulumi.getter(name="vpcId")
|
|
852
|
+
def vpc_id(self) -> pulumi.Output[_builtins.str]:
|
|
853
|
+
"""
|
|
854
|
+
The ID of ENS VPC where to use the DB.
|
|
855
|
+
"""
|
|
856
|
+
return pulumi.get(self, "vpc_id")
|
|
857
|
+
|
|
858
|
+
@_builtins.property
|
|
859
|
+
@pulumi.getter(name="vswitchId")
|
|
860
|
+
def vswitch_id(self) -> pulumi.Output[_builtins.str]:
|
|
861
|
+
"""
|
|
862
|
+
The ID of ENS virtual switch where to use the DB.
|
|
863
|
+
"""
|
|
864
|
+
return pulumi.get(self, "vswitch_id")
|
|
865
|
+
|