pulumi-alicloud 3.60.0a1721884766__py3-none-any.whl → 3.60.0a1721952598__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.
Files changed (32) hide show
  1. pulumi_alicloud/_utilities.py +2 -0
  2. pulumi_alicloud/cen/get_transit_router_service.py +2 -2
  3. pulumi_alicloud/cloudfirewall/control_policy_order.py +60 -44
  4. pulumi_alicloud/cs/node_pool.py +7 -7
  5. pulumi_alicloud/dcdn/_inputs.py +23 -27
  6. pulumi_alicloud/dcdn/domain.py +366 -217
  7. pulumi_alicloud/dcdn/outputs.py +18 -22
  8. pulumi_alicloud/directmail/get_domains.py +31 -24
  9. pulumi_alicloud/directmail/outputs.py +131 -32
  10. pulumi_alicloud/eci/_inputs.py +8 -0
  11. pulumi_alicloud/eci/outputs.py +8 -0
  12. pulumi_alicloud/ecs/_inputs.py +40 -8
  13. pulumi_alicloud/ecs/ecs_disk.py +7 -0
  14. pulumi_alicloud/ecs/instance.py +304 -102
  15. pulumi_alicloud/ecs/outputs.py +37 -9
  16. pulumi_alicloud/maxcompute/_inputs.py +44 -42
  17. pulumi_alicloud/maxcompute/outputs.py +44 -42
  18. pulumi_alicloud/maxcompute/project.py +230 -66
  19. pulumi_alicloud/polardb/cluster.py +28 -28
  20. pulumi_alicloud/pulumi-plugin.json +1 -1
  21. pulumi_alicloud/rdc/organization.py +2 -2
  22. pulumi_alicloud/slb/_inputs.py +8 -8
  23. pulumi_alicloud/slb/outputs.py +8 -8
  24. pulumi_alicloud/slb/server_group.py +140 -84
  25. pulumi_alicloud/vpc/_inputs.py +18 -12
  26. pulumi_alicloud/vpc/network.py +332 -134
  27. pulumi_alicloud/vpc/outputs.py +18 -12
  28. pulumi_alicloud/vpc/public_ip_address_pool.py +118 -10
  29. {pulumi_alicloud-3.60.0a1721884766.dist-info → pulumi_alicloud-3.60.0a1721952598.dist-info}/METADATA +1 -1
  30. {pulumi_alicloud-3.60.0a1721884766.dist-info → pulumi_alicloud-3.60.0a1721952598.dist-info}/RECORD +32 -32
  31. {pulumi_alicloud-3.60.0a1721884766.dist-info → pulumi_alicloud-3.60.0a1721952598.dist-info}/WHEEL +0 -0
  32. {pulumi_alicloud-3.60.0a1721884766.dist-info → pulumi_alicloud-3.60.0a1721952598.dist-info}/top_level.txt +0 -0
@@ -19,13 +19,16 @@ class ServerGroupArgs:
19
19
  load_balancer_id: pulumi.Input[str],
20
20
  delete_protection_validation: Optional[pulumi.Input[bool]] = None,
21
21
  name: Optional[pulumi.Input[str]] = None,
22
- servers: Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]] = None):
22
+ servers: Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]] = None,
23
+ tags: Optional[pulumi.Input[Mapping[str, Any]]] = None):
23
24
  """
24
25
  The set of arguments for constructing a ServerGroup resource.
25
- :param pulumi.Input[str] load_balancer_id: The Load Balancer ID which is used to launch a new virtual server group.
26
- :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
27
- :param pulumi.Input[str] name: Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
28
- :param pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]] servers: A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
26
+ :param pulumi.Input[str] load_balancer_id: The ID of the Server Load Balancer (SLB) instance.
27
+ :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
28
+ :param pulumi.Input[str] name: The name of the vServer group. Default value: `tf-server-group`.
29
+ :param pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]] servers: The list of backend servers to be added. See `servers` below.
30
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
31
+ :param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
29
32
  """
30
33
  pulumi.set(__self__, "load_balancer_id", load_balancer_id)
31
34
  if delete_protection_validation is not None:
@@ -33,16 +36,18 @@ class ServerGroupArgs:
33
36
  if name is not None:
34
37
  pulumi.set(__self__, "name", name)
35
38
  if servers is not None:
36
- warnings.warn("""Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""", DeprecationWarning)
37
- pulumi.log.warn("""servers is deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""")
39
+ warnings.warn("""Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""", DeprecationWarning)
40
+ pulumi.log.warn("""servers is deprecated: Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""")
38
41
  if servers is not None:
39
42
  pulumi.set(__self__, "servers", servers)
43
+ if tags is not None:
44
+ pulumi.set(__self__, "tags", tags)
40
45
 
41
46
  @property
42
47
  @pulumi.getter(name="loadBalancerId")
43
48
  def load_balancer_id(self) -> pulumi.Input[str]:
44
49
  """
45
- The Load Balancer ID which is used to launch a new virtual server group.
50
+ The ID of the Server Load Balancer (SLB) instance.
46
51
  """
47
52
  return pulumi.get(self, "load_balancer_id")
48
53
 
@@ -54,7 +59,7 @@ class ServerGroupArgs:
54
59
  @pulumi.getter(name="deleteProtectionValidation")
55
60
  def delete_protection_validation(self) -> Optional[pulumi.Input[bool]]:
56
61
  """
57
- Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
62
+ Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
58
63
  """
59
64
  return pulumi.get(self, "delete_protection_validation")
60
65
 
@@ -66,7 +71,7 @@ class ServerGroupArgs:
66
71
  @pulumi.getter
67
72
  def name(self) -> Optional[pulumi.Input[str]]:
68
73
  """
69
- Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
74
+ The name of the vServer group. Default value: `tf-server-group`.
70
75
  """
71
76
  return pulumi.get(self, "name")
72
77
 
@@ -76,10 +81,11 @@ class ServerGroupArgs:
76
81
 
77
82
  @property
78
83
  @pulumi.getter
79
- @_utilities.deprecated("""Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""")
84
+ @_utilities.deprecated("""Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""")
80
85
  def servers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]]:
81
86
  """
82
- A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
87
+ The list of backend servers to be added. See `servers` below.
88
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
83
89
  """
84
90
  return pulumi.get(self, "servers")
85
91
 
@@ -87,6 +93,18 @@ class ServerGroupArgs:
87
93
  def servers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]]):
88
94
  pulumi.set(self, "servers", value)
89
95
 
96
+ @property
97
+ @pulumi.getter
98
+ def tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
99
+ """
100
+ A mapping of tags to assign to the resource.
101
+ """
102
+ return pulumi.get(self, "tags")
103
+
104
+ @tags.setter
105
+ def tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
106
+ pulumi.set(self, "tags", value)
107
+
90
108
 
91
109
  @pulumi.input_type
92
110
  class _ServerGroupState:
@@ -94,13 +112,16 @@ class _ServerGroupState:
94
112
  delete_protection_validation: Optional[pulumi.Input[bool]] = None,
95
113
  load_balancer_id: Optional[pulumi.Input[str]] = None,
96
114
  name: Optional[pulumi.Input[str]] = None,
97
- servers: Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]] = None):
115
+ servers: Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]] = None,
116
+ tags: Optional[pulumi.Input[Mapping[str, Any]]] = None):
98
117
  """
99
118
  Input properties used for looking up and filtering ServerGroup resources.
100
- :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
101
- :param pulumi.Input[str] load_balancer_id: The Load Balancer ID which is used to launch a new virtual server group.
102
- :param pulumi.Input[str] name: Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
103
- :param pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]] servers: A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
119
+ :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
120
+ :param pulumi.Input[str] load_balancer_id: The ID of the Server Load Balancer (SLB) instance.
121
+ :param pulumi.Input[str] name: The name of the vServer group. Default value: `tf-server-group`.
122
+ :param pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]] servers: The list of backend servers to be added. See `servers` below.
123
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
124
+ :param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
104
125
  """
105
126
  if delete_protection_validation is not None:
106
127
  pulumi.set(__self__, "delete_protection_validation", delete_protection_validation)
@@ -109,16 +130,18 @@ class _ServerGroupState:
109
130
  if name is not None:
110
131
  pulumi.set(__self__, "name", name)
111
132
  if servers is not None:
112
- warnings.warn("""Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""", DeprecationWarning)
113
- pulumi.log.warn("""servers is deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""")
133
+ warnings.warn("""Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""", DeprecationWarning)
134
+ pulumi.log.warn("""servers is deprecated: Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""")
114
135
  if servers is not None:
115
136
  pulumi.set(__self__, "servers", servers)
137
+ if tags is not None:
138
+ pulumi.set(__self__, "tags", tags)
116
139
 
117
140
  @property
118
141
  @pulumi.getter(name="deleteProtectionValidation")
119
142
  def delete_protection_validation(self) -> Optional[pulumi.Input[bool]]:
120
143
  """
121
- Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
144
+ Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
122
145
  """
123
146
  return pulumi.get(self, "delete_protection_validation")
124
147
 
@@ -130,7 +153,7 @@ class _ServerGroupState:
130
153
  @pulumi.getter(name="loadBalancerId")
131
154
  def load_balancer_id(self) -> Optional[pulumi.Input[str]]:
132
155
  """
133
- The Load Balancer ID which is used to launch a new virtual server group.
156
+ The ID of the Server Load Balancer (SLB) instance.
134
157
  """
135
158
  return pulumi.get(self, "load_balancer_id")
136
159
 
@@ -142,7 +165,7 @@ class _ServerGroupState:
142
165
  @pulumi.getter
143
166
  def name(self) -> Optional[pulumi.Input[str]]:
144
167
  """
145
- Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
168
+ The name of the vServer group. Default value: `tf-server-group`.
146
169
  """
147
170
  return pulumi.get(self, "name")
148
171
 
@@ -152,10 +175,11 @@ class _ServerGroupState:
152
175
 
153
176
  @property
154
177
  @pulumi.getter
155
- @_utilities.deprecated("""Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""")
178
+ @_utilities.deprecated("""Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""")
156
179
  def servers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]]:
157
180
  """
158
- A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
181
+ The list of backend servers to be added. See `servers` below.
182
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
159
183
  """
160
184
  return pulumi.get(self, "servers")
161
185
 
@@ -163,6 +187,18 @@ class _ServerGroupState:
163
187
  def servers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServerGroupServerArgs']]]]):
164
188
  pulumi.set(self, "servers", value)
165
189
 
190
+ @property
191
+ @pulumi.getter
192
+ def tags(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
193
+ """
194
+ A mapping of tags to assign to the resource.
195
+ """
196
+ return pulumi.get(self, "tags")
197
+
198
+ @tags.setter
199
+ def tags(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
200
+ pulumi.set(self, "tags", value)
201
+
166
202
 
167
203
  class ServerGroup(pulumi.CustomResource):
168
204
  @overload
@@ -173,10 +209,12 @@ class ServerGroup(pulumi.CustomResource):
173
209
  load_balancer_id: Optional[pulumi.Input[str]] = None,
174
210
  name: Optional[pulumi.Input[str]] = None,
175
211
  servers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]]] = None,
212
+ tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
176
213
  __props__=None):
177
214
  """
178
- A virtual server group contains several ECS instances. The virtual server group can help you to define multiple listening dimension,
179
- and to meet the personalized requirements of domain name and URL forwarding.
215
+ Provides a Load Balancer Virtual Backend Server Group resource.
216
+
217
+ For information about Load Balancer Virtual Backend Server Group and how to use it, see [What is Virtual Backend Server Group](https://www.alibabacloud.com/help/en/doc-detail/35215.html).
180
218
 
181
219
  > **NOTE:** Available since v1.6.0.
182
220
 
@@ -190,50 +228,52 @@ class ServerGroup(pulumi.CustomResource):
190
228
 
191
229
  > **NOTE:** One VPC load balancer, its virtual server group can only add the same VPC ECS instances.
192
230
 
193
- For information about server group and how to use it, see [Configure a server group](https://www.alibabacloud.com/help/en/doc-detail/35215.html).
194
-
195
231
  ## Example Usage
196
232
 
233
+ Basic Usage
234
+
197
235
  ```python
198
236
  import pulumi
199
237
  import pulumi_alicloud as alicloud
200
238
 
201
239
  config = pulumi.Config()
202
- slb_server_group_name = config.get("slbServerGroupName")
203
- if slb_server_group_name is None:
204
- slb_server_group_name = "forSlbServerGroup"
205
- server_group = alicloud.get_zones(available_resource_creation="VSwitch")
206
- server_group_network = alicloud.vpc.Network("server_group",
207
- vpc_name=slb_server_group_name,
240
+ name = config.get("name")
241
+ if name is None:
242
+ name = "tf-example"
243
+ default = alicloud.get_zones(available_resource_creation="VSwitch")
244
+ default_network = alicloud.vpc.Network("default",
245
+ vpc_name=name,
208
246
  cidr_block="172.16.0.0/16")
209
- server_group_switch = alicloud.vpc.Switch("server_group",
210
- vpc_id=server_group_network.id,
247
+ default_switch = alicloud.vpc.Switch("default",
248
+ vpc_id=default_network.id,
211
249
  cidr_block="172.16.0.0/16",
212
- zone_id=server_group.zones[0].id,
213
- vswitch_name=slb_server_group_name)
214
- server_group_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("server_group",
215
- load_balancer_name=slb_server_group_name,
216
- vswitch_id=server_group_switch.id,
217
- instance_charge_type="PayByCLCU")
218
- server_group_server_group = alicloud.slb.ServerGroup("server_group",
219
- load_balancer_id=server_group_application_load_balancer.id,
220
- name=slb_server_group_name)
250
+ zone_id=default.zones[0].id,
251
+ vswitch_name=name)
252
+ default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("default",
253
+ load_balancer_name=name,
254
+ vswitch_id=default_switch.id,
255
+ load_balancer_spec="slb.s2.small")
256
+ default_server_group = alicloud.slb.ServerGroup("default",
257
+ load_balancer_id=default_application_load_balancer.id,
258
+ name=name)
221
259
  ```
222
260
 
223
261
  ## Import
224
262
 
225
- Load balancer backend server group can be imported using the id, e.g.
263
+ Load Balancer Virtual Backend Server Group can be imported using the id, e.g.
226
264
 
227
265
  ```sh
228
- $ pulumi import alicloud:slb/serverGroup:ServerGroup example abc123456
266
+ $ pulumi import alicloud:slb/serverGroup:ServerGroup example <id>
229
267
  ```
230
268
 
231
269
  :param str resource_name: The name of the resource.
232
270
  :param pulumi.ResourceOptions opts: Options for the resource.
233
- :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
234
- :param pulumi.Input[str] load_balancer_id: The Load Balancer ID which is used to launch a new virtual server group.
235
- :param pulumi.Input[str] name: Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
236
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]] servers: A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
271
+ :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
272
+ :param pulumi.Input[str] load_balancer_id: The ID of the Server Load Balancer (SLB) instance.
273
+ :param pulumi.Input[str] name: The name of the vServer group. Default value: `tf-server-group`.
274
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]] servers: The list of backend servers to be added. See `servers` below.
275
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
276
+ :param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
237
277
  """
238
278
  ...
239
279
  @overload
@@ -242,8 +282,9 @@ class ServerGroup(pulumi.CustomResource):
242
282
  args: ServerGroupArgs,
243
283
  opts: Optional[pulumi.ResourceOptions] = None):
244
284
  """
245
- A virtual server group contains several ECS instances. The virtual server group can help you to define multiple listening dimension,
246
- and to meet the personalized requirements of domain name and URL forwarding.
285
+ Provides a Load Balancer Virtual Backend Server Group resource.
286
+
287
+ For information about Load Balancer Virtual Backend Server Group and how to use it, see [What is Virtual Backend Server Group](https://www.alibabacloud.com/help/en/doc-detail/35215.html).
247
288
 
248
289
  > **NOTE:** Available since v1.6.0.
249
290
 
@@ -257,42 +298,42 @@ class ServerGroup(pulumi.CustomResource):
257
298
 
258
299
  > **NOTE:** One VPC load balancer, its virtual server group can only add the same VPC ECS instances.
259
300
 
260
- For information about server group and how to use it, see [Configure a server group](https://www.alibabacloud.com/help/en/doc-detail/35215.html).
261
-
262
301
  ## Example Usage
263
302
 
303
+ Basic Usage
304
+
264
305
  ```python
265
306
  import pulumi
266
307
  import pulumi_alicloud as alicloud
267
308
 
268
309
  config = pulumi.Config()
269
- slb_server_group_name = config.get("slbServerGroupName")
270
- if slb_server_group_name is None:
271
- slb_server_group_name = "forSlbServerGroup"
272
- server_group = alicloud.get_zones(available_resource_creation="VSwitch")
273
- server_group_network = alicloud.vpc.Network("server_group",
274
- vpc_name=slb_server_group_name,
310
+ name = config.get("name")
311
+ if name is None:
312
+ name = "tf-example"
313
+ default = alicloud.get_zones(available_resource_creation="VSwitch")
314
+ default_network = alicloud.vpc.Network("default",
315
+ vpc_name=name,
275
316
  cidr_block="172.16.0.0/16")
276
- server_group_switch = alicloud.vpc.Switch("server_group",
277
- vpc_id=server_group_network.id,
317
+ default_switch = alicloud.vpc.Switch("default",
318
+ vpc_id=default_network.id,
278
319
  cidr_block="172.16.0.0/16",
279
- zone_id=server_group.zones[0].id,
280
- vswitch_name=slb_server_group_name)
281
- server_group_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("server_group",
282
- load_balancer_name=slb_server_group_name,
283
- vswitch_id=server_group_switch.id,
284
- instance_charge_type="PayByCLCU")
285
- server_group_server_group = alicloud.slb.ServerGroup("server_group",
286
- load_balancer_id=server_group_application_load_balancer.id,
287
- name=slb_server_group_name)
320
+ zone_id=default.zones[0].id,
321
+ vswitch_name=name)
322
+ default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("default",
323
+ load_balancer_name=name,
324
+ vswitch_id=default_switch.id,
325
+ load_balancer_spec="slb.s2.small")
326
+ default_server_group = alicloud.slb.ServerGroup("default",
327
+ load_balancer_id=default_application_load_balancer.id,
328
+ name=name)
288
329
  ```
289
330
 
290
331
  ## Import
291
332
 
292
- Load balancer backend server group can be imported using the id, e.g.
333
+ Load Balancer Virtual Backend Server Group can be imported using the id, e.g.
293
334
 
294
335
  ```sh
295
- $ pulumi import alicloud:slb/serverGroup:ServerGroup example abc123456
336
+ $ pulumi import alicloud:slb/serverGroup:ServerGroup example <id>
296
337
  ```
297
338
 
298
339
  :param str resource_name: The name of the resource.
@@ -314,6 +355,7 @@ class ServerGroup(pulumi.CustomResource):
314
355
  load_balancer_id: Optional[pulumi.Input[str]] = None,
315
356
  name: Optional[pulumi.Input[str]] = None,
316
357
  servers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]]] = None,
358
+ tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
317
359
  __props__=None):
318
360
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
319
361
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -329,6 +371,7 @@ class ServerGroup(pulumi.CustomResource):
329
371
  __props__.__dict__["load_balancer_id"] = load_balancer_id
330
372
  __props__.__dict__["name"] = name
331
373
  __props__.__dict__["servers"] = servers
374
+ __props__.__dict__["tags"] = tags
332
375
  super(ServerGroup, __self__).__init__(
333
376
  'alicloud:slb/serverGroup:ServerGroup',
334
377
  resource_name,
@@ -342,7 +385,8 @@ class ServerGroup(pulumi.CustomResource):
342
385
  delete_protection_validation: Optional[pulumi.Input[bool]] = None,
343
386
  load_balancer_id: Optional[pulumi.Input[str]] = None,
344
387
  name: Optional[pulumi.Input[str]] = None,
345
- servers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]]] = None) -> 'ServerGroup':
388
+ servers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]]] = None,
389
+ tags: Optional[pulumi.Input[Mapping[str, Any]]] = None) -> 'ServerGroup':
346
390
  """
347
391
  Get an existing ServerGroup resource's state with the given name, id, and optional extra
348
392
  properties used to qualify the lookup.
@@ -350,10 +394,12 @@ class ServerGroup(pulumi.CustomResource):
350
394
  :param str resource_name: The unique name of the resulting resource.
351
395
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
352
396
  :param pulumi.ResourceOptions opts: Options for the resource.
353
- :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
354
- :param pulumi.Input[str] load_balancer_id: The Load Balancer ID which is used to launch a new virtual server group.
355
- :param pulumi.Input[str] name: Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
356
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]] servers: A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
397
+ :param pulumi.Input[bool] delete_protection_validation: Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
398
+ :param pulumi.Input[str] load_balancer_id: The ID of the Server Load Balancer (SLB) instance.
399
+ :param pulumi.Input[str] name: The name of the vServer group. Default value: `tf-server-group`.
400
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServerGroupServerArgs']]]] servers: The list of backend servers to be added. See `servers` below.
401
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
402
+ :param pulumi.Input[Mapping[str, Any]] tags: A mapping of tags to assign to the resource.
357
403
  """
358
404
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
359
405
 
@@ -363,13 +409,14 @@ class ServerGroup(pulumi.CustomResource):
363
409
  __props__.__dict__["load_balancer_id"] = load_balancer_id
364
410
  __props__.__dict__["name"] = name
365
411
  __props__.__dict__["servers"] = servers
412
+ __props__.__dict__["tags"] = tags
366
413
  return ServerGroup(resource_name, opts=opts, __props__=__props__)
367
414
 
368
415
  @property
369
416
  @pulumi.getter(name="deleteProtectionValidation")
370
417
  def delete_protection_validation(self) -> pulumi.Output[Optional[bool]]:
371
418
  """
372
- Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
419
+ Checking DeleteProtection of SLB instance before deleting. Default value: `false`. If `delete_protection_validation` is set to `true`, this resource will not be deleted when its SLB instance enabled DeleteProtection.
373
420
  """
374
421
  return pulumi.get(self, "delete_protection_validation")
375
422
 
@@ -377,7 +424,7 @@ class ServerGroup(pulumi.CustomResource):
377
424
  @pulumi.getter(name="loadBalancerId")
378
425
  def load_balancer_id(self) -> pulumi.Output[str]:
379
426
  """
380
- The Load Balancer ID which is used to launch a new virtual server group.
427
+ The ID of the Server Load Balancer (SLB) instance.
381
428
  """
382
429
  return pulumi.get(self, "load_balancer_id")
383
430
 
@@ -385,16 +432,25 @@ class ServerGroup(pulumi.CustomResource):
385
432
  @pulumi.getter
386
433
  def name(self) -> pulumi.Output[str]:
387
434
  """
388
- Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
435
+ The name of the vServer group. Default value: `tf-server-group`.
389
436
  """
390
437
  return pulumi.get(self, "name")
391
438
 
392
439
  @property
393
440
  @pulumi.getter
394
- @_utilities.deprecated("""Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.""")
441
+ @_utilities.deprecated("""Field `servers` has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.""")
395
442
  def servers(self) -> pulumi.Output[Sequence['outputs.ServerGroupServer']]:
396
443
  """
397
- A list of ECS instances to be added. **NOTE:** Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as `Block server` follows. See `servers` below for details.
444
+ The list of backend servers to be added. See `servers` below.
445
+ > **NOTE:** Field `servers` has been deprecated from provider version 1.163.0, and it will be removed in the future version. Please use the new resource `slb.ServerGroupServerAttachment`.
398
446
  """
399
447
  return pulumi.get(self, "servers")
400
448
 
449
+ @property
450
+ @pulumi.getter
451
+ def tags(self) -> pulumi.Output[Optional[Mapping[str, Any]]]:
452
+ """
453
+ A mapping of tags to assign to the resource.
454
+ """
455
+ return pulumi.get(self, "tags")
456
+
@@ -646,13 +646,16 @@ class NetworkIpv6CidrBlockArgs:
646
646
  ipv6_cidr_block: Optional[pulumi.Input[str]] = None,
647
647
  ipv6_isp: Optional[pulumi.Input[str]] = None):
648
648
  """
649
- :param pulumi.Input[str] ipv6_cidr_block: The IPv6 CIDR block of the VPC.
649
+ :param pulumi.Input[str] ipv6_cidr_block: The IPv6 CIDR block of the default VPC.
650
+
651
+ > **NOTE:** When `EnableIpv6` is set to `true`, this parameter is required.
650
652
  :param pulumi.Input[str] ipv6_isp: The IPv6 address segment type of the VPC. Value:
651
- - **BGP** (default): Alibaba Cloud BGP IPv6.
652
- - **ChinaMobile**: China Mobile (single line).
653
- - **ChinaUnicom**: China Unicom (single line).
654
- - **ChinaTelecom**: China Telecom (single line).
655
- > **NOTE:** If a single-line bandwidth whitelist is enabled, this field can be set to **ChinaTelecom** (China Telecom), **ChinaUnicom** (China Unicom), or **ChinaMobile** (China Mobile).
653
+ - `BGP` (default): Alibaba Cloud BGP IPv6.
654
+ - `ChinaMobile`: China Mobile (single line).
655
+ - `ChinaUnicom`: China Unicom (single line).
656
+ - `ChinaTelecom`: China Telecom (single line).
657
+
658
+ > **NOTE:** If a single-line bandwidth whitelist is enabled, this field can be set to `ChinaTelecom` (China Telecom), `ChinaUnicom` (China Unicom), or `ChinaMobile` (China Mobile).
656
659
  """
657
660
  if ipv6_cidr_block is not None:
658
661
  pulumi.set(__self__, "ipv6_cidr_block", ipv6_cidr_block)
@@ -663,7 +666,9 @@ class NetworkIpv6CidrBlockArgs:
663
666
  @pulumi.getter(name="ipv6CidrBlock")
664
667
  def ipv6_cidr_block(self) -> Optional[pulumi.Input[str]]:
665
668
  """
666
- The IPv6 CIDR block of the VPC.
669
+ The IPv6 CIDR block of the default VPC.
670
+
671
+ > **NOTE:** When `EnableIpv6` is set to `true`, this parameter is required.
667
672
  """
668
673
  return pulumi.get(self, "ipv6_cidr_block")
669
674
 
@@ -676,11 +681,12 @@ class NetworkIpv6CidrBlockArgs:
676
681
  def ipv6_isp(self) -> Optional[pulumi.Input[str]]:
677
682
  """
678
683
  The IPv6 address segment type of the VPC. Value:
679
- - **BGP** (default): Alibaba Cloud BGP IPv6.
680
- - **ChinaMobile**: China Mobile (single line).
681
- - **ChinaUnicom**: China Unicom (single line).
682
- - **ChinaTelecom**: China Telecom (single line).
683
- > **NOTE:** If a single-line bandwidth whitelist is enabled, this field can be set to **ChinaTelecom** (China Telecom), **ChinaUnicom** (China Unicom), or **ChinaMobile** (China Mobile).
684
+ - `BGP` (default): Alibaba Cloud BGP IPv6.
685
+ - `ChinaMobile`: China Mobile (single line).
686
+ - `ChinaUnicom`: China Unicom (single line).
687
+ - `ChinaTelecom`: China Telecom (single line).
688
+
689
+ > **NOTE:** If a single-line bandwidth whitelist is enabled, this field can be set to `ChinaTelecom` (China Telecom), `ChinaUnicom` (China Unicom), or `ChinaMobile` (China Mobile).
684
690
  """
685
691
  return pulumi.get(self, "ipv6_isp")
686
692