ALIYUN::CEN::TransitRouterVpcAttachment is used to connect a virtual private cloud (​VPC) to an Enterprise Edition transit router.

Syntax

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

Properties

Property Type Required Editable Description Constraint
VpcId String Yes No The ID of the VPC. None.
ChargeType String No No The billing method. Default value: POSTPAY. The value specifies the pay-as-you-go billing method.
CenId String No No The ID of the Cloud Enterprise Network (CEN) instance. None.
TransitRouterAttachmentName String No Yes The name of the VPC connection. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.
ZoneMappings List Yes No The primary and secondary zones of the Enterprise Edition transit router. You must select a vSwitch in the primary zone and a vSwitch in the secondary zone. For more information, see ZoneMappings properties.
VpcOwnerId Integer No No The ID of the Alibaba Cloud account to which the VPC belongs. The default value is the ID of the current logon account.
TransitRouterAttachmentDescription String No Yes The description of the VPC connection. The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with http:// or https://.
TransitRouterId String No No The ID of the Enterprise Edition transit router. None.
AutoCreateVpcRoute Boolean No No Specifies whether to automatically create a VPC route entry. Valid values:
  • true: automatically creates a VPC route entry.
  • false: manually creates a VPC route entry.
DeletionForce Boolean No No Specifies whether to forcefully delete the VPC connection. Valid values:
  • true
  • false
RouteTablePropagationEnabled Boolean No No Specifies whether to enable route learning correlations. Valid values:
  • true
  • false
RouteTableAssociationEnabled Boolean No No Specifies whether to enable associated forwarding correlations for routes. Valid values:
  • true
  • false

ZoneMappings syntax

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

ZoneMappings properties

Property Type Required Editable Description Constraint
ZoneId String Yes No The ID of the primary or secondary zone of the Enterprise Edition transit router. You can call the DescribeZones operation to query the IDs of zones.
VSwitchId String Yes No The ID of the vSwitch in the primary or secondary zone of the Enterprise Edition transit router. None.

Return values

Fn::GetAtt

  • TransitRouterAttachmentId: the ID of the VPC connection.
  • VpcId: the ID of the VPC.
  • CenId: the ID of the CEN instance.
  • TransitRouterAttachmentName: the name of the VPC connection.
  • ResourceType: the resource type.
  • ClientToken: the client token that is used to ensure the idempotence of the request.
  • VpcOwnerId: the ID of the account to which the VPC belongs. The default value is the ID of the current logon account.
  • TransitRouterAttachmentDescription: the description of the VPC connection.
  • TransitRouterId: the ID of the Enterprise Edition transit router.

Examples

JSON format

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

YAML format

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