-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::ECS::AttachDisk.yml
63 lines (63 loc) · 1.7 KB
/
ACS::ECS::AttachDisk.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
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::ECS::AttachDisk
name-zh-cn: 为ECS实例挂载云盘
en: Attach a pay-as-you-go data disk or a system disk to an ECS instance
zh-cn: 为一台ECS实例挂载一块按量付费数据盘,或者挂载一块系统盘
Parameters:
regionId:
Description:
en: The ID of region
zh-cn: 地域ID
Type: String
Default: '{{ ACS::RegionId }}'
instanceId:
Description:
en: The ID of the instance
zh-cn: 实例ID
Type: String
MinLength: 1
MaxLength: 30
diskId:
Description:
en: The ID of the disk to be attached
zh-cn: 需要挂载的数据盘ID
Type: String
AllowedPattern: d-[A-Za-z0-9]*
MinLength: 1
MaxLength: 30
deleteWithInstance:
Description:
en: The disk will be deleted with instance when deleting instance, the defalut is false
zh-cn: 删除实例时选择是否删除数据盘,默认为不删除
Type: Boolean
Default: false
Tasks:
- Name: attachDisk
Action: ACS::ExecuteAPI
Description:
en: Attaches a data disk to an ECS instance
zh-cn: 挂载数据盘到ECS实例上
Properties:
Service: ECS
API: AttachDisk
Parameters:
RegionId: '{{ regionId }}'
DiskId: '{{ diskId }}'
InstanceId: '{{ instanceId }}'
DeleteWithInstance: '{{ deleteWithInstance }}'
- Name: untilDiskAttached
Action: ACS::WaitFor
Description:
en: Waits for the disk to be attached
zh-cn: 等待数据盘挂载完成
Properties:
Service: ECS
API: DescribeDisks
Parameters:
RegionId: '{{ regionId }}'
DiskIds:
- '{{ diskId }}'
DesiredValues:
- In_use
PropertySelector: Disks.Disk[].Status