pulumi-alicloud 3.63.0a1727424957__py3-none-any.whl → 3.63.0a1727705137__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 +24 -0
- pulumi_alicloud/alb/acl.py +18 -19
- pulumi_alicloud/alb/health_check_template.py +96 -88
- pulumi_alicloud/cms/_inputs.py +6 -6
- pulumi_alicloud/cms/outputs.py +6 -6
- pulumi_alicloud/ddos/_inputs.py +8 -9
- pulumi_alicloud/ddos/domain_resource.py +446 -90
- pulumi_alicloud/ddos/outputs.py +7 -8
- pulumi_alicloud/eci/container_group.py +47 -0
- pulumi_alicloud/ecs/ecs_snapshot.py +199 -77
- pulumi_alicloud/ecs/snapshot.py +26 -8
- pulumi_alicloud/ess/__init__.py +1 -0
- pulumi_alicloud/ess/alarm.py +47 -0
- pulumi_alicloud/ess/server_group_attachment.py +552 -0
- pulumi_alicloud/ga/_inputs.py +23 -5
- pulumi_alicloud/ga/outputs.py +21 -5
- pulumi_alicloud/governance/account.py +61 -0
- pulumi_alicloud/gpdb/__init__.py +4 -0
- pulumi_alicloud/gpdb/_inputs.py +361 -3
- pulumi_alicloud/gpdb/db_instance_ip_array.py +533 -0
- pulumi_alicloud/gpdb/get_data_backups.py +288 -0
- pulumi_alicloud/gpdb/get_log_backups.py +225 -0
- pulumi_alicloud/gpdb/instance.py +47 -0
- pulumi_alicloud/gpdb/outputs.py +597 -4
- pulumi_alicloud/gpdb/streaming_job.py +1568 -0
- pulumi_alicloud/nlb/load_balancer.py +116 -0
- pulumi_alicloud/oos/get_secret_parameters.py +111 -9
- pulumi_alicloud/oos/outputs.py +22 -11
- pulumi_alicloud/pulumi-plugin.json +1 -1
- pulumi_alicloud/rds/instance.py +21 -21
- pulumi_alicloud/rocketmq/_inputs.py +79 -22
- pulumi_alicloud/rocketmq/outputs.py +85 -21
- pulumi_alicloud/rocketmq/rocket_mq_instance.py +307 -113
- pulumi_alicloud/vpc/peer_connection.py +127 -59
- pulumi_alicloud/vpc/peer_connection_accepter.py +263 -42
- pulumi_alicloud/vpc/route_entry.py +232 -210
- {pulumi_alicloud-3.63.0a1727424957.dist-info → pulumi_alicloud-3.63.0a1727705137.dist-info}/METADATA +1 -1
- {pulumi_alicloud-3.63.0a1727424957.dist-info → pulumi_alicloud-3.63.0a1727705137.dist-info}/RECORD +40 -35
- {pulumi_alicloud-3.63.0a1727424957.dist-info → pulumi_alicloud-3.63.0a1727705137.dist-info}/WHEEL +0 -0
- {pulumi_alicloud-3.63.0a1727424957.dist-info → pulumi_alicloud-3.63.0a1727705137.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from .. import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = ['ServerGroupAttachmentArgs', 'ServerGroupAttachment']
|
|
13
|
+
|
|
14
|
+
@pulumi.input_type
|
|
15
|
+
class ServerGroupAttachmentArgs:
|
|
16
|
+
def __init__(__self__, *,
|
|
17
|
+
port: pulumi.Input[int],
|
|
18
|
+
scaling_group_id: pulumi.Input[str],
|
|
19
|
+
server_group_id: pulumi.Input[str],
|
|
20
|
+
type: pulumi.Input[str],
|
|
21
|
+
weight: pulumi.Input[int],
|
|
22
|
+
force_attach: Optional[pulumi.Input[bool]] = None):
|
|
23
|
+
"""
|
|
24
|
+
The set of arguments for constructing a ServerGroupAttachment resource.
|
|
25
|
+
:param pulumi.Input[int] port: The port will be used for Server Group backend server.
|
|
26
|
+
:param pulumi.Input[str] scaling_group_id: ID of the scaling group.
|
|
27
|
+
:param pulumi.Input[str] server_group_id: ID of Server Group.
|
|
28
|
+
:param pulumi.Input[str] type: The type of server group N. Valid values: ALB, NLB.
|
|
29
|
+
:param pulumi.Input[int] weight: The weight of an ECS instance attached to the Server Group.
|
|
30
|
+
:param pulumi.Input[bool] force_attach: If instances of scaling group are attached/removed from backend server when
|
|
31
|
+
server group from scaling group. Default to false.
|
|
32
|
+
"""
|
|
33
|
+
pulumi.set(__self__, "port", port)
|
|
34
|
+
pulumi.set(__self__, "scaling_group_id", scaling_group_id)
|
|
35
|
+
pulumi.set(__self__, "server_group_id", server_group_id)
|
|
36
|
+
pulumi.set(__self__, "type", type)
|
|
37
|
+
pulumi.set(__self__, "weight", weight)
|
|
38
|
+
if force_attach is not None:
|
|
39
|
+
pulumi.set(__self__, "force_attach", force_attach)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
@pulumi.getter
|
|
43
|
+
def port(self) -> pulumi.Input[int]:
|
|
44
|
+
"""
|
|
45
|
+
The port will be used for Server Group backend server.
|
|
46
|
+
"""
|
|
47
|
+
return pulumi.get(self, "port")
|
|
48
|
+
|
|
49
|
+
@port.setter
|
|
50
|
+
def port(self, value: pulumi.Input[int]):
|
|
51
|
+
pulumi.set(self, "port", value)
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
@pulumi.getter(name="scalingGroupId")
|
|
55
|
+
def scaling_group_id(self) -> pulumi.Input[str]:
|
|
56
|
+
"""
|
|
57
|
+
ID of the scaling group.
|
|
58
|
+
"""
|
|
59
|
+
return pulumi.get(self, "scaling_group_id")
|
|
60
|
+
|
|
61
|
+
@scaling_group_id.setter
|
|
62
|
+
def scaling_group_id(self, value: pulumi.Input[str]):
|
|
63
|
+
pulumi.set(self, "scaling_group_id", value)
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
@pulumi.getter(name="serverGroupId")
|
|
67
|
+
def server_group_id(self) -> pulumi.Input[str]:
|
|
68
|
+
"""
|
|
69
|
+
ID of Server Group.
|
|
70
|
+
"""
|
|
71
|
+
return pulumi.get(self, "server_group_id")
|
|
72
|
+
|
|
73
|
+
@server_group_id.setter
|
|
74
|
+
def server_group_id(self, value: pulumi.Input[str]):
|
|
75
|
+
pulumi.set(self, "server_group_id", value)
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
@pulumi.getter
|
|
79
|
+
def type(self) -> pulumi.Input[str]:
|
|
80
|
+
"""
|
|
81
|
+
The type of server group N. Valid values: ALB, NLB.
|
|
82
|
+
"""
|
|
83
|
+
return pulumi.get(self, "type")
|
|
84
|
+
|
|
85
|
+
@type.setter
|
|
86
|
+
def type(self, value: pulumi.Input[str]):
|
|
87
|
+
pulumi.set(self, "type", value)
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
@pulumi.getter
|
|
91
|
+
def weight(self) -> pulumi.Input[int]:
|
|
92
|
+
"""
|
|
93
|
+
The weight of an ECS instance attached to the Server Group.
|
|
94
|
+
"""
|
|
95
|
+
return pulumi.get(self, "weight")
|
|
96
|
+
|
|
97
|
+
@weight.setter
|
|
98
|
+
def weight(self, value: pulumi.Input[int]):
|
|
99
|
+
pulumi.set(self, "weight", value)
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
@pulumi.getter(name="forceAttach")
|
|
103
|
+
def force_attach(self) -> Optional[pulumi.Input[bool]]:
|
|
104
|
+
"""
|
|
105
|
+
If instances of scaling group are attached/removed from backend server when
|
|
106
|
+
server group from scaling group. Default to false.
|
|
107
|
+
"""
|
|
108
|
+
return pulumi.get(self, "force_attach")
|
|
109
|
+
|
|
110
|
+
@force_attach.setter
|
|
111
|
+
def force_attach(self, value: Optional[pulumi.Input[bool]]):
|
|
112
|
+
pulumi.set(self, "force_attach", value)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@pulumi.input_type
|
|
116
|
+
class _ServerGroupAttachmentState:
|
|
117
|
+
def __init__(__self__, *,
|
|
118
|
+
force_attach: Optional[pulumi.Input[bool]] = None,
|
|
119
|
+
port: Optional[pulumi.Input[int]] = None,
|
|
120
|
+
scaling_group_id: Optional[pulumi.Input[str]] = None,
|
|
121
|
+
server_group_id: Optional[pulumi.Input[str]] = None,
|
|
122
|
+
type: Optional[pulumi.Input[str]] = None,
|
|
123
|
+
weight: Optional[pulumi.Input[int]] = None):
|
|
124
|
+
"""
|
|
125
|
+
Input properties used for looking up and filtering ServerGroupAttachment resources.
|
|
126
|
+
:param pulumi.Input[bool] force_attach: If instances of scaling group are attached/removed from backend server when
|
|
127
|
+
server group from scaling group. Default to false.
|
|
128
|
+
:param pulumi.Input[int] port: The port will be used for Server Group backend server.
|
|
129
|
+
:param pulumi.Input[str] scaling_group_id: ID of the scaling group.
|
|
130
|
+
:param pulumi.Input[str] server_group_id: ID of Server Group.
|
|
131
|
+
:param pulumi.Input[str] type: The type of server group N. Valid values: ALB, NLB.
|
|
132
|
+
:param pulumi.Input[int] weight: The weight of an ECS instance attached to the Server Group.
|
|
133
|
+
"""
|
|
134
|
+
if force_attach is not None:
|
|
135
|
+
pulumi.set(__self__, "force_attach", force_attach)
|
|
136
|
+
if port is not None:
|
|
137
|
+
pulumi.set(__self__, "port", port)
|
|
138
|
+
if scaling_group_id is not None:
|
|
139
|
+
pulumi.set(__self__, "scaling_group_id", scaling_group_id)
|
|
140
|
+
if server_group_id is not None:
|
|
141
|
+
pulumi.set(__self__, "server_group_id", server_group_id)
|
|
142
|
+
if type is not None:
|
|
143
|
+
pulumi.set(__self__, "type", type)
|
|
144
|
+
if weight is not None:
|
|
145
|
+
pulumi.set(__self__, "weight", weight)
|
|
146
|
+
|
|
147
|
+
@property
|
|
148
|
+
@pulumi.getter(name="forceAttach")
|
|
149
|
+
def force_attach(self) -> Optional[pulumi.Input[bool]]:
|
|
150
|
+
"""
|
|
151
|
+
If instances of scaling group are attached/removed from backend server when
|
|
152
|
+
server group from scaling group. Default to false.
|
|
153
|
+
"""
|
|
154
|
+
return pulumi.get(self, "force_attach")
|
|
155
|
+
|
|
156
|
+
@force_attach.setter
|
|
157
|
+
def force_attach(self, value: Optional[pulumi.Input[bool]]):
|
|
158
|
+
pulumi.set(self, "force_attach", value)
|
|
159
|
+
|
|
160
|
+
@property
|
|
161
|
+
@pulumi.getter
|
|
162
|
+
def port(self) -> Optional[pulumi.Input[int]]:
|
|
163
|
+
"""
|
|
164
|
+
The port will be used for Server Group backend server.
|
|
165
|
+
"""
|
|
166
|
+
return pulumi.get(self, "port")
|
|
167
|
+
|
|
168
|
+
@port.setter
|
|
169
|
+
def port(self, value: Optional[pulumi.Input[int]]):
|
|
170
|
+
pulumi.set(self, "port", value)
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
@pulumi.getter(name="scalingGroupId")
|
|
174
|
+
def scaling_group_id(self) -> Optional[pulumi.Input[str]]:
|
|
175
|
+
"""
|
|
176
|
+
ID of the scaling group.
|
|
177
|
+
"""
|
|
178
|
+
return pulumi.get(self, "scaling_group_id")
|
|
179
|
+
|
|
180
|
+
@scaling_group_id.setter
|
|
181
|
+
def scaling_group_id(self, value: Optional[pulumi.Input[str]]):
|
|
182
|
+
pulumi.set(self, "scaling_group_id", value)
|
|
183
|
+
|
|
184
|
+
@property
|
|
185
|
+
@pulumi.getter(name="serverGroupId")
|
|
186
|
+
def server_group_id(self) -> Optional[pulumi.Input[str]]:
|
|
187
|
+
"""
|
|
188
|
+
ID of Server Group.
|
|
189
|
+
"""
|
|
190
|
+
return pulumi.get(self, "server_group_id")
|
|
191
|
+
|
|
192
|
+
@server_group_id.setter
|
|
193
|
+
def server_group_id(self, value: Optional[pulumi.Input[str]]):
|
|
194
|
+
pulumi.set(self, "server_group_id", value)
|
|
195
|
+
|
|
196
|
+
@property
|
|
197
|
+
@pulumi.getter
|
|
198
|
+
def type(self) -> Optional[pulumi.Input[str]]:
|
|
199
|
+
"""
|
|
200
|
+
The type of server group N. Valid values: ALB, NLB.
|
|
201
|
+
"""
|
|
202
|
+
return pulumi.get(self, "type")
|
|
203
|
+
|
|
204
|
+
@type.setter
|
|
205
|
+
def type(self, value: Optional[pulumi.Input[str]]):
|
|
206
|
+
pulumi.set(self, "type", value)
|
|
207
|
+
|
|
208
|
+
@property
|
|
209
|
+
@pulumi.getter
|
|
210
|
+
def weight(self) -> Optional[pulumi.Input[int]]:
|
|
211
|
+
"""
|
|
212
|
+
The weight of an ECS instance attached to the Server Group.
|
|
213
|
+
"""
|
|
214
|
+
return pulumi.get(self, "weight")
|
|
215
|
+
|
|
216
|
+
@weight.setter
|
|
217
|
+
def weight(self, value: Optional[pulumi.Input[int]]):
|
|
218
|
+
pulumi.set(self, "weight", value)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class ServerGroupAttachment(pulumi.CustomResource):
|
|
222
|
+
@overload
|
|
223
|
+
def __init__(__self__,
|
|
224
|
+
resource_name: str,
|
|
225
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
226
|
+
force_attach: Optional[pulumi.Input[bool]] = None,
|
|
227
|
+
port: Optional[pulumi.Input[int]] = None,
|
|
228
|
+
scaling_group_id: Optional[pulumi.Input[str]] = None,
|
|
229
|
+
server_group_id: Optional[pulumi.Input[str]] = None,
|
|
230
|
+
type: Optional[pulumi.Input[str]] = None,
|
|
231
|
+
weight: Optional[pulumi.Input[int]] = None,
|
|
232
|
+
__props__=None):
|
|
233
|
+
"""
|
|
234
|
+
Attaches/Detaches server group to a specified scaling group.
|
|
235
|
+
|
|
236
|
+
For information about server group attachment, see [AttachServerGroups](https://www.alibabacloud.com/help/en/auto-scaling/developer-reference/api-attachservergroups).
|
|
237
|
+
|
|
238
|
+
> **NOTE:** If scaling group's network type is `VPC`, the server groups must be in the same `VPC`.
|
|
239
|
+
|
|
240
|
+
> **NOTE:** server group attachment is defined uniquely by `scaling_group_id`, `server_group_id`,`type`, `port`.
|
|
241
|
+
|
|
242
|
+
> **NOTE:** Resource `ess.ServerGroupAttachment` don't support modification.
|
|
243
|
+
|
|
244
|
+
> **NOTE:** Available since v1.231.0.
|
|
245
|
+
|
|
246
|
+
## Example Usage
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
import pulumi
|
|
250
|
+
import pulumi_alicloud as alicloud
|
|
251
|
+
import pulumi_random as random
|
|
252
|
+
|
|
253
|
+
config = pulumi.Config()
|
|
254
|
+
name = config.get("name")
|
|
255
|
+
if name is None:
|
|
256
|
+
name = "terraform-example"
|
|
257
|
+
default_integer = random.index.Integer("default",
|
|
258
|
+
min=10000,
|
|
259
|
+
max=99999)
|
|
260
|
+
my_name = f"{name}-{default_integer['result']}"
|
|
261
|
+
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
|
|
262
|
+
available_resource_creation="VSwitch")
|
|
263
|
+
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
|
|
264
|
+
cpu_core_count=2,
|
|
265
|
+
memory_size=4)
|
|
266
|
+
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
|
|
267
|
+
most_recent=True,
|
|
268
|
+
owners="system")
|
|
269
|
+
default_network = alicloud.vpc.Network("default",
|
|
270
|
+
vpc_name=my_name,
|
|
271
|
+
cidr_block="172.16.0.0/16")
|
|
272
|
+
default_switch = alicloud.vpc.Switch("default",
|
|
273
|
+
vpc_id=default_network.id,
|
|
274
|
+
cidr_block="172.16.0.0/24",
|
|
275
|
+
zone_id=default.zones[0].id,
|
|
276
|
+
vswitch_name=my_name)
|
|
277
|
+
default_security_group = alicloud.ecs.SecurityGroup("default",
|
|
278
|
+
name=my_name,
|
|
279
|
+
vpc_id=default_network.id)
|
|
280
|
+
default_scaling_group = alicloud.ess.ScalingGroup("default",
|
|
281
|
+
min_size=0,
|
|
282
|
+
max_size=2,
|
|
283
|
+
scaling_group_name=my_name,
|
|
284
|
+
default_cooldown=200,
|
|
285
|
+
removal_policies=["OldestInstance"],
|
|
286
|
+
vswitch_ids=[default_switch.id])
|
|
287
|
+
default_scaling_configuration = alicloud.ess.ScalingConfiguration("default",
|
|
288
|
+
scaling_group_id=default_scaling_group.id,
|
|
289
|
+
image_id=default_get_images.images[0].id,
|
|
290
|
+
instance_type=default_get_instance_types.instance_types[0].id,
|
|
291
|
+
security_group_id=default_security_group.id,
|
|
292
|
+
system_disk_size=50,
|
|
293
|
+
force_delete=True,
|
|
294
|
+
active=True,
|
|
295
|
+
enable=True)
|
|
296
|
+
default_server_group = alicloud.alb.ServerGroup("default",
|
|
297
|
+
server_group_name=my_name,
|
|
298
|
+
vpc_id=default_network.id,
|
|
299
|
+
health_check_config={
|
|
300
|
+
"health_check_enabled": False,
|
|
301
|
+
},
|
|
302
|
+
sticky_session_config={
|
|
303
|
+
"sticky_session_enabled": True,
|
|
304
|
+
"cookie": "tf-example",
|
|
305
|
+
"sticky_session_type": "Server",
|
|
306
|
+
})
|
|
307
|
+
default_server_group_attachment = alicloud.ess.ServerGroupAttachment("default",
|
|
308
|
+
scaling_group_id=default_scaling_configuration.scaling_group_id,
|
|
309
|
+
server_group_id=default_server_group.id,
|
|
310
|
+
port=9000,
|
|
311
|
+
type="ALB",
|
|
312
|
+
weight=50,
|
|
313
|
+
force_attach=True)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
:param str resource_name: The name of the resource.
|
|
317
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
318
|
+
:param pulumi.Input[bool] force_attach: If instances of scaling group are attached/removed from backend server when
|
|
319
|
+
server group from scaling group. Default to false.
|
|
320
|
+
:param pulumi.Input[int] port: The port will be used for Server Group backend server.
|
|
321
|
+
:param pulumi.Input[str] scaling_group_id: ID of the scaling group.
|
|
322
|
+
:param pulumi.Input[str] server_group_id: ID of Server Group.
|
|
323
|
+
:param pulumi.Input[str] type: The type of server group N. Valid values: ALB, NLB.
|
|
324
|
+
:param pulumi.Input[int] weight: The weight of an ECS instance attached to the Server Group.
|
|
325
|
+
"""
|
|
326
|
+
...
|
|
327
|
+
@overload
|
|
328
|
+
def __init__(__self__,
|
|
329
|
+
resource_name: str,
|
|
330
|
+
args: ServerGroupAttachmentArgs,
|
|
331
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
332
|
+
"""
|
|
333
|
+
Attaches/Detaches server group to a specified scaling group.
|
|
334
|
+
|
|
335
|
+
For information about server group attachment, see [AttachServerGroups](https://www.alibabacloud.com/help/en/auto-scaling/developer-reference/api-attachservergroups).
|
|
336
|
+
|
|
337
|
+
> **NOTE:** If scaling group's network type is `VPC`, the server groups must be in the same `VPC`.
|
|
338
|
+
|
|
339
|
+
> **NOTE:** server group attachment is defined uniquely by `scaling_group_id`, `server_group_id`,`type`, `port`.
|
|
340
|
+
|
|
341
|
+
> **NOTE:** Resource `ess.ServerGroupAttachment` don't support modification.
|
|
342
|
+
|
|
343
|
+
> **NOTE:** Available since v1.231.0.
|
|
344
|
+
|
|
345
|
+
## Example Usage
|
|
346
|
+
|
|
347
|
+
```python
|
|
348
|
+
import pulumi
|
|
349
|
+
import pulumi_alicloud as alicloud
|
|
350
|
+
import pulumi_random as random
|
|
351
|
+
|
|
352
|
+
config = pulumi.Config()
|
|
353
|
+
name = config.get("name")
|
|
354
|
+
if name is None:
|
|
355
|
+
name = "terraform-example"
|
|
356
|
+
default_integer = random.index.Integer("default",
|
|
357
|
+
min=10000,
|
|
358
|
+
max=99999)
|
|
359
|
+
my_name = f"{name}-{default_integer['result']}"
|
|
360
|
+
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
|
|
361
|
+
available_resource_creation="VSwitch")
|
|
362
|
+
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
|
|
363
|
+
cpu_core_count=2,
|
|
364
|
+
memory_size=4)
|
|
365
|
+
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
|
|
366
|
+
most_recent=True,
|
|
367
|
+
owners="system")
|
|
368
|
+
default_network = alicloud.vpc.Network("default",
|
|
369
|
+
vpc_name=my_name,
|
|
370
|
+
cidr_block="172.16.0.0/16")
|
|
371
|
+
default_switch = alicloud.vpc.Switch("default",
|
|
372
|
+
vpc_id=default_network.id,
|
|
373
|
+
cidr_block="172.16.0.0/24",
|
|
374
|
+
zone_id=default.zones[0].id,
|
|
375
|
+
vswitch_name=my_name)
|
|
376
|
+
default_security_group = alicloud.ecs.SecurityGroup("default",
|
|
377
|
+
name=my_name,
|
|
378
|
+
vpc_id=default_network.id)
|
|
379
|
+
default_scaling_group = alicloud.ess.ScalingGroup("default",
|
|
380
|
+
min_size=0,
|
|
381
|
+
max_size=2,
|
|
382
|
+
scaling_group_name=my_name,
|
|
383
|
+
default_cooldown=200,
|
|
384
|
+
removal_policies=["OldestInstance"],
|
|
385
|
+
vswitch_ids=[default_switch.id])
|
|
386
|
+
default_scaling_configuration = alicloud.ess.ScalingConfiguration("default",
|
|
387
|
+
scaling_group_id=default_scaling_group.id,
|
|
388
|
+
image_id=default_get_images.images[0].id,
|
|
389
|
+
instance_type=default_get_instance_types.instance_types[0].id,
|
|
390
|
+
security_group_id=default_security_group.id,
|
|
391
|
+
system_disk_size=50,
|
|
392
|
+
force_delete=True,
|
|
393
|
+
active=True,
|
|
394
|
+
enable=True)
|
|
395
|
+
default_server_group = alicloud.alb.ServerGroup("default",
|
|
396
|
+
server_group_name=my_name,
|
|
397
|
+
vpc_id=default_network.id,
|
|
398
|
+
health_check_config={
|
|
399
|
+
"health_check_enabled": False,
|
|
400
|
+
},
|
|
401
|
+
sticky_session_config={
|
|
402
|
+
"sticky_session_enabled": True,
|
|
403
|
+
"cookie": "tf-example",
|
|
404
|
+
"sticky_session_type": "Server",
|
|
405
|
+
})
|
|
406
|
+
default_server_group_attachment = alicloud.ess.ServerGroupAttachment("default",
|
|
407
|
+
scaling_group_id=default_scaling_configuration.scaling_group_id,
|
|
408
|
+
server_group_id=default_server_group.id,
|
|
409
|
+
port=9000,
|
|
410
|
+
type="ALB",
|
|
411
|
+
weight=50,
|
|
412
|
+
force_attach=True)
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
:param str resource_name: The name of the resource.
|
|
416
|
+
:param ServerGroupAttachmentArgs args: The arguments to use to populate this resource's properties.
|
|
417
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
418
|
+
"""
|
|
419
|
+
...
|
|
420
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
421
|
+
resource_args, opts = _utilities.get_resource_args_opts(ServerGroupAttachmentArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
422
|
+
if resource_args is not None:
|
|
423
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
424
|
+
else:
|
|
425
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
426
|
+
|
|
427
|
+
def _internal_init(__self__,
|
|
428
|
+
resource_name: str,
|
|
429
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
430
|
+
force_attach: Optional[pulumi.Input[bool]] = None,
|
|
431
|
+
port: Optional[pulumi.Input[int]] = None,
|
|
432
|
+
scaling_group_id: Optional[pulumi.Input[str]] = None,
|
|
433
|
+
server_group_id: Optional[pulumi.Input[str]] = None,
|
|
434
|
+
type: Optional[pulumi.Input[str]] = None,
|
|
435
|
+
weight: Optional[pulumi.Input[int]] = None,
|
|
436
|
+
__props__=None):
|
|
437
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
438
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
439
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
440
|
+
if opts.id is None:
|
|
441
|
+
if __props__ is not None:
|
|
442
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
443
|
+
__props__ = ServerGroupAttachmentArgs.__new__(ServerGroupAttachmentArgs)
|
|
444
|
+
|
|
445
|
+
__props__.__dict__["force_attach"] = force_attach
|
|
446
|
+
if port is None and not opts.urn:
|
|
447
|
+
raise TypeError("Missing required property 'port'")
|
|
448
|
+
__props__.__dict__["port"] = port
|
|
449
|
+
if scaling_group_id is None and not opts.urn:
|
|
450
|
+
raise TypeError("Missing required property 'scaling_group_id'")
|
|
451
|
+
__props__.__dict__["scaling_group_id"] = scaling_group_id
|
|
452
|
+
if server_group_id is None and not opts.urn:
|
|
453
|
+
raise TypeError("Missing required property 'server_group_id'")
|
|
454
|
+
__props__.__dict__["server_group_id"] = server_group_id
|
|
455
|
+
if type is None and not opts.urn:
|
|
456
|
+
raise TypeError("Missing required property 'type'")
|
|
457
|
+
__props__.__dict__["type"] = type
|
|
458
|
+
if weight is None and not opts.urn:
|
|
459
|
+
raise TypeError("Missing required property 'weight'")
|
|
460
|
+
__props__.__dict__["weight"] = weight
|
|
461
|
+
super(ServerGroupAttachment, __self__).__init__(
|
|
462
|
+
'alicloud:ess/serverGroupAttachment:ServerGroupAttachment',
|
|
463
|
+
resource_name,
|
|
464
|
+
__props__,
|
|
465
|
+
opts)
|
|
466
|
+
|
|
467
|
+
@staticmethod
|
|
468
|
+
def get(resource_name: str,
|
|
469
|
+
id: pulumi.Input[str],
|
|
470
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
471
|
+
force_attach: Optional[pulumi.Input[bool]] = None,
|
|
472
|
+
port: Optional[pulumi.Input[int]] = None,
|
|
473
|
+
scaling_group_id: Optional[pulumi.Input[str]] = None,
|
|
474
|
+
server_group_id: Optional[pulumi.Input[str]] = None,
|
|
475
|
+
type: Optional[pulumi.Input[str]] = None,
|
|
476
|
+
weight: Optional[pulumi.Input[int]] = None) -> 'ServerGroupAttachment':
|
|
477
|
+
"""
|
|
478
|
+
Get an existing ServerGroupAttachment resource's state with the given name, id, and optional extra
|
|
479
|
+
properties used to qualify the lookup.
|
|
480
|
+
|
|
481
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
482
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
483
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
484
|
+
:param pulumi.Input[bool] force_attach: If instances of scaling group are attached/removed from backend server when
|
|
485
|
+
server group from scaling group. Default to false.
|
|
486
|
+
:param pulumi.Input[int] port: The port will be used for Server Group backend server.
|
|
487
|
+
:param pulumi.Input[str] scaling_group_id: ID of the scaling group.
|
|
488
|
+
:param pulumi.Input[str] server_group_id: ID of Server Group.
|
|
489
|
+
:param pulumi.Input[str] type: The type of server group N. Valid values: ALB, NLB.
|
|
490
|
+
:param pulumi.Input[int] weight: The weight of an ECS instance attached to the Server Group.
|
|
491
|
+
"""
|
|
492
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
493
|
+
|
|
494
|
+
__props__ = _ServerGroupAttachmentState.__new__(_ServerGroupAttachmentState)
|
|
495
|
+
|
|
496
|
+
__props__.__dict__["force_attach"] = force_attach
|
|
497
|
+
__props__.__dict__["port"] = port
|
|
498
|
+
__props__.__dict__["scaling_group_id"] = scaling_group_id
|
|
499
|
+
__props__.__dict__["server_group_id"] = server_group_id
|
|
500
|
+
__props__.__dict__["type"] = type
|
|
501
|
+
__props__.__dict__["weight"] = weight
|
|
502
|
+
return ServerGroupAttachment(resource_name, opts=opts, __props__=__props__)
|
|
503
|
+
|
|
504
|
+
@property
|
|
505
|
+
@pulumi.getter(name="forceAttach")
|
|
506
|
+
def force_attach(self) -> pulumi.Output[Optional[bool]]:
|
|
507
|
+
"""
|
|
508
|
+
If instances of scaling group are attached/removed from backend server when
|
|
509
|
+
server group from scaling group. Default to false.
|
|
510
|
+
"""
|
|
511
|
+
return pulumi.get(self, "force_attach")
|
|
512
|
+
|
|
513
|
+
@property
|
|
514
|
+
@pulumi.getter
|
|
515
|
+
def port(self) -> pulumi.Output[int]:
|
|
516
|
+
"""
|
|
517
|
+
The port will be used for Server Group backend server.
|
|
518
|
+
"""
|
|
519
|
+
return pulumi.get(self, "port")
|
|
520
|
+
|
|
521
|
+
@property
|
|
522
|
+
@pulumi.getter(name="scalingGroupId")
|
|
523
|
+
def scaling_group_id(self) -> pulumi.Output[str]:
|
|
524
|
+
"""
|
|
525
|
+
ID of the scaling group.
|
|
526
|
+
"""
|
|
527
|
+
return pulumi.get(self, "scaling_group_id")
|
|
528
|
+
|
|
529
|
+
@property
|
|
530
|
+
@pulumi.getter(name="serverGroupId")
|
|
531
|
+
def server_group_id(self) -> pulumi.Output[str]:
|
|
532
|
+
"""
|
|
533
|
+
ID of Server Group.
|
|
534
|
+
"""
|
|
535
|
+
return pulumi.get(self, "server_group_id")
|
|
536
|
+
|
|
537
|
+
@property
|
|
538
|
+
@pulumi.getter
|
|
539
|
+
def type(self) -> pulumi.Output[str]:
|
|
540
|
+
"""
|
|
541
|
+
The type of server group N. Valid values: ALB, NLB.
|
|
542
|
+
"""
|
|
543
|
+
return pulumi.get(self, "type")
|
|
544
|
+
|
|
545
|
+
@property
|
|
546
|
+
@pulumi.getter
|
|
547
|
+
def weight(self) -> pulumi.Output[int]:
|
|
548
|
+
"""
|
|
549
|
+
The weight of an ECS instance attached to the Server Group.
|
|
550
|
+
"""
|
|
551
|
+
return pulumi.get(self, "weight")
|
|
552
|
+
|
pulumi_alicloud/ga/_inputs.py
CHANGED
|
@@ -249,7 +249,7 @@ class ForwardingRuleRuleActionArgs:
|
|
|
249
249
|
rule_action_value: Optional[pulumi.Input[str]] = None):
|
|
250
250
|
"""
|
|
251
251
|
:param pulumi.Input[int] order: Forwarding priority.
|
|
252
|
-
:param pulumi.Input[str] rule_action_type:
|
|
252
|
+
:param pulumi.Input[str] rule_action_type: The type of the forwarding action. Valid values: `ForwardGroup`, `Redirect`, `FixResponse`, `Rewrite`, `AddHeader`, `RemoveHeader`, `Drop`.
|
|
253
253
|
:param pulumi.Input['ForwardingRuleRuleActionForwardGroupConfigArgs'] forward_group_config: Forwarding configuration. See `forward_group_config` below.
|
|
254
254
|
> **NOTE:** From version 1.207.0, We recommend that you do not use `forward_group_config`, and we recommend that you use the `rule_action_type` and `rule_action_value` to configure forwarding actions.
|
|
255
255
|
:param pulumi.Input[str] rule_action_value: The value of the forwarding action type. For more information, see [How to use it](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createforwardingrules).
|
|
@@ -277,7 +277,7 @@ class ForwardingRuleRuleActionArgs:
|
|
|
277
277
|
@pulumi.getter(name="ruleActionType")
|
|
278
278
|
def rule_action_type(self) -> pulumi.Input[str]:
|
|
279
279
|
"""
|
|
280
|
-
|
|
280
|
+
The type of the forwarding action. Valid values: `ForwardGroup`, `Redirect`, `FixResponse`, `Rewrite`, `AddHeader`, `RemoveHeader`, `Drop`.
|
|
281
281
|
"""
|
|
282
282
|
return pulumi.get(self, "rule_action_type")
|
|
283
283
|
|
|
@@ -360,23 +360,28 @@ class ForwardingRuleRuleConditionArgs:
|
|
|
360
360
|
def __init__(__self__, *,
|
|
361
361
|
rule_condition_type: pulumi.Input[str],
|
|
362
362
|
host_configs: Optional[pulumi.Input[Sequence[pulumi.Input['ForwardingRuleRuleConditionHostConfigArgs']]]] = None,
|
|
363
|
-
path_config: Optional[pulumi.Input['ForwardingRuleRuleConditionPathConfigArgs']] = None
|
|
363
|
+
path_config: Optional[pulumi.Input['ForwardingRuleRuleConditionPathConfigArgs']] = None,
|
|
364
|
+
rule_condition_value: Optional[pulumi.Input[str]] = None):
|
|
364
365
|
"""
|
|
365
|
-
:param pulumi.Input[str] rule_condition_type: The type of the forwarding conditions. Valid values: `Host`, `Path`.
|
|
366
|
+
:param pulumi.Input[str] rule_condition_type: The type of the forwarding conditions. Valid values: `Host`, `Path`, `RequestHeader`, `Query`, `Method`, `Cookie`, `SourceIP`. **NOTE:** From version 1.231.0, `rule_condition_type` can be set to `RequestHeader`, `Query`, `Method`, `Cookie`, `SourceIP`.
|
|
366
367
|
:param pulumi.Input[Sequence[pulumi.Input['ForwardingRuleRuleConditionHostConfigArgs']]] host_configs: The configuration of the domain name. See `host_config` below.
|
|
368
|
+
> **NOTE:** From version 1.231.0, We recommend that you do not use `path_config` or `host_config`, and we recommend that you use the `rule_condition_type` and `rule_condition_value` to configure forwarding conditions.
|
|
367
369
|
:param pulumi.Input['ForwardingRuleRuleConditionPathConfigArgs'] path_config: The configuration of the path. See `path_config` below.
|
|
370
|
+
:param pulumi.Input[str] rule_condition_value: The value of the forwarding condition type. For more information, see [How to use it](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createforwardingrules).
|
|
368
371
|
"""
|
|
369
372
|
pulumi.set(__self__, "rule_condition_type", rule_condition_type)
|
|
370
373
|
if host_configs is not None:
|
|
371
374
|
pulumi.set(__self__, "host_configs", host_configs)
|
|
372
375
|
if path_config is not None:
|
|
373
376
|
pulumi.set(__self__, "path_config", path_config)
|
|
377
|
+
if rule_condition_value is not None:
|
|
378
|
+
pulumi.set(__self__, "rule_condition_value", rule_condition_value)
|
|
374
379
|
|
|
375
380
|
@property
|
|
376
381
|
@pulumi.getter(name="ruleConditionType")
|
|
377
382
|
def rule_condition_type(self) -> pulumi.Input[str]:
|
|
378
383
|
"""
|
|
379
|
-
The type of the forwarding conditions. Valid values: `Host`, `Path`.
|
|
384
|
+
The type of the forwarding conditions. Valid values: `Host`, `Path`, `RequestHeader`, `Query`, `Method`, `Cookie`, `SourceIP`. **NOTE:** From version 1.231.0, `rule_condition_type` can be set to `RequestHeader`, `Query`, `Method`, `Cookie`, `SourceIP`.
|
|
380
385
|
"""
|
|
381
386
|
return pulumi.get(self, "rule_condition_type")
|
|
382
387
|
|
|
@@ -389,6 +394,7 @@ class ForwardingRuleRuleConditionArgs:
|
|
|
389
394
|
def host_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ForwardingRuleRuleConditionHostConfigArgs']]]]:
|
|
390
395
|
"""
|
|
391
396
|
The configuration of the domain name. See `host_config` below.
|
|
397
|
+
> **NOTE:** From version 1.231.0, We recommend that you do not use `path_config` or `host_config`, and we recommend that you use the `rule_condition_type` and `rule_condition_value` to configure forwarding conditions.
|
|
392
398
|
"""
|
|
393
399
|
return pulumi.get(self, "host_configs")
|
|
394
400
|
|
|
@@ -408,6 +414,18 @@ class ForwardingRuleRuleConditionArgs:
|
|
|
408
414
|
def path_config(self, value: Optional[pulumi.Input['ForwardingRuleRuleConditionPathConfigArgs']]):
|
|
409
415
|
pulumi.set(self, "path_config", value)
|
|
410
416
|
|
|
417
|
+
@property
|
|
418
|
+
@pulumi.getter(name="ruleConditionValue")
|
|
419
|
+
def rule_condition_value(self) -> Optional[pulumi.Input[str]]:
|
|
420
|
+
"""
|
|
421
|
+
The value of the forwarding condition type. For more information, see [How to use it](https://www.alibabacloud.com/help/en/global-accelerator/latest/api-ga-2019-11-20-createforwardingrules).
|
|
422
|
+
"""
|
|
423
|
+
return pulumi.get(self, "rule_condition_value")
|
|
424
|
+
|
|
425
|
+
@rule_condition_value.setter
|
|
426
|
+
def rule_condition_value(self, value: Optional[pulumi.Input[str]]):
|
|
427
|
+
pulumi.set(self, "rule_condition_value", value)
|
|
428
|
+
|
|
411
429
|
|
|
412
430
|
@pulumi.input_type
|
|
413
431
|
class ForwardingRuleRuleConditionHostConfigArgs:
|