全部產品
Search
文件中心

:ALIYUN::CEN::TransitRouterVpcAttachment

更新時間:Jul 19, 2024

ALIYUN::CEN::TransitRouterVpcAttachment類型用於在企業版轉寄路由器下建立Virtual Private Cloud(Virtual Private Cloud)串連。

文法

{
  "Type": "ALIYUN::CEN::TransitRouterVpcAttachment",
  "Properties": {
    "VpcId": String,
    "ChargeType": String,
    "CenId": String,
    "TransitRouterAttachmentName": String,
    "ZoneMappings": List,
    "VpcOwnerId": Integer,
    "TransitRouterAttachmentDescription": String,
    "TransitRouterId": String,
    "AutoCreateVpcRoute": Boolean,
    "DeletionForce": Boolean,
    "RouteTablePropagationEnabled": Boolean,
    "RouteTableAssociationEnabled": Boolean
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

VpcId

String

VPC執行個體ID。

ZoneMappings

List

企業版轉寄路由器的主可用性區域和備可用性區域,您需要分別在企業版轉寄路由器的主備可用性區域中選擇一個交換器執行個體。

更多資訊,請參見ZoneMappings屬性

AutoCreateVpcRoute

Boolean

是否自動建立VPC路由條目。

取值:

  • true:自動建立VPC路由條目。

  • false:手動建立VPC路由條目。

CenId

String

雲企業網執行個體ID。

ChargeType

String

付費方式。

預設值:POSTPAY,表示隨用隨付。

DeletionForce

Boolean

是否強制移除VPC串連。

取值:

  • true:強制移除。

  • false:不強制移除。

RouteTableAssociationEnabled

Boolean

是否啟動路由關聯轉寄關係。

取值:

  • true:啟用路由關聯轉寄關係。

  • false:禁用路由關聯轉寄關係。

RouteTablePropagationEnabled

Boolean

是否啟用路由學習關係。

取值:

  • true:啟用路由學習關係。

  • false:禁用路由學習關係。

TransitRouterAttachmentDescription

String

VPC串連的描述資訊。

長度為2~256個字元,必須以英文字母或漢字開頭,但不能以http://https://開頭。

TransitRouterAttachmentName

String

VPC串連的名稱。

長度為2~128個字元,以英文字母或漢字開頭,可包含英文字母、漢字、數字、底線(_)或短劃線(-)。

TransitRouterId

String

企業版轉寄路由器執行個體ID。

VpcOwnerId

Integer

VPC執行個體所屬帳號ID。

預設值為當前登入帳號ID。

ZoneMappings文法

"ZoneMappings": [
  {
    "ZoneId": String,
    "VSwitchId": String
  }
]

ZoneMappings屬性

屬性名稱

類型

必須

允許更新

描述

約束

VSwitchId

String

企業版轉寄路由器的主可用性區域或備可用性區域中的交換器執行個體ID。

ZoneId

String

企業版轉寄路由器的主可用性區域或備可用性區域ID。

您可以調用DescribeZones介面查詢可用性區域ID。

傳回值

Fn::GetAtt

  • TransitRouterAttachmentId:VPC串連ID。

  • VpcId:VPC執行個體ID。

  • CenId:雲企業網執行個體ID。

  • TransitRouterAttachmentName:VPC串連的名稱。

  • ResourceType:資源類型。

  • ClientToken:用戶端Token,用於保證請求的等冪性。

  • VpcOwnerId:VPC執行個體所屬帳號ID。預設值為當前登入帳號ID。

  • TransitRouterAttachmentDescription:VPC串連的描述資訊。

  • TransitRouterId:企業版轉寄路由器執行個體ID。

樣本

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CenId:
    Description: CenId
    Type: String
  ChargeType:
    Description: ''
    Type: String
  TransitRouterAttachmentDescription:
    Description: TransitRouterAttachmentDescription
    Type: String
  TransitRouterAttachmentName:
    Description: TransitRouterAttachmentName
    Type: String
  TransitRouterId:
    Description: TransitRouterId
    Type: String
  VpcId:
    Description: VpcId
    Type: String
  VpcOwnerId:
    Description: VpcOwnerId
    Type: Number
  ZoneMappings:
    Description: ZoneMappingss
    MaxLength: 3
    Type: Json
Resources:
  CENTransitRouterVpcAttachment:
    Properties:
      CenId:
        Ref: CenId
      ChargeType:
        Ref: ChargeType
      TransitRouterAttachmentDescription:
        Ref: TransitRouterAttachmentDescription
      TransitRouterAttachmentName:
        Ref: TransitRouterAttachmentName
      TransitRouterId:
        Ref: TransitRouterId
      VpcId:
        Ref: VpcId
      VpcOwnerId:
        Ref: VpcOwnerId
      ZoneMappings:
        Ref: ZoneMappings
    Type: ALIYUN::CEN::TransitRouterVpcAttachment
Outputs:
  CenId:
    Description: CenId
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - CenId
  ClientToken:
    Description: ClientToken
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - ClientToken
  ResourceType:
    Description: ResourceType
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - ResourceType
  TransitRouterAttachmentDescription:
    Description: TransitRouterAttachmentDescription
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - TransitRouterAttachmentDescription
  TransitRouterAttachmentId:
    Description: The first ID of the resource
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - TransitRouterAttachmentId
  TransitRouterAttachmentName:
    Description: TransitRouterAttachmentName
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - TransitRouterAttachmentName
  TransitRouterId:
    Description: TransitRouterId
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - TransitRouterId
  VpcId:
    Description: VpcId
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - VpcId
  VpcOwnerId:
    Description: VpcOwnerId
    Value:
      Fn::GetAtt:
      - CENTransitRouterVpcAttachment
      - VpcOwnerId

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "VpcId"
    },
    "ChargeType": {
      "Type": "String",
      "Description": ""
    },
    "CenId": {
      "Type": "String",
      "Description": "CenId"
    },
    "TransitRouterAttachmentName": {
      "Type": "String",
      "Description": "TransitRouterAttachmentName"
    },
    "ZoneMappings": {
      "Type": "Json",
      "Description": "ZoneMappingss",
      "MaxLength": 3
    },
    "VpcOwnerId": {
      "Type": "Number",
      "Description": "VpcOwnerId"
    },
    "TransitRouterAttachmentDescription": {
      "Type": "String",
      "Description": "TransitRouterAttachmentDescription"
    },
    "TransitRouterId": {
      "Type": "String",
      "Description": "TransitRouterId"
    }
  },
  "Resources": {
    "CENTransitRouterVpcAttachment": {
      "Type": "ALIYUN::CEN::TransitRouterVpcAttachment",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "ChargeType": {
          "Ref": "ChargeType"
        },
        "CenId": {
          "Ref": "CenId"
        },
        "TransitRouterAttachmentName": {
          "Ref": "TransitRouterAttachmentName"
        },
        "ZoneMappings": {
          "Ref": "ZoneMappings"
        },
        "VpcOwnerId": {
          "Ref": "VpcOwnerId"
        },
        "TransitRouterAttachmentDescription": {
          "Ref": "TransitRouterAttachmentDescription"
        },
        "TransitRouterId": {
          "Ref": "TransitRouterId"
        }
      }
    }
  },
  "Outputs": {
    "TransitRouterAttachmentId": {
      "Description": "The first ID of the resource",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "TransitRouterAttachmentId"
        ]
      }
    },
    "VpcId": {
      "Description": "VpcId",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "VpcId"
        ]
      }
    },
    "CenId": {
      "Description": "CenId",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "CenId"
        ]
      }
    },
    "TransitRouterAttachmentName": {
      "Description": "TransitRouterAttachmentName",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "TransitRouterAttachmentName"
        ]
      }
    },
    "ResourceType": {
      "Description": "ResourceType",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "ResourceType"
        ]
      }
    },
    "ClientToken": {
      "Description": "ClientToken",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "ClientToken"
        ]
      }
    },
    "VpcOwnerId": {
      "Description": "VpcOwnerId",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "VpcOwnerId"
        ]
      }
    },
    "TransitRouterAttachmentDescription": {
      "Description": "TransitRouterAttachmentDescription",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "TransitRouterAttachmentDescription"
        ]
      }
    },
    "TransitRouterId": {
      "Description": "TransitRouterId",
      "Value": {
        "Fn::GetAtt": [
          "CENTransitRouterVpcAttachment",
          "TransitRouterId"
        ]
      }
    }
  }
}