ALIYUN::HBR::BackupClients類型用于為ECS實例安裝備份客戶端。

語法

{
  "Type": "ALIYUN::HBR::BackupClients",
  "Properties": {
    "InstanceIds": List,
    "Tags": List
  }
}

屬性

屬性名稱 類型 必須 允許更新 描述 約束
InstanceIds List 安裝ECS備份客戶端的實例ID。 最多支持為20個ECS實例安裝備份客戶端。
Tags List 用戶自定義標簽。 更多信息,請參見Tags屬性

Tags語法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags屬性

屬性名稱 類型 必須 允許更新 描述 約束
Key String 標簽鍵。 長度為1~128個字符,不能以aliyunacs:開頭,不能包含http://https://
Value String 標簽值。 長度為0~128個字符,不能以aliyunacs:開頭,不能包含http://https://

返回值

Fn::GetAtt

  • InstanceIds:ECS實例ID。
  • ClientIds:備份客戶端ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceIds": {
      "Type": "Json",
      "Description": "ID list of instances to install backup client",
      "MinLength": 1,
      "MaxLength": 20
    }
  },
  "Resources": {
    "BackupClients": {
      "Type": "ALIYUN::HBR::BackupClients",
      "Properties": {
        "InstanceIds": {
          "Ref": "InstanceIds"
        }
      }
    }
  },
  "Outputs": {
    "InstanceIds": {
      "Description": "ID list of instances to install backup client",
      "Value": {
        "Fn::GetAtt": [
          "BackupClients",
          "InstanceIds"
        ]
      }
    },
    "ClientIds": {
      "Description": "ID list of clients installed in instances",
      "Value": {
        "Fn::GetAtt": [
          "BackupClients",
          "ClientIds"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceIds:
    Type: Json
    Description: ID list of instances to install backup client
    MinLength: 1
    MaxLength: 20
Resources:
  BackupClients:
    Type: 'ALIYUN::HBR::BackupClients'
    Properties:
      InstanceIds:
        Ref: InstanceIds
Outputs:
  InstanceIds:
    Description: ID list of instances to install backup client
    Value:
      'Fn::GetAtt':
        - BackupClients
        - InstanceIds
  ClientIds:
    Description: ID list of clients installed in instances
    Value:
      'Fn::GetAtt':
        - BackupClients
        - ClientIds