全部产品
Search
文档中心

资源编排:ALIYUN::PVTZ::SyncEcsHost

更新时间:Dec 03, 2024

ALIYUN::PVTZ::SyncEcsHost类型用于新增主机名同步任务。

语法

{
  "Type": "ALIYUN::PVTZ::SyncEcsHost",
  "Properties": {
    "Regions": List,
    "Status": String,
    "ZoneId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Regions

List

待同步的地域信息列表。

{'Length': {'Min': 1, 'Max': 500}}

Status

String

主机同步任务状态。

取值:

  • ON:开启

  • OFF:关闭

ZoneId

String

Zone ID。

Regions语法

"Regions": [
  {
    "UserId": String,
    "RegionId": String
  }
]

Regions属性

属性名称

类型

必须

允许更新

描述

约束

RegionId

String

地域 ID。

UserId

String

地域归属的用户 ID。

用于跨账号同步场景。

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Status:
    Type: String
    Description:
      en: 'The host synchronizes the task state. Valid values: ON, OFF.'
    AllowedValues:
      - 'ON'
      - 'OFF'
    Required: true
  ZoneId:
    AssociationProperty: ZoneId
    Type: String
    Description:
      en: Zone ID, a unique identifier for the Zone.
    Required: true
  Regions:
    AssociationPropertyMetadata:
      Parameters:
        UserId:
          Type: String
          Description:
            en: Region-owned user ID for cross-account sync scenarios.
          Required: false
        RegionId:
          Type: String
          Description:
            en: Region id.
          Required: true
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: A list of region information to be synchronized.
    Required: true
    MinLength: 1
    MaxLength: 500
Resources:
  SyncEcsHost:
    Type: ALIYUN::PVTZ::SyncEcsHost
    Properties:
      Status:
        Ref: Status
      ZoneId:
        Ref: ZoneId
      Regions:
        Ref: Regions
JSON格式
 
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Status": {
      "Type": "String",
      "Description": {
        "en": "The host synchronizes the task state. Valid values: ON, OFF."
      },
      "AllowedValues": [
        "ON",
        "OFF"
      ],
      "Required": true
    },
    "ZoneId": {
      "AssociationProperty": "ZoneId",
      "Type": "String",
      "Description": {
        "en": "Zone ID, a unique identifier for the Zone."
      },
      "Required": true
    },
    "Regions": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "UserId": {
            "Type": "String",
            "Description": {
              "en": "Region-owned user ID for cross-account sync scenarios."
            },
            "Required": false
          },
          "RegionId": {
            "Type": "String",
            "Description": {
              "en": "Region id."
            },
            "Required": true
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "A list of region information to be synchronized."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 500
    }
  },
  "Resources": {
    "SyncEcsHost": {
      "Type": "ALIYUN::PVTZ::SyncEcsHost",
      "Properties": {
        "Status": {
          "Ref": "Status"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "Regions": {
          "Ref": "Regions"
        }
      }
    }
  }
}