-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::SLB::SetLoadBalancerDeleteProtection.yml
64 lines (64 loc) · 1.94 KB
/
ACS::SLB::SetLoadBalancerDeleteProtection.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
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::SLB::SetLoadBalancerDeleteProtection
name-zh-cn: 修改负载均衡实例删除保护属性
en: Modify loadbalancer deletionProtection attribute
zh-cn: 修改负载均衡实例删除保护属性
Parameters:
regionId:
Description:
en: The ID of region
zh-cn: 地域ID
Type: String
Default: '{{ ACS::RegionId }}'
loadBalancerId:
Description:
en: The ID of loadBalancer
zh-cn: 负载均衡实例ID
Type: String
deleteProtection:
Description:
en: The LoadBalancerDeleteProtection status
zh-cn: 负载均衡删除保护状态
Type: String
Tasks:
- Name: getLoadBalancerAttribute
Action: ACS::ExecuteAPI
Description:
en: Queries the delete protection attribute by loadbalancer id
zh-cn: 获取负载均衡实例的删除保护属性
Properties:
Service: SLB
API: DescribeLoadBalancerAttribute
Parameters:
RegionId: '{{ regionId }}'
LoadBalancerId: '{{ loadBalancerId }}'
Outputs:
deletionProtection:
Type: String
ValueSelector: .DeleteProtection
- Name: whetherLoadBalancerIsDeleteProtection
Action: 'ACS::Choice'
Description:
en: Choose next task by LoadBalancer delete protection attribute
zh-cn: 根据负载均衡实例删除保护状态选择下一个任务
Properties:
DefaultTask: enableLoadBalancerIsDeleteProtection
Choices:
- When:
'Fn::Equals':
- 'on'
- '{{ getLoadBalancerAttribute.deletionProtection }}'
NextTask: ACS::END
- Name: enableLoadBalancerIsDeleteProtection
Action: ACS::ExecuteApi
Description:
en: Modifies loadbalancer deleteprotection
zh-cn: 修改负载均衡实例删除保护
Properties:
Service: SLB
API: SetLoadBalancerDeleteProtection
Parameters:
RegionId: '{{ regionId }}'
LoadBalancerId: '{{ loadBalancerId }}'
DeleteProtection: '{{ deleteProtection }}'