pulumi-alicloud 3.58.0a1719359875__py3-none-any.whl → 3.58.0a1719552299__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.

Files changed (29) hide show
  1. pulumi_alicloud/_inputs.py +9 -9
  2. pulumi_alicloud/cddc/dedicated_host_account.py +4 -0
  3. pulumi_alicloud/cddc/dedicated_host_group.py +4 -0
  4. pulumi_alicloud/config/outputs.py +6 -6
  5. pulumi_alicloud/cs/kubernetes_addon.py +2 -2
  6. pulumi_alicloud/cs/node_pool.py +7 -7
  7. pulumi_alicloud/ddos/bgp_ip.py +53 -2
  8. pulumi_alicloud/eci/_inputs.py +12 -0
  9. pulumi_alicloud/eci/outputs.py +8 -0
  10. pulumi_alicloud/ecs/ecs_disk.py +7 -7
  11. pulumi_alicloud/ecs/eip.py +1 -1
  12. pulumi_alicloud/ecs/eip_address.py +495 -299
  13. pulumi_alicloud/ecs/eip_association.py +205 -58
  14. pulumi_alicloud/ecs/eip_segment_address.py +311 -133
  15. pulumi_alicloud/ecs/instance.py +20 -6
  16. pulumi_alicloud/ess/_inputs.py +88 -0
  17. pulumi_alicloud/ess/alarm.py +132 -38
  18. pulumi_alicloud/ess/outputs.py +87 -0
  19. pulumi_alicloud/ess/scaling_group.py +148 -7
  20. pulumi_alicloud/log/oss_shipper.py +4 -0
  21. pulumi_alicloud/mongodb/sharding_instance.py +54 -7
  22. pulumi_alicloud/pulumi-plugin.json +1 -1
  23. pulumi_alicloud/rds/instance.py +21 -0
  24. pulumi_alicloud/vpc/common_bandwith_package.py +197 -120
  25. pulumi_alicloud/vpc/common_bandwith_package_attachment.py +58 -30
  26. {pulumi_alicloud-3.58.0a1719359875.dist-info → pulumi_alicloud-3.58.0a1719552299.dist-info}/METADATA +1 -1
  27. {pulumi_alicloud-3.58.0a1719359875.dist-info → pulumi_alicloud-3.58.0a1719552299.dist-info}/RECORD +29 -29
  28. {pulumi_alicloud-3.58.0a1719359875.dist-info → pulumi_alicloud-3.58.0a1719552299.dist-info}/WHEEL +0 -0
  29. {pulumi_alicloud-3.58.0a1719359875.dist-info → pulumi_alicloud-3.58.0a1719552299.dist-info}/top_level.txt +0 -0
@@ -23,13 +23,34 @@ class EipAssociationArgs:
23
23
  vpc_id: Optional[pulumi.Input[str]] = None):
24
24
  """
25
25
  The set of arguments for constructing a EipAssociation resource.
26
- :param pulumi.Input[str] allocation_id: The ID of the EIP that you want to associate with an instance.
27
- :param pulumi.Input[str] instance_id: The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
28
- :param pulumi.Input[bool] force: When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
29
- :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
30
- :param pulumi.Input[str] mode: The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
26
+ :param pulumi.Input[str] allocation_id: The ID of the EIP instance.
27
+ :param pulumi.Input[str] instance_id: The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
28
+ :param pulumi.Input[bool] force: Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
29
+ :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values:
30
+ - `Nat`: NAT gateway
31
+ - `SlbInstance`: CLB instance
32
+ - `EcsInstance` (default): ECS instance
33
+ - `NetworkInterface`: secondary ENI
34
+ - `HaVip`: HAVIP
35
+ - `IpAddress`: IP address
36
+
37
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
38
+ :param pulumi.Input[str] mode: The association mode. Valid values:
39
+ - `NAT` (default): NAT mode
40
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
41
+ - `BINDED`: cut-network interface controller mode
42
+
43
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
31
44
  :param pulumi.Input[str] private_ip_address: The IP address in the CIDR block of the vSwitch.
32
- :param pulumi.Input[str] vpc_id: The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
45
+
46
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
47
+
48
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
49
+ :param pulumi.Input[str] vpc_id: The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
50
+
51
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
52
+
53
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
33
54
  """
34
55
  pulumi.set(__self__, "allocation_id", allocation_id)
35
56
  pulumi.set(__self__, "instance_id", instance_id)
@@ -48,7 +69,7 @@ class EipAssociationArgs:
48
69
  @pulumi.getter(name="allocationId")
49
70
  def allocation_id(self) -> pulumi.Input[str]:
50
71
  """
51
- The ID of the EIP that you want to associate with an instance.
72
+ The ID of the EIP instance.
52
73
  """
53
74
  return pulumi.get(self, "allocation_id")
54
75
 
@@ -60,7 +81,7 @@ class EipAssociationArgs:
60
81
  @pulumi.getter(name="instanceId")
61
82
  def instance_id(self) -> pulumi.Input[str]:
62
83
  """
63
- The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
84
+ The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
64
85
  """
65
86
  return pulumi.get(self, "instance_id")
66
87
 
@@ -72,7 +93,7 @@ class EipAssociationArgs:
72
93
  @pulumi.getter
73
94
  def force(self) -> Optional[pulumi.Input[bool]]:
74
95
  """
75
- When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
96
+ Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
76
97
  """
77
98
  return pulumi.get(self, "force")
78
99
 
@@ -84,7 +105,15 @@ class EipAssociationArgs:
84
105
  @pulumi.getter(name="instanceType")
85
106
  def instance_type(self) -> Optional[pulumi.Input[str]]:
86
107
  """
87
- The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
108
+ The type of the instance with which you want to associate the EIP. Valid values:
109
+ - `Nat`: NAT gateway
110
+ - `SlbInstance`: CLB instance
111
+ - `EcsInstance` (default): ECS instance
112
+ - `NetworkInterface`: secondary ENI
113
+ - `HaVip`: HAVIP
114
+ - `IpAddress`: IP address
115
+
116
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
88
117
  """
89
118
  return pulumi.get(self, "instance_type")
90
119
 
@@ -96,7 +125,12 @@ class EipAssociationArgs:
96
125
  @pulumi.getter
97
126
  def mode(self) -> Optional[pulumi.Input[str]]:
98
127
  """
99
- The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
128
+ The association mode. Valid values:
129
+ - `NAT` (default): NAT mode
130
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
131
+ - `BINDED`: cut-network interface controller mode
132
+
133
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
100
134
  """
101
135
  return pulumi.get(self, "mode")
102
136
 
@@ -109,6 +143,10 @@ class EipAssociationArgs:
109
143
  def private_ip_address(self) -> Optional[pulumi.Input[str]]:
110
144
  """
111
145
  The IP address in the CIDR block of the vSwitch.
146
+
147
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
148
+
149
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
112
150
  """
113
151
  return pulumi.get(self, "private_ip_address")
114
152
 
@@ -120,7 +158,11 @@ class EipAssociationArgs:
120
158
  @pulumi.getter(name="vpcId")
121
159
  def vpc_id(self) -> Optional[pulumi.Input[str]]:
122
160
  """
123
- The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
161
+ The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
162
+
163
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
164
+
165
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
124
166
  """
125
167
  return pulumi.get(self, "vpc_id")
126
168
 
@@ -141,13 +183,34 @@ class _EipAssociationState:
141
183
  vpc_id: Optional[pulumi.Input[str]] = None):
142
184
  """
143
185
  Input properties used for looking up and filtering EipAssociation resources.
144
- :param pulumi.Input[str] allocation_id: The ID of the EIP that you want to associate with an instance.
145
- :param pulumi.Input[bool] force: When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
146
- :param pulumi.Input[str] instance_id: The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
147
- :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
148
- :param pulumi.Input[str] mode: The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
186
+ :param pulumi.Input[str] allocation_id: The ID of the EIP instance.
187
+ :param pulumi.Input[bool] force: Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
188
+ :param pulumi.Input[str] instance_id: The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
189
+ :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values:
190
+ - `Nat`: NAT gateway
191
+ - `SlbInstance`: CLB instance
192
+ - `EcsInstance` (default): ECS instance
193
+ - `NetworkInterface`: secondary ENI
194
+ - `HaVip`: HAVIP
195
+ - `IpAddress`: IP address
196
+
197
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
198
+ :param pulumi.Input[str] mode: The association mode. Valid values:
199
+ - `NAT` (default): NAT mode
200
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
201
+ - `BINDED`: cut-network interface controller mode
202
+
203
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
149
204
  :param pulumi.Input[str] private_ip_address: The IP address in the CIDR block of the vSwitch.
150
- :param pulumi.Input[str] vpc_id: The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
205
+
206
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
207
+
208
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
209
+ :param pulumi.Input[str] vpc_id: The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
210
+
211
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
212
+
213
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
151
214
  """
152
215
  if allocation_id is not None:
153
216
  pulumi.set(__self__, "allocation_id", allocation_id)
@@ -168,7 +231,7 @@ class _EipAssociationState:
168
231
  @pulumi.getter(name="allocationId")
169
232
  def allocation_id(self) -> Optional[pulumi.Input[str]]:
170
233
  """
171
- The ID of the EIP that you want to associate with an instance.
234
+ The ID of the EIP instance.
172
235
  """
173
236
  return pulumi.get(self, "allocation_id")
174
237
 
@@ -180,7 +243,7 @@ class _EipAssociationState:
180
243
  @pulumi.getter
181
244
  def force(self) -> Optional[pulumi.Input[bool]]:
182
245
  """
183
- When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
246
+ Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
184
247
  """
185
248
  return pulumi.get(self, "force")
186
249
 
@@ -192,7 +255,7 @@ class _EipAssociationState:
192
255
  @pulumi.getter(name="instanceId")
193
256
  def instance_id(self) -> Optional[pulumi.Input[str]]:
194
257
  """
195
- The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
258
+ The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
196
259
  """
197
260
  return pulumi.get(self, "instance_id")
198
261
 
@@ -204,7 +267,15 @@ class _EipAssociationState:
204
267
  @pulumi.getter(name="instanceType")
205
268
  def instance_type(self) -> Optional[pulumi.Input[str]]:
206
269
  """
207
- The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
270
+ The type of the instance with which you want to associate the EIP. Valid values:
271
+ - `Nat`: NAT gateway
272
+ - `SlbInstance`: CLB instance
273
+ - `EcsInstance` (default): ECS instance
274
+ - `NetworkInterface`: secondary ENI
275
+ - `HaVip`: HAVIP
276
+ - `IpAddress`: IP address
277
+
278
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
208
279
  """
209
280
  return pulumi.get(self, "instance_type")
210
281
 
@@ -216,7 +287,12 @@ class _EipAssociationState:
216
287
  @pulumi.getter
217
288
  def mode(self) -> Optional[pulumi.Input[str]]:
218
289
  """
219
- The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
290
+ The association mode. Valid values:
291
+ - `NAT` (default): NAT mode
292
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
293
+ - `BINDED`: cut-network interface controller mode
294
+
295
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
220
296
  """
221
297
  return pulumi.get(self, "mode")
222
298
 
@@ -229,6 +305,10 @@ class _EipAssociationState:
229
305
  def private_ip_address(self) -> Optional[pulumi.Input[str]]:
230
306
  """
231
307
  The IP address in the CIDR block of the vSwitch.
308
+
309
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
310
+
311
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
232
312
  """
233
313
  return pulumi.get(self, "private_ip_address")
234
314
 
@@ -240,7 +320,11 @@ class _EipAssociationState:
240
320
  @pulumi.getter(name="vpcId")
241
321
  def vpc_id(self) -> Optional[pulumi.Input[str]]:
242
322
  """
243
- The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
323
+ The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
324
+
325
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
326
+
327
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
244
328
  """
245
329
  return pulumi.get(self, "vpc_id")
246
330
 
@@ -263,7 +347,7 @@ class EipAssociation(pulumi.CustomResource):
263
347
  vpc_id: Optional[pulumi.Input[str]] = None,
264
348
  __props__=None):
265
349
  """
266
- Provides an Alicloud EIP Association resource for associating Elastic IP to ECS Instance, SLB Instance or Nat Gateway.
350
+ Provides a EIP Association resource.
267
351
 
268
352
  > **NOTE:** `ecs.EipAssociation` is useful in scenarios where EIPs are either
269
353
  pre-existing or distributed to customers or users and therefore cannot be changed.
@@ -272,10 +356,14 @@ class EipAssociation(pulumi.CustomResource):
272
356
 
273
357
  > **NOTE:** One EIP can only be associated with ECS or SLB instance which in the VPC.
274
358
 
359
+ For information about EIP Association and how to use it, see [What is Association](https://www.alibabacloud.com/help/en/vpc/developer-reference/api-vpc-2016-04-28-associateeipaddress).
360
+
275
361
  > **NOTE:** Available since v1.117.0.
276
362
 
277
363
  ## Example Usage
278
364
 
365
+ Basic Usage
366
+
279
367
  ```python
280
368
  import pulumi
281
369
  import pulumi_alicloud as alicloud
@@ -289,7 +377,8 @@ class EipAssociation(pulumi.CustomResource):
289
377
  cpu_core_count=1,
290
378
  memory_size=2)
291
379
  example_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
292
- owners="system")
380
+ owners="system",
381
+ instance_type=example_get_instance_types.instance_types[0].id)
293
382
  example_network = alicloud.vpc.Network("example",
294
383
  vpc_name=name,
295
384
  cidr_block="10.4.0.0/16")
@@ -318,14 +407,9 @@ class EipAssociation(pulumi.CustomResource):
318
407
  instance_id=example_instance.id)
319
408
  ```
320
409
 
321
- ## Module Support
322
-
323
- You can use the existing eip module
324
- to create several EIP instances and associate them with other resources one-click, like ECS instances, SLB, Nat Gateway and so on.
325
-
326
410
  ## Import
327
411
 
328
- Elastic IP address association can be imported using the id, e.g.
412
+ EIP Association can be imported using the id, e.g.
329
413
 
330
414
  ```sh
331
415
  $ pulumi import alicloud:ecs/eipAssociation:EipAssociation example <allocation_id>:<instance_id>
@@ -333,13 +417,34 @@ class EipAssociation(pulumi.CustomResource):
333
417
 
334
418
  :param str resource_name: The name of the resource.
335
419
  :param pulumi.ResourceOptions opts: Options for the resource.
336
- :param pulumi.Input[str] allocation_id: The ID of the EIP that you want to associate with an instance.
337
- :param pulumi.Input[bool] force: When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
338
- :param pulumi.Input[str] instance_id: The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
339
- :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
340
- :param pulumi.Input[str] mode: The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
420
+ :param pulumi.Input[str] allocation_id: The ID of the EIP instance.
421
+ :param pulumi.Input[bool] force: Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
422
+ :param pulumi.Input[str] instance_id: The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
423
+ :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values:
424
+ - `Nat`: NAT gateway
425
+ - `SlbInstance`: CLB instance
426
+ - `EcsInstance` (default): ECS instance
427
+ - `NetworkInterface`: secondary ENI
428
+ - `HaVip`: HAVIP
429
+ - `IpAddress`: IP address
430
+
431
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
432
+ :param pulumi.Input[str] mode: The association mode. Valid values:
433
+ - `NAT` (default): NAT mode
434
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
435
+ - `BINDED`: cut-network interface controller mode
436
+
437
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
341
438
  :param pulumi.Input[str] private_ip_address: The IP address in the CIDR block of the vSwitch.
342
- :param pulumi.Input[str] vpc_id: The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
439
+
440
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
441
+
442
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
443
+ :param pulumi.Input[str] vpc_id: The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
444
+
445
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
446
+
447
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
343
448
  """
344
449
  ...
345
450
  @overload
@@ -348,7 +453,7 @@ class EipAssociation(pulumi.CustomResource):
348
453
  args: EipAssociationArgs,
349
454
  opts: Optional[pulumi.ResourceOptions] = None):
350
455
  """
351
- Provides an Alicloud EIP Association resource for associating Elastic IP to ECS Instance, SLB Instance or Nat Gateway.
456
+ Provides a EIP Association resource.
352
457
 
353
458
  > **NOTE:** `ecs.EipAssociation` is useful in scenarios where EIPs are either
354
459
  pre-existing or distributed to customers or users and therefore cannot be changed.
@@ -357,10 +462,14 @@ class EipAssociation(pulumi.CustomResource):
357
462
 
358
463
  > **NOTE:** One EIP can only be associated with ECS or SLB instance which in the VPC.
359
464
 
465
+ For information about EIP Association and how to use it, see [What is Association](https://www.alibabacloud.com/help/en/vpc/developer-reference/api-vpc-2016-04-28-associateeipaddress).
466
+
360
467
  > **NOTE:** Available since v1.117.0.
361
468
 
362
469
  ## Example Usage
363
470
 
471
+ Basic Usage
472
+
364
473
  ```python
365
474
  import pulumi
366
475
  import pulumi_alicloud as alicloud
@@ -374,7 +483,8 @@ class EipAssociation(pulumi.CustomResource):
374
483
  cpu_core_count=1,
375
484
  memory_size=2)
376
485
  example_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
377
- owners="system")
486
+ owners="system",
487
+ instance_type=example_get_instance_types.instance_types[0].id)
378
488
  example_network = alicloud.vpc.Network("example",
379
489
  vpc_name=name,
380
490
  cidr_block="10.4.0.0/16")
@@ -403,14 +513,9 @@ class EipAssociation(pulumi.CustomResource):
403
513
  instance_id=example_instance.id)
404
514
  ```
405
515
 
406
- ## Module Support
407
-
408
- You can use the existing eip module
409
- to create several EIP instances and associate them with other resources one-click, like ECS instances, SLB, Nat Gateway and so on.
410
-
411
516
  ## Import
412
517
 
413
- Elastic IP address association can be imported using the id, e.g.
518
+ EIP Association can be imported using the id, e.g.
414
519
 
415
520
  ```sh
416
521
  $ pulumi import alicloud:ecs/eipAssociation:EipAssociation example <allocation_id>:<instance_id>
@@ -482,13 +587,34 @@ class EipAssociation(pulumi.CustomResource):
482
587
  :param str resource_name: The unique name of the resulting resource.
483
588
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
484
589
  :param pulumi.ResourceOptions opts: Options for the resource.
485
- :param pulumi.Input[str] allocation_id: The ID of the EIP that you want to associate with an instance.
486
- :param pulumi.Input[bool] force: When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
487
- :param pulumi.Input[str] instance_id: The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
488
- :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
489
- :param pulumi.Input[str] mode: The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
590
+ :param pulumi.Input[str] allocation_id: The ID of the EIP instance.
591
+ :param pulumi.Input[bool] force: Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
592
+ :param pulumi.Input[str] instance_id: The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
593
+ :param pulumi.Input[str] instance_type: The type of the instance with which you want to associate the EIP. Valid values:
594
+ - `Nat`: NAT gateway
595
+ - `SlbInstance`: CLB instance
596
+ - `EcsInstance` (default): ECS instance
597
+ - `NetworkInterface`: secondary ENI
598
+ - `HaVip`: HAVIP
599
+ - `IpAddress`: IP address
600
+
601
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
602
+ :param pulumi.Input[str] mode: The association mode. Valid values:
603
+ - `NAT` (default): NAT mode
604
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
605
+ - `BINDED`: cut-network interface controller mode
606
+
607
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
490
608
  :param pulumi.Input[str] private_ip_address: The IP address in the CIDR block of the vSwitch.
491
- :param pulumi.Input[str] vpc_id: The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
609
+
610
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
611
+
612
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
613
+ :param pulumi.Input[str] vpc_id: The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
614
+
615
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
616
+
617
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
492
618
  """
493
619
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
494
620
 
@@ -507,7 +633,7 @@ class EipAssociation(pulumi.CustomResource):
507
633
  @pulumi.getter(name="allocationId")
508
634
  def allocation_id(self) -> pulumi.Output[str]:
509
635
  """
510
- The ID of the EIP that you want to associate with an instance.
636
+ The ID of the EIP instance.
511
637
  """
512
638
  return pulumi.get(self, "allocation_id")
513
639
 
@@ -515,7 +641,7 @@ class EipAssociation(pulumi.CustomResource):
515
641
  @pulumi.getter
516
642
  def force(self) -> pulumi.Output[Optional[bool]]:
517
643
  """
518
- When EIP is bound to a NAT gateway, and the NAT gateway adds a DNAT or SNAT entry, set it for `true` can unassociation any way. Default value: `false`. Valid values: `true`, `false`.
644
+ Specifies whether to disassociate the EIP from a NAT gateway if a DNAT or SNAT entry is added to the NAT gateway. Valid values:
519
645
  """
520
646
  return pulumi.get(self, "force")
521
647
 
@@ -523,7 +649,7 @@ class EipAssociation(pulumi.CustomResource):
523
649
  @pulumi.getter(name="instanceId")
524
650
  def instance_id(self) -> pulumi.Output[str]:
525
651
  """
526
- The ID of the ECS or SLB instance or Nat Gateway or NetworkInterface or HaVip.
652
+ The ID of the instance with which you want to associate the EIP. You can enter the ID of a NAT gateway, CLB instance, ECS instance, secondary ENI, HAVIP, or IP address.
527
653
  """
528
654
  return pulumi.get(self, "instance_id")
529
655
 
@@ -531,7 +657,15 @@ class EipAssociation(pulumi.CustomResource):
531
657
  @pulumi.getter(name="instanceType")
532
658
  def instance_type(self) -> pulumi.Output[str]:
533
659
  """
534
- The type of the instance with which you want to associate the EIP. Valid values: `Nat`, `SlbInstance`, `EcsInstance`, `NetworkInterface`, `HaVip` and `IpAddress`.
660
+ The type of the instance with which you want to associate the EIP. Valid values:
661
+ - `Nat`: NAT gateway
662
+ - `SlbInstance`: CLB instance
663
+ - `EcsInstance` (default): ECS instance
664
+ - `NetworkInterface`: secondary ENI
665
+ - `HaVip`: HAVIP
666
+ - `IpAddress`: IP address
667
+
668
+ > **NOTE:** The default value is `EcsInstance`. If the instance with which you want to associate the EIP is not an ECS instance, this parameter is required.
535
669
  """
536
670
  return pulumi.get(self, "instance_type")
537
671
 
@@ -539,7 +673,12 @@ class EipAssociation(pulumi.CustomResource):
539
673
  @pulumi.getter
540
674
  def mode(self) -> pulumi.Output[str]:
541
675
  """
542
- The association mode. Default value: `NAT`. Valid values: `NAT`, `BINDED`, `MULTI_BINDED`. **Note:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
676
+ The association mode. Valid values:
677
+ - `NAT` (default): NAT mode
678
+ - `MULTI_BINDED`: multi-EIP-to-ENI mode
679
+ - `BINDED`: cut-network interface controller mode
680
+
681
+ > **NOTE:** This parameter is required only when `instance_type` is set to `NetworkInterface`.
543
682
  """
544
683
  return pulumi.get(self, "mode")
545
684
 
@@ -548,6 +687,10 @@ class EipAssociation(pulumi.CustomResource):
548
687
  def private_ip_address(self) -> pulumi.Output[Optional[str]]:
549
688
  """
550
689
  The IP address in the CIDR block of the vSwitch.
690
+
691
+ If you leave this parameter empty, the system allocates a private IP address based on the VPC ID and vSwitch ID.
692
+
693
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
551
694
  """
552
695
  return pulumi.get(self, "private_ip_address")
553
696
 
@@ -555,7 +698,11 @@ class EipAssociation(pulumi.CustomResource):
555
698
  @pulumi.getter(name="vpcId")
556
699
  def vpc_id(self) -> pulumi.Output[Optional[str]]:
557
700
  """
558
- The ID of the VPC that has IPv4 gateways enabled and that is deployed in the same region as the EIP. When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations. **Note:** This parameter is required if `instance_type` is set to `IpAddress`.
701
+ The ID of the VPC in which an IPv4 gateway is created. The VPC and the EIP must be in the same region.
702
+
703
+ When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.
704
+
705
+ > **NOTE:** This parameter is required if `instance_type` is set to `IpAddress`, which indicates that the EIP is to be associated with an IP address.
559
706
  """
560
707
  return pulumi.get(self, "vpc_id")
561
708