すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::VPC::RouteTable

最終更新日:Mar 28, 2026

ALIYUN::VPC::RouteTable を使用して、カスタムルートテーブルを作成します。

以下のリージョンでは、ルートテーブルを作成できません:

  • 中国 (北京)

  • 中国 (深セン)

  • 中国 (杭州)

構文

{
  "Type": "ALIYUN::VPC::RouteTable",
  "Properties": {
    "RouteTableName": String,
    "VpcId": String,
    "Description": String,
    "AssociateType": String,
    "Tags": List
  }
}

プロパティ

パラメーター

必須

更新可能

説明

制約条件

VpcId

String

はい

いいえ

カスタムルートテーブルが属する VPC の ID。

なし

RouteTableName

String

いいえ

はい

ルートテーブルの名前。

名前の長さは 2~128 文字である必要があります。先頭文字は英字または漢字でなければならず、http:// または https:// で始めてはいけません。英字、漢字、数字、ピリオド (.)、アンダースコア (_)、ハイフン (-) を含めることができます。

Description

String

いいえ

はい

ルートテーブルの説明。

説明の長さは 2~256 文字である必要があります。先頭文字は英字または漢字でなければならず、http:// または https:// で始めてはいけません。

AssociateType

String

いいえ

いいえ

ルートテーブルのタイプ。

有効な値:

  • VSwitch(デフォルト):VSwitch ルートテーブル。

  • Gateway:ゲートウェイルートテーブル。

Tags

List

いいえ

いいえ

ルートテーブルに適用するタグのリスト。

最大 20 個のタグを追加できます。各タグはキーと値のペアで構成されます。値は空でもかまいません。

詳細については、「タグのプロパティ」をご参照ください。

タグの構文

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

タグのプロパティ

パラメーター

必須

更新可能

説明

制約条件

Key

String

はい

いいえ

タグのキー。

キーの長さは 1~128 文字である必要があります。先頭文字は aliyun または acs: であってはならず、http:// または https:// を含んではいけません。

Value

String

いいえ

いいえ

タグの値。

値の長さは 0~128 文字である必要があります。先頭文字は aliyun または acs: であってはならず、http:// または https:// を含んではいけません。

戻り値

Fn::GetAtt

  • RouteTableId:ルートテーブルの ID。

  • VpcId:カスタムルートテーブルを含む VPC の ID。

  • RouteTableName:ルートテーブルの名前。

  • RouteTableType:ルートテーブルのタイプ。

  • VSwitchIds:VPC 内の VSwitch の ID。

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RouteTableName:
    Type: String
    Description: ルートテーブルの名前。名前の長さは 2~128 文字である必要があります。先頭文字は英字または漢字でなければならず、http:// または https:// で始めてはいけません。英字、漢字、数字、ピリオド (.)、アンダースコア (_)、ハイフン (-) を含めることができます。
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
Resources:
  RouteTable:
    Type: ALIYUN::VPC::RouteTable
    Properties:
      RouteTableName: TestRouteTable
      VpcId:
        Ref: VpcId
Outputs:
  RouteTableId:
    Description: ルートテーブルの ID。
    Value:
      Fn::GetAtt:
        - RouteTable
        - RouteTableId
  VpcId:
    Description: ルートテーブルを含む VPC の ID。
    Value:
      Fn::GetAtt:
        - RouteTable
        - VpcId
  RouteTableType:
    Description: ルートテーブルのタイプ。
    Value:
      Fn::GetAtt:
        - RouteTable
        - RouteTableType
  VSwitchIds:
    Description: VPC 内の VSwitch の ID。
    Value:
      Fn::GetAtt:
        - RouteTable
        - VSwitchIds
  RouteTableName:
    Description: ルートテーブルの名前。
    Value:
      Fn::GetAtt:
        - RouteTable
        - RouteTableName            
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RouteTableName": {
      "Type": "String",
      "Description": "ルートテーブルの名前。名前の長さは 2~128 文字である必要があります。先頭文字は英字または漢字でなければならず、http:// または https:// で始めてはいけません。英字、漢字、数字、ピリオド (.)、アンダースコア (_)、ハイフン (-) を含めることができます。"
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    }
  },
  "Resources": {
    "RouteTable": {
      "Type": "ALIYUN::VPC::RouteTable",
      "Properties": {
        "RouteTableName": "TestRouteTable",
        "VpcId": {
          "Ref": "VpcId"
        }
      }
    }
  },
  "Outputs": {
    "RouteTableId": {
      "Description": "ルートテーブルの ID。",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "RouteTableId"
        ]
      }
    },
    "VpcId": {
      "Description": "ルートテーブルを含む VPC の ID。",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "VpcId"
        ]
      }
    },
    "RouteTableType": {
      "Description": "ルートテーブルのタイプ。",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "RouteTableType"
        ]
      }
    },
    "VSwitchIds": {
      "Description": "VPC 内の VSwitch の ID。",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "VSwitchIds"
        ]
      }
    },
    "RouteTableName": {
      "Description": "ルートテーブルの名前。",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "RouteTableName"
        ]
      }
    }
  }
}