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 |
否 |
否 |
站点对类型。 |
取值:
|
返回值
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"
]
}
}
}
}该文章对您有帮助吗?