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

CloudOps Orchestration Service:複数クラスターの削除保護を有効にする

最終更新日:Jan 17, 2025

テンプレート名

ACS-CS-BulkyEnableDeletionProtection

今すぐ実行

テンプレートの説明

クラスターの削除保護を有効にします。

テンプレートの種類

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

種類

必須

デフォルト値

制限

clusterIds

クラスターの ID。

リスト

はい

regionId

リージョン ID。

文字列

いいえ

{{ ACS::RegionId }}

rateControl

レート制御設定。

JSON

いいえ

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

OOSAssumeRole

CloudOps Orchestration Service (OOS) によってアシュームされる RAM ロール。

文字列

いいえ

""

出力パラメーター

なし

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

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "cs:ModifyCluster"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

参照

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

テンプレートの内容

FormatVersion: OOS-2019-06-01
Description:
  en: Enable deletion protection for the cluster
   
  name-en: ACS-CS-BulkyEnableDeletionProtection
   
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: RegionId
       
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  clusterIds:
    Label:
      en: Cluster Ids
       
    Type: List
  rateControl:
    Label:
      en: RateControl
       
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
       
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: modifyCluster
    Action: ACS::ExecuteAPI
    Properties:
      Service: CS
      API: ModifyCluster
      Method: PUT
      URI: /api/v2/clusters/{{ ACS::TaskLoopItem }}
      Parameters: null
      Body: '{"deletion_protection":true}'
    Description:
      en: Executes a command in cluster
       
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ clusterIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - clusterIds
          - regionId
        Label:
          default:
             
            en: Configure Parameters
      - Parameters:
          - OOSAssumeRole
        Label:
          default:
             
            en: Control Options