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 文字である必要があります。先頭文字は英字または漢字でなければならず、 |
Description | String | いいえ | はい | ルートテーブルの説明。 | 説明の長さは 2~256 文字である必要があります。先頭文字は英字または漢字でなければならず、 |
AssociateType | String | いいえ | いいえ | ルートテーブルのタイプ。 | 有効な値:
|
Tags | List | いいえ | いいえ | ルートテーブルに適用するタグのリスト。 | 最大 20 個のタグを追加できます。各タグはキーと値のペアで構成されます。値は空でもかまいません。 詳細については、「タグのプロパティ」をご参照ください。 |
タグの構文
"Tags": [
{
"Value": String,
"Key": String
}
]タグのプロパティ
パラメーター | 型 | 必須 | 更新可能 | 説明 | 制約条件 |
Key | String | はい | いいえ | タグのキー。 | キーの長さは 1~128 文字である必要があります。先頭文字は |
Value | String | いいえ | いいえ | タグの値。 | 値の長さは 0~128 文字である必要があります。先頭文字は |
戻り値
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"
]
}
}
}
}