すべてのプロダクト
Search
ドキュメントセンター

CloudOps Orchestration Service:ACS-ECS-ResetDiskWithSnapshot

最終更新日:Jan 17, 2025

テンプレート名

ACS-ECS-ResetDiskWithSnapshot

今すぐ実行

テンプレートの説明

スナップショットを使用してディスクをリセットします。

テンプレートの種類

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

種類

必須

デフォルト値

制限

regionId

リージョン ID。

String

はい

instanceId

Elastic Compute Service (ECS) インスタンスの ID。

String

はい

diskId

ディスク ID。

String

はい

snapshotId

スナップショット ID。

String

はい

OOSAssumeRole

CloudOps Orchestration Service (OOS) によって引き受けられる Resource Access Management (RAM) ロール。

String

いいえ

""

出力パラメーター

なし

テンプレートを実行するために必要な権限ポリシー

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeDisks",
                "ecs:DescribeInstances",
                "ecs:ResetDisk",
                "ecs:StartInstance",
                "ecs:StopInstance"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

参照

詳細については、GitHub の ACS-ECS-ResetDiskWithSnapshot.yml をご参照ください。

テンプレートの内容

FormatVersion: OOS-2019-06-01
Description:
  en: Use snapshot to create a temporary cloud disk to restore data
  zh-cn: the description in Chinese
  name-en: ACS-ECS-ResetDiskWithSnapshot
  name-zh-cn: the description in Chinese
  categories:
    - instance_manage
    - computenest
    - application_manage
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: the description in Chinese
    AssociationProperty: RegionId
  instanceId:
    Type: String
    Label:
      en: InstanceId
      zh-cn: the description in Chinese
    AssociationProperty: ALIYUN::ECS::Instance::InstanceId
    AssociationPropertyMetadata:
      RegionId: regionId
      Status: Running
  diskId:
    Type: String
    Label:
      en: Disk id
      zh-cn: the description in Chinese
    AssociationProperty: ALIYUN::ECS::Disk::DiskId
    AssociationPropertyMetadata:
      RegionId: regionId
      InstanceId: instanceId
  snapshotId:
    Type: String
    Label:
      en: Snapshot id
      zh-cn: the description in Chinese
    AssociationProperty: ALIYUN::ECS::Snapshot::SnapshotId
    AssociationPropertyMetadata:
      DiskId: diskId
  OOSAssumeRole:
    Type: String
    Label:
      en: OOSAssumeRole
      zh-cn: the description in Chinese
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: resetDisk
    Action: 'ACS::ECS::ResetDisk'
    Description:
      en: Resets the ECS disk
      zh-cn: the description in Chinese
    Properties:
      regionId: '{{ regionId }}'
      diskId: '{{ diskId }}'
      snapshotId: '{{ snapshotId }}'
      instanceId: '{{ instanceId }}'