全部产品
Search
文档中心

CloudOps Orchestration Service:ACS-KMS-BulkySetDeletionProtection

更新时间:Jun 28, 2025

Nama template

ACS-KMS-BulkySetDeletionProtection

Eksekusi Sekarang

Deskripsi template

Mengaktifkan perlindungan penghapusan untuk Customer Master Keys (CMK).

Jenis template

Otomatis

Pemilik

Alibaba Cloud

Parameter input

Parameter

Deskripsi

Tipe

Diperlukan

Nilai default

Batasan

keyId

ID kunci.

String

Ya

regionId

ID wilayah.

String

Tidak

{{ ACS::RegionId }}

rateControl

Pengaturan kontrol laju.

Json

Tidak

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

OOSAssumeRole

Peran RAM yang diasumsikan oleh CloudOps Orchestration Service (OOS).

String

Tidak

""

Parameter output

Tidak ada

Kebijakan izin yang diperlukan untuk mengeksekusi template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "kms:DescribeKey",
                "kms:SetDeletionProtection"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Referensi

Untuk informasi lebih lanjut, lihat ACS-KMS-BulkySetDeletionProtection.yml di GitHub.

Isi Template

FormatVersion: OOS-2019-06-01
Description:
  en: Enable deletion protection for CMK
   
  name-en: ACS-KMS-BulkySetDeletionProtection
   
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: RegionId
       
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  keyId:
    Label:
      en: The ids of key
       
    Type: String
  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: describeKey
    Action: ACS::ExecuteAPI
    Description:
      en: Query the arn of key
       
    Properties:
      Service: KMS
      API: DescribeKey
      Parameters:
        RegionId: '{{ regionId }}'
        KeyId: '{{ keyId }}'
    Outputs:
      arn:
        Type: List
        ValueSelector: '.KeyMetadata.Arn'
  - Name: setDeletionProtection
    Action: ACS::ExecuteAPI
    Description:
      en: Enable deletion protection for CMK.
       
    Properties:
      Service: KMS
      API: SetDeletionProtection
      Parameters:
        RegionId: '{{ regionId }}'
        ProtectedResourceArn: '{{ ACS::TaskLoopItem }}'
        EnableDeletionProtection: true
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ describeKey.arn }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - keyId
        Label:
          default:
             
            en: Select KMS Key
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
             
            en: Control Options