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

CloudOps Orchestration Service:複数ディスクの一括サイズ変更

最終更新日:Jan 17, 2025

テンプレート名

ACS-ECS-BulkyResizeDisk

今すぐ実行

テンプレートの説明

複数のディスクのサイズを一度に変更します。

テンプレートタイプ

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

タイプ

必須

デフォルト値

制限

diskIds

サイズ変更対象のディスクの ID。

リスト

はい

newSize

ディスクのサイズ変更後のディスク容量。

数値

はい

regionId

リージョン ID。

文字列

いいえ

{{ ACS::RegionId }}

type

ディスクのサイズ変更に使用するメソッド。

文字列

いいえ

offline

rateControl

レート制御設定。

JSON

いいえ

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

CloudOps Orchestration サービス (OOS) によってアシュームされるResource Access Management (RAM) ロール。

文字列

いいえ

""

出力パラメーター

なし

テンプレートの実行に必要な権限ポリシー

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:ResizeDisk"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

参照

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

テンプレートコンテンツ

FormatVersion: OOS-2019-06-01
Description:
  en: Bulky resize disk
  zh-cn: the description in Chinese
  name-en: ACS-ECS-BulkyResizeDisk
  name-zh-cn: the description in Chinese
  categories:
    - instance_manage
    - computenest
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: the description in Chinese
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  diskIds:
    Label:
      en: DiskIds
      zh-cn: the description in Chinese
    AssociationProperty: ALIYUN::ECS::Disk::DiskId
    AssociationPropertyMetadata:
      RegionId: regionId
    Type: List
  newSize:
    Label:
      en: NewSize
      zh-cn: the description in Chinese
    Type: Number
    MinValue: 20
    MaxValue: 32768
  type:
    Label:
      en: Type
      zh-cn: the description in Chinese
    Description:
      en: < p class = "P" > value range:</p>
        <ul class="ul">
        < Li class = "Li" > offline (default):offline capacity expansion. After capacity expansion, you must restart the instance on the console or call the API to make the operation effective</ li>
        < Li class = "Li" > online:online capacity expansion, which can be completed without restarting the instance. The cloud disk type supports efficient cloud disk, SSD cloud disk and ESSD cloud disk</ li>
        </ul>
      zh-cn: the description in Chinese
        <ul class="ul">
          </li>
          </li>
        </ul>
    Type: String
    AllowedValues:
      - online
      - offline
    Default: offline
  rateControl:
    Label:
      en: RateControl
      zh-cn: the description in Chinese
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: the description in Chinese
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: resizeDisk
  Action: ACS::ExecuteApi
  Description:
    en: Resize disk
    zh-cn: the description in Chinese
  Properties:
    Service: ECS
    API: ResizeDisk
    Parameters:
      RegionId: '{{ regionId }}'
      DiskId: '{{ ACS::TaskLoopItem }}'
      NewSize: '{{ newSize }}'
      Type: '{{ type }}'
  Loop:
    RateControl: '{{ rateControl }}'
    Items: '{{ diskIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - diskIds
          - newSize
          - type
        Label:
          default:
            zh-cn: the description in Chinese
            en: Configure Parameters
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: the description in Chinese
            en: Control Options