-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::ECS::AttachEipToInstance.yml
54 lines (54 loc) · 1.25 KB
/
ACS::ECS::AttachEipToInstance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FormatVersion: OOS-2019-06-01
Description:
en: Attach EIP to ECS instance
zh-cn: 绑定EIP到ECS实例
name-en: ACS::ECS::AttachEipToInstance
name-zh-cn: 绑定EIP到ECS实例
Parameters:
EipIds:
Label:
en: EipIds
zh-cn: EipId列表
Type: List
regionId:
Label:
en: RegionId
zh-cn: 地域ID
Type: String
instanceId:
Label:
en: InstanceId
zh-cn: ECS实例ID
Type: String
Tasks:
- Name: getEip
Action: ACS::ExecuteApi
Description:
en: Get the allocation id of EIP
zh-cn: 获取EIP实例ID
Properties:
Service: VPC
API: DescribeEipAddresses
Parameters:
RegionId: '{{ regionId }}'
Status: Available
AllocationId:
Fn::Join:
- ','
- '{{ EipIds }}'
Outputs:
allocationId:
Type: String
ValueSelector: EipAddresses.EipAddress[].AllocationId
- Name: associateEipAddress
Action: ACS::ExecuteApi
Description:
en: Bind the EIP to instance
zh-cn: 绑定EIP到实例
Properties:
Service: ECS
API: AssociateEipAddress
Parameters:
RegionId: '{{ regionId }}'
AllocationId: '{{ getEip.allocationId }}'
InstanceId: '{{ instanceId }}'