-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::ECS::DeleteInstance.yml
49 lines (49 loc) · 1.29 KB
/
ACS::ECS::DeleteInstance.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
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::ECS::DeleteInstance
name-zh-cn: 删除实例(ECS)
en: Deletes ECS instance by specifying instance ID
zh-cn: 通过指定的实例ID删除ECS实例
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地域ID
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: ECSInstanceId
zh-cn: ECS实例ID
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
Tasks:
- Name: checkInstanceReady
Action: ACS::CheckFor
Description:
en: Checks ECS instance is in the Stopped status
zh-cn: 检测ECS实例是否为已停止状态
Properties:
Service: ECS
API: DescribeInstances
Parameters:
RegionId: '{{ regionId }}'
InstanceIds:
- '{{ instanceId }}'
DesiredValues:
- Stopped
PropertySelector: Instances.Instance[].Status
- Name: deleteInstance
Action: ACS::ExecuteAPI
Description:
en: Deletes ECS instance with the specified instance ID
zh-cn: 通过指定的实例ID删除ECS实例
Properties:
Service: ECS
API: DeleteInstance
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ instanceId }}'