ALIYUN::VPC::RouterInterface用于创建路由器接口。
语法
{
"Type": "ALIYUN::VPC::RouterInterface",
"Properties": {
"OppositeRegionId": String,
"Description": String,
"HealthCheckSourceIp": String,
"RouterType": String,
"AccessPointId": String,
"RouterId": String,
"Role": String,
"OppositeInterfaceOwnerId": String,
"OppositeAccessPointId": String,
"OppositeInterfaceId": String,
"HealthCheckTargetIp": String,
"OppositeRouterId": String,
"Spec": String,
"OppositeRouterType": String,
"Name": String,
"PricingCycle": String,
"Period": Number,
"AutoPay": Boolean,
"InstanceChargeType": String,
"ResourceGroupId": String,
"AutoRenew": Boolean,
"FastLinkMode": Boolean
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
RouterId | String | 是 | 否 | 路由器ID。 | 无 |
Role | String | 是 | 否 | 连接中扮演的角色。即,是连接发起端还是连接接受端。 | 取值:
|
RouterType | String | 否 | 否 | 所属的路由器类型。 | 取值:
|
AccessPointId | String | 否 | 否 | 所属的接入点ID。 | RouterType取值为VBR时该参数必须指定,而且创建后不允许修改。在RouterType取值为VRouter时,不能指定该参数。 |
Spec | String | 否 | 否 | 路由器接口的规格。 | 可用的规格和对应的带宽如下:
Role取值为InitiatingSide时,该参数必须指定。 Role参数取值为AcceptingSide时,该参数取值默认为Negative。 |
OppositeRegionId | String | 否 | 否 | 要连接的对端所在的地域。 | 无 |
OppositeInterfaceOwnerId | String | 否 | 是 | 连接对端路由器接口的持有者账号ID。 | 默认是当前用户的ID。 |
OppositeInterfaceId | String | 否 | 是 | 对端路由器接口ID。 | 无 |
OppositeRouterId | String | 否 | 是 | 要连接的对端的路由器的ID。 | 无 |
OppositeRouterType | String | 否 | 是 | 要连接的对端路由器接口所属的路由器类型。 | 取值:
|
OppositeAccessPointId | String | 否 | 否 | 对端所属的接入点ID。 | OppositeRouterType取值为VBR时该参数必须指定,而且创建后不允许修改。 OppositeRouterType取值为VRouter时,不能指定该参数。 说明 OppositeRouterType取值为VBR时OppositeRouterId所指定的VBR必须在OppositeAccessPointId所指定的接入点内。 |
Description | String | 否 | 是 | 路由器接口描述。 | 长度为2~256个字符。不能以 不填则为空,默认为空。 |
Name | String | 否 | 是 | 路由器接口显示名称。 | 长度为2~128个字符。必须以英文字母或汉字开头,不能以 |
ResourceGroupId | String | 否 | 否 | 资源组ID。 | 无 |
AutoRenew | Boolean | 否 | 否 | 是否开启自动续费。 | 无 |
FastLinkMode | Boolean | 否 | 否 | 是否为使用快速连接模式创建的 VBR 上联路由器接口。 | 快速连接模式可实现 VBR 和 VPC 两端路由器接口创建完毕后自动完成连接。取值:
说明 该参数只在 RouterType 取值为 VBR,OppositeRouterType 参数取值为 VRouter 时生效。
|
HealthCheckSourceIp | String | 否 | 否 | 专线容灾和ECMP场景下用来做专线健康检查的Packet的源IP。 | 只对本端是VRouter,而且对端是VB的路由器接口有效。必须是本端VRouter所在的VPC内的一个未被使用的IP。HealthCheckSourceIp与HealthCheckTargetIp必须同时指定,或同时不指定。 |
HealthCheckTargetIp | String | 否 | 否 | 专线容灾和ECMP场景下用来做专线健康检查的Packet的目标IP。 | 只对本端是VRouter,而且对端是VBR的路由器接口有效。通常可以用专线用户端CPE的IP(即对端RI所在的VBR上的PeerGatewayIp),也可以指定专线用户端的其他IP。HealthCheckSourceIp与HealthCheckTargetIp必须同时指定,或同时不指定。 |
PricingCycle | String | 否 | 否 | 预付费的计费周期。 | 取值:
|
Period | Number | 否 | 否 | 购买时长。 | 取值:
|
AutoPay | Boolean | 否 | 否 | 自动付款。 | 取值:
|
InstanceChargeType | String | 否 | 否 | 实例的付费类型。 | 取值:
|
返回值
Fn::GetAtt
RouterInterfaceId:路由器接口ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
OppositeInterfaceId:
Type: String
Description: The ID of the peer router interface.
RouterId:
Type: String
Description: The router ID to create RouterInterface.
OppositeRouterId:
Type: String
Description: The router ID of the connection peer RouterInterface.
Resources:
RouterInterface:
Type: ALIYUN::VPC::RouterInterface
Properties:
OppositeInterfaceId:
Ref: OppositeInterfaceId
OppositeRouterId:
Ref: OppositeRouterId
OppositeInterfaceOwnerId:
Ref: ALIYUN::TenantId
OppositeRouterType: VRouter
Description: Initiating Side
RouterType: VRouter
RouterId:
Ref: RouterId
Role: InitiatingSide
Spec: Mini.2
InstanceChargeType: PostPaid
Outputs:
RouterInterfaceId:
Description: The ID of created RouterInterface.
Value:
Fn::GetAtt:
- RouterInterface
- RouterInterfaceId{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"OppositeInterfaceId": {
"Type": "String",
"Description": "The ID of the peer router interface."
},
"RouterId": {
"Type": "String",
"Description": "The router ID to create RouterInterface."
},
"OppositeRouterId": {
"Type": "String",
"Description": "The router ID of the connection peer RouterInterface."
}
},
"Resources": {
"RouterInterface": {
"Type": "ALIYUN::VPC::RouterInterface",
"Properties": {
"OppositeInterfaceId": {
"Ref": "OppositeInterfaceId"
},
"OppositeRouterId": {
"Ref": "OppositeRouterId"
},
"OppositeInterfaceOwnerId": {
"Ref": "ALIYUN::TenantId"
},
"OppositeRouterType": "VRouter",
"Description": "Initiating Side",
"RouterType": "VRouter",
"RouterId": {
"Ref": "RouterId"
},
"Role": "InitiatingSide",
"Spec": "Mini.2",
"InstanceChargeType": "PostPaid"
}
}
},
"Outputs": {
"RouterInterfaceId": {
"Description": "The ID of created RouterInterface.",
"Value": {
"Fn::GetAtt": [
"RouterInterface",
"RouterInterfaceId"
]
}
}
}
}