Template name
ACS-ECS-ResetDiskWithSnapshot: Restores data from a snapshot.
Template description
Creates a temporary cloud disk from a snapshot to restore data.
Template type
Automation
Owner
Alibaba Cloud
Input parameters
|
Parameter name |
Description |
Type |
Required |
Default value |
Constraints |
|
regionId |
The ID of the region. |
String |
Yes |
||
|
instanceId |
The ID of the instance. |
String |
Yes |
||
|
diskId |
The ID of the cloud disk. |
String |
Yes |
||
|
snapshotId |
The ID of the snapshot. |
String |
Yes |
||
|
OOSAssumeRole |
The RAM role that OOS assumes. |
String |
No |
"" |
Output parameters
None
Access policy required to execute this template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeDisks",
"ecs:DescribeInstances",
"ecs:ResetDisk",
"ecs:StartInstance",
"ecs:StopInstance"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Details
ACS-ECS-ResetDiskWithSnapshot details
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Use a snapshot to create a temporary cloud disk to restore data.
zh-cn: Use a snapshot to create a temporary cloud disk to restore data.
name-en: ACS-ECS-ResetDiskWithSnapshot
name-zh-cn: Restore data from a snapshot
categories:
- instance_manage
- computenest
- application_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: Region ID
AssociationProperty: RegionId
instanceId:
Type: String
Label:
en: InstanceId
zh-cn: Instance ID
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
Status: Running
diskId:
Type: String
Label:
en: Disk id
zh-cn: Disk ID
AssociationProperty: ALIYUN::ECS::Disk::DiskId
AssociationPropertyMetadata:
RegionId: regionId
InstanceId: instanceId
snapshotId:
Type: String
Label:
en: Snapshot id
zh-cn: Snapshot ID
AssociationProperty: ALIYUN::ECS::Snapshot::SnapshotId
AssociationPropertyMetadata:
DiskId: diskId
OOSAssumeRole:
Type: String
Label:
en: OOSAssumeRole
zh-cn: The RAM role that OOS assumes
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: resetDisk
Action: 'ACS::ECS::ResetDisk'
Description:
en: Resets the ECS disk
zh-cn: Reset the ECS cloud disk
Properties:
regionId: '{{ regionId }}'
diskId: '{{ diskId }}'
snapshotId: '{{ snapshotId }}'
instanceId: '{{ instanceId }}'