ALIYUN::HDR::SitePair

更新时间:
复制为 MD 格式

ALIYUN::HDR::SitePair类型用于创建容灾站点对。

语法

{
  "Type": "ALIYUN::HDR::SitePair",
  "Properties": {
    "PrimarySiteType": String,
    "PrimarySiteName": String,
    "PrimarySiteVpcId": String,
    "PrimarySiteRegionId": String,
    "SecondarySiteVpcId": String,
    "SecondarySiteName": String,
    "SecondarySiteType": String,
    "SecondarySiteRegionId": String,
    "PrimarySiteZoneId": String,
    "SecondarySiteZoneId": String,
    "SitePairType": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

PrimarySiteType

String

主站站点类型。

PrimarySiteName

String

主站站点名称。

PrimarySiteVpcId

String

主站 VPC ID。

PrimarySiteRegionId

String

主站地域 ID。

SecondarySiteVpcId

String

从站专有网络 ID。

SecondarySiteName

String

从站站点名称。

SecondarySiteType

String

从站站点类型。

SecondarySiteRegionId

String

从站地域 ID。

PrimarySiteZoneId

String

主站可用区 ID。

站点对类型为跨可用区容灾时有效。

SecondarySiteZoneId

String

从站可用区 ID。

仅站点对类型为跨可用区容灾时有效。

SitePairType

String

站点对类型。

取值:

  • cloud2cloud:cloud2cloud。

  • zone2zone:zone2zone。

返回值

Fn::GetAtt

  • PrimarySiteId:主站站点 ID

  • SitePairId:站点对 ID

  • SecondarySiteId:从站站点 ID

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  PrimarySiteType:
    Type: String
    Description:
      en: 'The type of the primary site. Valid values: VPC, VSwitch, VRouter.'
    Required: true
  SecondarySiteVpcId:
    Type: String
    Description:
      en: The VPC ID of the secondary site.
    Required: true
  PrimarySiteName:
    Type: String
    Description:
      en: The name of the primary site.
    Required: true
  SecondarySiteName:
    Type: String
    Description:
      en: The name of the secondary site.
    Required: true
  SecondarySiteType:
    Type: String
    Description:
      en: 'The type of the secondary site. Valid values: VPC, VSwitch, VRouter.'
    Required: true
  PrimarySiteVpcId:
    Type: String
    Description:
      en: The VPC ID of the primary site.
    Required: true
  PrimarySiteRegionId:
    Type: String
    Description:
      en: The region ID of the primary site.
    Required: true
  SecondarySiteRegionId:
    Type: String
    Description:
      en: The region ID of the secondary site.
    Required: true
Resources:
  SitePair:
    Type: ALIYUN::HDR::SitePair
    Properties:
      PrimarySiteType:
        Ref: PrimarySiteType
      SecondarySiteVpcId:
        Ref: SecondarySiteVpcId
      PrimarySiteName:
        Ref: PrimarySiteName
      SecondarySiteName:
        Ref: SecondarySiteName
      SecondarySiteType:
        Ref: SecondarySiteType
      PrimarySiteVpcId:
        Ref: PrimarySiteVpcId
      PrimarySiteRegionId:
        Ref: PrimarySiteRegionId
      SecondarySiteRegionId:
        Ref: SecondarySiteRegionId
Outputs:
  PrimarySiteId:
    Description: The ID of the primary site.
    Value:
      Fn::GetAtt:
        - SitePair
        - PrimarySiteId
  SitePairId:
    Description: The ID of the site pair.
    Value:
      Fn::GetAtt:
        - SitePair
        - SitePairId
  SecondarySiteId:
    Description: The ID of the secondary site.
    Value:
      Fn::GetAtt:
        - SitePair
        - SecondarySiteId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PrimarySiteType": {
      "Type": "String",
      "Description": {
        "en": "The type of the primary site. Valid values: VPC, VSwitch, VRouter."
      },
      "Required": true
    },
    "SecondarySiteVpcId": {
      "Type": "String",
      "Description": {
        "en": "The VPC ID of the secondary site."
      },
      "Required": true
    },
    "PrimarySiteName": {
      "Type": "String",
      "Description": {
        "en": "The name of the primary site."
      },
      "Required": true
    },
    "SecondarySiteName": {
      "Type": "String",
      "Description": {
        "en": "The name of the secondary site."
      },
      "Required": true
    },
    "SecondarySiteType": {
      "Type": "String",
      "Description": {
        "en": "The type of the secondary site. Valid values: VPC, VSwitch, VRouter."
      },
      "Required": true
    },
    "PrimarySiteVpcId": {
      "Type": "String",
      "Description": {
        "en": "The VPC ID of the primary site."
      },
      "Required": true
    },
    "PrimarySiteRegionId": {
      "Type": "String",
      "Description": {
        "en": "The region ID of the primary site."
      },
      "Required": true
    },
    "SecondarySiteRegionId": {
      "Type": "String",
      "Description": {
        "en": "The region ID of the secondary site."
      },
      "Required": true
    }
  },
  "Resources": {
    "SitePair": {
      "Type": "ALIYUN::HDR::SitePair",
      "Properties": {
        "PrimarySiteType": {
          "Ref": "PrimarySiteType"
        },
        "SecondarySiteVpcId": {
          "Ref": "SecondarySiteVpcId"
        },
        "PrimarySiteName": {
          "Ref": "PrimarySiteName"
        },
        "SecondarySiteName": {
          "Ref": "SecondarySiteName"
        },
        "SecondarySiteType": {
          "Ref": "SecondarySiteType"
        },
        "PrimarySiteVpcId": {
          "Ref": "PrimarySiteVpcId"
        },
        "PrimarySiteRegionId": {
          "Ref": "PrimarySiteRegionId"
        },
        "SecondarySiteRegionId": {
          "Ref": "SecondarySiteRegionId"
        }
      }
    }
  },
  "Outputs": {
    "PrimarySiteId": {
      "Description": "The ID of the primary site.",
      "Value": {
        "Fn::GetAtt": [
          "SitePair",
          "PrimarySiteId"
        ]
      }
    },
    "SitePairId": {
      "Description": "The ID of the site pair.",
      "Value": {
        "Fn::GetAtt": [
          "SitePair",
          "SitePairId"
        ]
      }
    },
    "SecondarySiteId": {
      "Description": "The ID of the secondary site.",
      "Value": {
        "Fn::GetAtt": [
          "SitePair",
          "SecondarySiteId"
        ]
      }
    }
  }
}