Tous les produits
Search
Centre de documentation

Resource Orchestration Service:ALIYUN::VPC::RouteTableAssociation

Dernière mise à jour :Aug 10, 2026

Associe une table de routage personnalisée à un vSwitch au sein du même VPC.

Syntaxe

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

Propriétés

Nom de la propriété Type Obligatoire Mise à jour autorisée Description Contraintes
RouteTableId String Oui Non ID de la table de routage. Aucune.
VSwitchId String Oui Non ID du vSwitch à associer. Aucune.

Valeurs de retour

Fn::GetAtt

  • RouteTableId : ID de la table de routage.

  • VSwitchId : ID du vSwitch associé.

Exemples

  • Format YAML

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RouteTableId:
        Type: String
        Description: The ID of the route table.
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Resources:
      RouteTableAssociation:
        Type: ALIYUN::VPC::RouteTableAssociation
        Properties:
          RouteTableId:
            Ref: RouteTableId
          VSwitchId:
            Ref: VSwitchId
    Outputs:
      RouteTableId:
        Description: The ID of the route table.
        Value:
          Fn::GetAtt:
            - RouteTableAssociation
            - RouteTableId
      VSwitchId:
        Description: The VSwitch ID which the route table associated with.
        Value:
          Fn::GetAtt:
            - RouteTableAssociation
            - VSwitchId            
  • Format JSON

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RouteTableId": {
          "Type": "String",
          "Description": "The ID of the route table."
        },
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId"
        }
      },
      "Resources": {
        "RouteTableAssociation": {
          "Type": "ALIYUN::VPC::RouteTableAssociation",
          "Properties": {
            "RouteTableId": {
              "Ref": "RouteTableId"
            },
            "VSwitchId": {
              "Ref": "VSwitchId"
            }
          }
        }
      },
      "Outputs": {
        "RouteTableId": {
          "Description": "The ID of the route table.",
          "Value": {
            "Fn::GetAtt": [
              "RouteTableAssociation",
              "RouteTableId"
            ]
          }
        },
        "VSwitchId": {
          "Description": "The VSwitch ID which the route table associated with.",
          "Value": {
            "Fn::GetAtt": [
              "RouteTableAssociation",
              "VSwitchId"
            ]
          }
        }
      }
    }