全部产品
Search
文档中心

Resource Orchestration Service:ALIYUN::VPC::RouteTableAssociation

更新时间:Jun 26, 2025

ALIYUN::VPC::RouteTableAssociation digunakan untuk mengaitkan tabel routing kustom dengan vSwitch dalam VPC yang sama.

Sintaksis

{
  "Type": "ALIYUN::VPC::RouteTableAssociation",
  "Properties": {
    "RouteTableId": String,
    "VSwitchId": String
  }
}

Properti

NamaTipeDiperlukanDapat DieditDeskripsiValiditas
RouteTableIdStringYaTidakID dari tabel routing.Tidak ada
VSwitchIdStringYaTidakID dari vSwitch yang akan dikaitkan dengan tabel routing.Tidak ada

Parameter respons

Fn::GetAtt

  • RouteTableId: ID tabel routing.
  • VSwitchId: ID vSwitch.

Contoh

  • YAML Format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RouteTableId:
        Type: String
        Description: ID dari tabel routing.
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Resources:
      RouteTableAssociation:
        Type: ALIYUN::VPC::RouteTableAssociation
        Properties:
          RouteTableId:
            Ref: RouteTableId
          VSwitchId:
            Ref: VSwitchId
    Outputs:
      RouteTableId:
        Description: ID dari tabel routing.
        Value:
          Fn::GetAtt:
            - RouteTableAssociation
            - RouteTableId
      VSwitchId:
        Description: ID VSwitch yang terkait dengan tabel routing.
        Value:
          Fn::GetAtt:
            - RouteTableAssociation
            - VSwitchId            
  • JSON Format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RouteTableId": {
          "Type": "String",
          "Description": "ID dari tabel routing."
        },
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId"
        }
      },
      "Resources": {
        "RouteTableAssociation": {
          "Type": "ALIYUN::VPC::RouteTableAssociation",
          "Properties": {
            "RouteTableId": {
              "Ref": "RouteTableId"
            },
            "VSwitchId": {
              "Ref": "VSwitchId"
            }
          }
        }
      },
      "Outputs": {
        "RouteTableId": {
          "Description": "ID dari tabel routing.",
          "Value": {
            "Fn::GetAtt": [
              "RouteTableAssociation",
              "RouteTableId"
            ]
          }
        },
        "VSwitchId": {
          "Description": "ID VSwitch yang terkait dengan tabel routing.",
          "Value": {
            "Fn::GetAtt": [
              "RouteTableAssociation",
              "VSwitchId"
            ]
          }
        }
      }
    }