-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::ECS::AddEipToCommonBandwidthPackage.yml
85 lines (85 loc) · 2.52 KB
/
ACS::ECS::AddEipToCommonBandwidthPackage.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::ECS::AddEipToCommonBandwidthPackage
name-zh-cn: 添加EIP到共享带宽包
en: Add EIP to common bandwidth package
zh-cn: 添加EIP到共享带宽包
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地域ID
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
Default: '{{ ACS::RegionId }}'
eipAddress:
Label:
en: EIPAddress
zh-cn: EIP的IP地址
Type: String
bandwidthPackageId:
Label:
en: BandwidthPackageId
zh-cn: 共享带宽包ID
Type: String
Tasks:
- Name: getEipAttribute
Action: 'ACS::ExecuteApi'
Description:
en: Queries the allocation ID of EIP
zh-cn: 获取EIP实例ID
Properties:
Service: VPC
API: DescribeEipAddresses
Parameters:
RegionId: '{{ regionId }}'
EipAddress: '{{ eipAddress }}'
Outputs:
allocationId:
Type: String
ValueSelector: 'EipAddresses.EipAddress[].AllocationId'
bandwidthPackageId:
Type: String
ValueSelector: 'EipAddresses.EipAddress[].BandwidthPackageId'
- Name: whetherEipInPackage
Action: 'ACS::Choice'
Description:
en: Choose next task by Eip status
zh-cn: 根据EIP的状态选择执行任务
Properties:
DefaultTask: removeCommonBandwidthPackageEip
Choices:
- When:
'Fn::Equals':
- '{{ bandwidthPackageId }}'
- '{{ getEipAttribute.bandwidthPackageId }}'
NextTask: 'ACS::END'
- When:
'Fn::Equals':
- ''
- '{{ getEipAttribute.bandwidthPackageId }}'
NextTask: addCommonBandwidthPackageIp
- Name: removeCommonBandwidthPackageEip
Action: 'ACS::ExecuteApi'
Description:
en: Removes Eip from CommonBandwidthPackage
zh-cn: 从共享带宽包中移出EIP
Properties:
Service: VPC
API: RemoveCommonBandwidthPackageIp
Parameters:
RegionId: '{{ regionId }}'
BandwidthPackageId: '{{ getEipAttribute.bandwidthPackageId }}'
IpInstanceId: '{{ getEipAttribute.allocationId }}'
- Name: addCommonBandwidthPackageIp
Action: 'ACS::ExecuteApi'
Description:
en: Adds EIP to CommonBandwidthPackage
zh-cn: 添加EIP到共享带宽包
Properties:
Service: VPC
API: AddCommonBandwidthPackageIp
Parameters:
RegionId: '{{ regionId }}'
BandwidthPackageId: '{{ bandwidthPackageId }}'
IpInstanceId: '{{ getEipAttribute.allocationId }}'