ALIYUN::VPC::VcoRouteEntry类型用于为IPsec连接添加目的路由条目。
语法
{
  "Type": "ALIYUN::VPC::VcoRouteEntry",
  "Properties": {
    "NextHop": String,
    "RouteDest": String,
    "VpnConnectionId": String,
    "Weight": Integer,
    "Description": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| NextHop | String | 是 | 否 | 目的路由条目的下一条。 | 无 | 
| RouteDest | String | 是 | 否 | 目的路由条目的目标网段。 | 无 | 
| VpnConnectionId | String | 是 | 否 | IPsec 连接的 ID。 | 无 | 
| Weight | Integer | 是 | 是 | 目的路由条目的权重值。 | 取值: 
 | 
| Description | String | 否 | 否 | 目的路由条目的描述信息。 | 无 | 
返回值
Fn::GetAtt
VpnConnectionId:IPsec 连接的 ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RouteDest:
    Type: String
    Description:
      en: The target segment of the destination routing entry.
    Required: true
  NextHop:
    Type: String
    Description:
      en: The next hop of the destination routing entry.
    Required: true
  VpnConnectionId:
    Type: String
    Description:
      en: IPsec Connection ID.
    Required: true
  Weight:
    Type: Number
    Description:
      en: |-
        The weight value of the destination routing entry.Value:
        0: Indicates low priority.
        100: Indicates high priority.
    AllowedValues:
      - 0
      - 100
    Required: true
Resources:
  VcoRouteEntry:
    Type: ALIYUN::VPC::VcoRouteEntry
    Properties:
      RouteDest:
        Ref: RouteDest
      NextHop:
        Ref: NextHop
      VpnConnectionId:
        Ref: VpnConnectionId
      Weight:
        Ref: Weight
Outputs:
  VpnConnectionId:
    Description: The ID of the VPN connection.
    Value:
      Fn::GetAtt:
        - VcoRouteEntry
        - VpnConnectionId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RouteDest": {
      "Type": "String",
      "Description": {
        "en": "The target segment of the destination routing entry."
      },
      "Required": true
    },
    "NextHop": {
      "Type": "String",
      "Description": {
        "en": "The next hop of the destination routing entry."
      },
      "Required": true
    },
    "VpnConnectionId": {
      "Type": "String",
      "Description": {
        "en": "IPsec Connection ID."
      },
      "Required": true
    },
    "Weight": {
      "Type": "Number",
      "Description": {
        "en": "The weight value of the destination routing entry.Value:\n0: Indicates low priority.\n100: Indicates high priority."
      },
      "AllowedValues": [
        0,
        100
      ],
      "Required": true
    }
  },
  "Resources": {
    "VcoRouteEntry": {
      "Type": "ALIYUN::VPC::VcoRouteEntry",
      "Properties": {
        "RouteDest": {
          "Ref": "RouteDest"
        },
        "NextHop": {
          "Ref": "NextHop"
        },
        "VpnConnectionId": {
          "Ref": "VpnConnectionId"
        },
        "Weight": {
          "Ref": "Weight"
        }
      }
    }
  },
  "Outputs": {
    "VpnConnectionId": {
      "Description": "The ID of the VPN connection.",
      "Value": {
        "Fn::GetAtt": [
          "VcoRouteEntry",
          "VpnConnectionId"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?