All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::HDR::SitePair

更新時間:Apr 02, 2026

The ALIYUN::HDR::SitePair resource type creates a disaster recovery site pair.

Syntax

{
  "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
  }
}

Properties

Property name

Type

Required

Updateable

Description

Constraint

PrimarySiteType

String

Yes

No

The type of the primary site.

None

PrimarySiteName

String

Yes

No

The name of the primary site.

None

PrimarySiteVpcId

String

Yes

No

The VPC ID of the primary site.

None

PrimarySiteRegionId

String

Yes

No

The region ID of the primary site.

None

SecondarySiteVpcId

String

Yes

No

The VPC ID of the secondary site.

None

SecondarySiteName

String

Yes

No

The name of the secondary site.

None

SecondarySiteType

String

Yes

No

The type of the secondary site.

None

SecondarySiteRegionId

String

Yes

No

The region ID of the secondary site.

None

PrimarySiteZoneId

String

No

No

The zone ID of the primary site.

This property is valid only when the site pair type is cross-zone disaster recovery.

SecondarySiteZoneId

String

No

No

The zone ID of the secondary site.

This property is valid only when the site pair type is cross-zone disaster recovery.

SitePairType

String

No

No

Site Type

Valid values:

  • cloud2cloud: cloud2cloud.

  • zone2zone

Return values

Fn::GetAtt

  • PrimarySiteId: The ID of the primary site.

  • SitePairId: The ID of the site pair.

  • SecondarySiteId: The ID of the secondary site.

Examples

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"
        ]
      }
    }
  }
}