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
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
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个字符。不能以http:// 和https:// 开头。
不填则为空,默认为空。 |
Name | String | 否 | 是 | 路由器接口显示名称。 | 长度为2~128个字符。必须以英文字母或汉字开头,不能以http:// 和https:// 开头。可包含英文字母、汉字、数字、英文句点(.)、下划线(_)和短划线(-)。
|
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。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"OppositeInterfaceId": {
"Type": "String",
"Description": "The ID of the peer router interface."
},
"OppositeInterfaceOwnerId": {
"Type": "String",
"Description": "Owner account ID of the connection peer RouterInterface. The default value is current user Id."
},
"Description": {
"Type": "String",
"Description": "Custom description of the RouterInterface, [2, 256] characters. Don't fill or empty, the default is empty."
},
"OppositeRouterId": {
"Type": "String",
"Description": "The router ID of the connection peer RouterInterface."
},
"OppositeRegionId": {
"Type": "String",
"Description": "The region where the connection peer RouterInterface locates. The default value is region where stack is created."
},
"PricingCycle": {
"Type": "String",
"Description": "Unit of the payment cycle. It could be Month (default) or Year.",
"AllowedValues": [
"Month",
"Year"
]
},
"InstanceChargeType": {
"Type": "String",
"Description": "The billing method of the router interface. Valid values: PrePaid (Subscription), PostPaid (default, Pay-As-You-Go)",
"AllowedValues": [
"PrePaid",
"PostPaid"
],
"Default": "PostPaid"
},
"HealthCheckSourceIp": {
"Type": "String",
"Description": "Source IP address of the packet for leased line HealthCheck in leased line disaster tolerance and ECMP scenarios. It is valid only for a VRouter RouterInterface with a peer on a VBR. The source IP address must be in the VPC of the local VRouter and is not used. HealthCheckSourceIp and HealthCheckTargetIp parameters must be both specified or left unspecified."
},
"Period": {
"Type": "Number",
"Description": "Prepaid time period. It could be from 1 to 9 when PricingCycle is Month, or 1 to 3 when PricingCycle is Year. Default value is 3.",
"AllowedValues": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"RouterId": {
"Type": "String",
"Description": "The router ID to create RouterInterface."
},
"AutoPay": {
"Type": "Boolean",
"Description": "Indicates whether automatic payment is enabled. Valid values:false: Automatic payment is disabled. You need to go to Orders to make the payment once an order is generated. true: Automatic payment is enabled. The payment is automatically made.",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"Name": {
"Type": "String",
"Description": "Custom name of the RouterInterface, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'"
},
"Role": {
"Type": "String",
"Description": "RouterInterface role. Now support 'InitiatingSide|AcceptingSide'. If 'RouterType' is specified as 'VBR', the value must be 'InitiatingSide'.If 'OppositeRouterType' is specified as 'VBR', the value must be 'AcceptingSide'.",
"AllowedValues": [
"InitiatingSide",
"AcceptingSide"
]
},
"OppositeRouterType": {
"Type": "String",
"Description": "Router type of the connection peer router. Now support 'VRouter|VBR'. If 'RouterType' is specified as 'VBR', the value must be 'VRouter'.",
"AllowedValues": [
"VRouter",
"VBR"
],
"Default": "VRouter"
},
"RouterType": {
"Type": "String",
"Description": "Router type. Now support 'VRouter|VBR'",
"AllowedValues": [
"VRouter",
"VBR"
],
"Default": "VRouter"
},
"AccessPointId": {
"Type": "String",
"Description": "Access point ID. If 'RouterType' is specified as 'VBR', the value is required."
},
"OppositeAccessPointId": {
"Type": "String",
"Description": "Access point ID of the connection peer RouterInterface. If 'OppositeRouterType' is specified as 'VBR', the value is required."
},
"Spec": {
"Type": "String",
"Description": "RouterInterface specification. If 'Role' is specified as 'InitiatingSide', the value is required. If 'Role' is specified as 'AcceptingSide', the value is set as 'Negative' by default."
},
"HealthCheckTargetIp": {
"Type": "String",
"Description": "Target IP address of the packet for leased line HealthCheck in leased line disaster tolerance and ECMP scenarios. It is valid only for a VRouter RouterInterface with a peer on a VBR. Usually you can use the CPE IP address of the leased line user's client (that is, the PeerGatewayIP on the VBR of the peer RouterInterface), you can also specify another IP address of the leased line user's client as the HealthCheck target IP address. HealthCheckSourceIp and HealthCheckTargetIp parameters must be both specified or left unspecified."
}
},
"Resources": {
"RouterInterface": {
"Type": "ALIYUN::VPC::RouterInterface",
"Properties": {
"OppositeInterfaceId": {
"Ref": "OppositeInterfaceId"
},
"OppositeInterfaceOwnerId": {
"Ref": "OppositeInterfaceOwnerId"
},
"Description": {
"Ref": "Description"
},
"OppositeRouterId": {
"Ref": "OppositeRouterId"
},
"OppositeRegionId": {
"Ref": "OppositeRegionId"
},
"PricingCycle": {
"Ref": "PricingCycle"
},
"InstanceChargeType": {
"Ref": "InstanceChargeType"
},
"HealthCheckSourceIp": {
"Ref": "HealthCheckSourceIp"
},
"Period": {
"Ref": "Period"
},
"RouterId": {
"Ref": "RouterId"
},
"AutoPay": {
"Ref": "AutoPay"
},
"Name": {
"Ref": "Name"
},
"Role": {
"Ref": "Role"
},
"OppositeRouterType": {
"Ref": "OppositeRouterType"
},
"RouterType": {
"Ref": "RouterType"
},
"AccessPointId": {
"Ref": "AccessPointId"
},
"OppositeAccessPointId": {
"Ref": "OppositeAccessPointId"
},
"Spec": {
"Ref": "Spec"
},
"HealthCheckTargetIp": {
"Ref": "HealthCheckTargetIp"
}
}
}
},
"Outputs": {
"RouterInterfaceId": {
"Description": "The ID of created RouterInterface.",
"Value": {
"Fn::GetAtt": [
"RouterInterface",
"RouterInterfaceId"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
OppositeInterfaceId:
Type: String
Description: The ID of the peer router interface.
OppositeInterfaceOwnerId:
Type: String
Description: >-
Owner account ID of the connection peer RouterInterface. The default value
is current user Id.
Description:
Type: String
Description: >-
Custom description of the RouterInterface, [2, 256] characters. Don't fill
or empty, the default is empty.
OppositeRouterId:
Type: String
Description: The router ID of the connection peer RouterInterface.
OppositeRegionId:
Type: String
Description: >-
The region where the connection peer RouterInterface locates. The default
value is region where stack is created.
PricingCycle:
Type: String
Description: Unit of the payment cycle. It could be Month (default) or Year.
AllowedValues:
- Month
- Year
InstanceChargeType:
Type: String
Description: >-
The billing method of the router interface. Valid values: PrePaid
(Subscription), PostPaid (default, Pay-As-You-Go)
AllowedValues:
- PrePaid
- PostPaid
Default: PostPaid
HealthCheckSourceIp:
Type: String
Description: >-
Source IP address of the packet for leased line HealthCheck in leased line
disaster tolerance and ECMP scenarios. It is valid only for a VRouter
RouterInterface with a peer on a VBR. The source IP address must be in the
VPC of the local VRouter and is not used. HealthCheckSourceIp and
HealthCheckTargetIp parameters must be both specified or left unspecified.
Period:
Type: Number
Description: >-
Prepaid time period. It could be from 1 to 9 when PricingCycle is Month,
or 1 to 3 when PricingCycle is Year. Default value is 3.
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
RouterId:
Type: String
Description: The router ID to create RouterInterface.
AutoPay:
Type: Boolean
Description: >-
Indicates whether automatic payment is enabled. Valid values:false:
Automatic payment is disabled. You need to go to Orders to make the
payment once an order is generated. true: Automatic payment is enabled.
The payment is automatically made.
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Name:
Type: String
Description: >-
Custom name of the RouterInterface, [2, 128] English or Chinese
characters, must start with a letter or Chinese in size, can contain
numbers, '_' or '.', '-'
Role:
Type: String
Description: >-
RouterInterface role. Now support 'InitiatingSide|AcceptingSide'. If
'RouterType' is specified as 'VBR', the value must be 'InitiatingSide'.If
'OppositeRouterType' is specified as 'VBR', the value must be
'AcceptingSide'.
AllowedValues:
- InitiatingSide
- AcceptingSide
OppositeRouterType:
Type: String
Description: >-
Router type of the connection peer router. Now support 'VRouter|VBR'. If
'RouterType' is specified as 'VBR', the value must be 'VRouter'.
AllowedValues:
- VRouter
- VBR
Default: VRouter
RouterType:
Type: String
Description: Router type. Now support 'VRouter|VBR'
AllowedValues:
- VRouter
- VBR
Default: VRouter
AccessPointId:
Type: String
Description: >-
Access point ID. If 'RouterType' is specified as 'VBR', the value is
required.
OppositeAccessPointId:
Type: String
Description: >-
Access point ID of the connection peer RouterInterface. If
'OppositeRouterType' is specified as 'VBR', the value is required.
Spec:
Type: String
Description: >-
RouterInterface specification. If 'Role' is specified as 'InitiatingSide',
the value is required. If 'Role' is specified as 'AcceptingSide', the
value is set as 'Negative' by default.
HealthCheckTargetIp:
Type: String
Description: >-
Target IP address of the packet for leased line HealthCheck in leased line
disaster tolerance and ECMP scenarios. It is valid only for a VRouter
RouterInterface with a peer on a VBR. Usually you can use the CPE IP
address of the leased line user's client (that is, the PeerGatewayIP on
the VBR of the peer RouterInterface), you can also specify another IP
address of the leased line user's client as the HealthCheck target IP
address. HealthCheckSourceIp and HealthCheckTargetIp parameters must be
both specified or left unspecified.
Resources:
RouterInterface:
Type: 'ALIYUN::VPC::RouterInterface'
Properties:
OppositeInterfaceId:
Ref: OppositeInterfaceId
OppositeInterfaceOwnerId:
Ref: OppositeInterfaceOwnerId
Description:
Ref: Description
OppositeRouterId:
Ref: OppositeRouterId
OppositeRegionId:
Ref: OppositeRegionId
PricingCycle:
Ref: PricingCycle
InstanceChargeType:
Ref: InstanceChargeType
HealthCheckSourceIp:
Ref: HealthCheckSourceIp
Period:
Ref: Period
RouterId:
Ref: RouterId
AutoPay:
Ref: AutoPay
Name:
Ref: Name
Role:
Ref: Role
OppositeRouterType:
Ref: OppositeRouterType
RouterType:
Ref: RouterType
AccessPointId:
Ref: AccessPointId
OppositeAccessPointId:
Ref: OppositeAccessPointId
Spec:
Ref: Spec
HealthCheckTargetIp:
Ref: HealthCheckTargetIp
Outputs:
RouterInterfaceId:
Description: The ID of created RouterInterface.
Value:
'Fn::GetAtt':
- RouterInterface
- RouterInterfaceId
在文档使用中是否遇到以下问题
更多建议
匿名提交