ALIYUN::VPC::RouteTableWithGatewayAssociation

更新时间:2025-02-28 02:45

ALIYUN::VPC::RouteTableWithGatewayAssociation类型用于将网关路由表和同一VPC内的IPv4网关、IPv6网关实例绑定。

语法

{
  "Type": "ALIYUN::VPC::RouteTableWithGatewayAssociation",
  "Properties": {
    "GatewayType": String,
    "GatewayId": String,
    "RouteTableId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

GatewayType

String

要关联的网关实例的类型。

取值:

  • Ipv4Gateway

GatewayId

String

要关联的IPv4 网关实例ID。

RouteTableId

String

要绑定的网关路由表ID。

返回值

Fn::GetAtt

  • RouteTableId:网关路由表 ID。

  • GatewayId:网关实例 ID

示例

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RouteTableId:
    Type: String
    Description:
      en: The ID of route table that gateway is to be bound.
    Required: true
  GatewayType:
    Type: String
    Description:
      en: Types of the associated gateway instance.
    AllowedValues:
      - Ipv4Gateway
    Required: true
  GatewayId:
    Type: String
    Description:
      en: |-
        The ID of the IPv4 gateway that is to be associated.
        The IPv4 gateway instance must be activated.
    Required: true
Resources:
  RouteTableWithGatewayAssociation:
    Type: ALIYUN::VPC::RouteTableWithGatewayAssociation
    Properties:
      RouteTableId:
        Ref: RouteTableId
      GatewayType:
        Ref: GatewayType
      GatewayId:
        Ref: GatewayId
Outputs:
  RouteTableId:
    Description: The ID of route table that gateway is to be bound.
    Value:
      Fn::GetAtt:
        - RouteTableWithGatewayAssociation
        - RouteTableId
  GatewayId:
    Description: The ID of the IPv4 gateway that is to be associated.
    Value:
      Fn::GetAtt:
        - RouteTableWithGatewayAssociation
        - GatewayId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RouteTableId": {
      "Type": "String",
      "Description": {
        "en": "The ID of route table that gateway is to be bound."
      },
      "Required": true
    },
    "GatewayType": {
      "Type": "String",
      "Description": {
        "en": "Types of the associated gateway instance."
      },
      "AllowedValues": [
        "Ipv4Gateway"
      ],
      "Required": true
    },
    "GatewayId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the IPv4 gateway that is to be associated.\nThe IPv4 gateway instance must be activated."
      },
      "Required": true
    }
  },
  "Resources": {
    "RouteTableWithGatewayAssociation": {
      "Type": "ALIYUN::VPC::RouteTableWithGatewayAssociation",
      "Properties": {
        "RouteTableId": {
          "Ref": "RouteTableId"
        },
        "GatewayType": {
          "Ref": "GatewayType"
        },
        "GatewayId": {
          "Ref": "GatewayId"
        }
      }
    }
  },
  "Outputs": {
    "RouteTableId": {
      "Description": "The ID of route table that gateway is to be bound.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTableWithGatewayAssociation",
          "RouteTableId"
        ]
      }
    },
    "GatewayId": {
      "Description": "The ID of the IPv4 gateway that is to be associated.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTableWithGatewayAssociation",
          "GatewayId"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)
  • 语法
  • 属性
  • 返回值
  • 示例
文档反馈
phone Contact Us