ALIYUN::NLB::BackendServerAttachment は、ネットワークロードバランサー(NLB)サーバーグループにバックエンドサーバーを追加するために使用されます。
構文
{
"Type": "ALIYUN::NLB::BackendServerAttachment",
"Properties": {
"ServerGroupId": String, // サーバーグループの ID
"Servers": List // サーバーのリスト
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
ServerGroupId | String | はい | いいえ | サーバーグループの ID。 | なし。 |
Servers | List | はい | はい | バックエンドサーバー。 | 詳細については、「Servers プロパティ」をご参照ください。最大 200 台のバックエンドサーバーを追加できます。 |
Servers 構文
"Servers": [
{
"ServerType": String, // バックエンドサーバーのタイプ
"Description": String, // サーバーの説明
"ServerId": String, // バックエンドサーバーの ID
"ServerIp": String, // サーバーの IP アドレス
"Port": Integer, // バックエンドサーバーが使用するポート
"Weight": Integer // バックエンドサーバーの重み
}
]Servers プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
ServerType | String | はい | はい | バックエンドサーバーのタイプ。 | 有効な値:
|
ServerId | String | はい | はい | バックエンドサーバーの ID。 |
|
Description | String | いいえ | はい | サーバーの説明。 | 説明は 2 ~ 256 文字で、英字、数字、カンマ( , )、ピリオド( . )、セミコロン( ; )、スラッシュ( / )、アットマーク( @ )、アンダースコア( _ )、ハイフン( - )を含めることができます。 |
Port | Integer | いいえ | はい | バックエンドサーバーが使用するポート。 | 有効な値:0 ~ 65535。このプロパティを空のままにすると、デフォルトでポート 0 が使用されます。 サーバーグループの全ポート転送を有効にした場合、バックエンドサーバーを追加するときにポートを指定する必要はありません。デフォルトでは、バックエンドサーバーにはポート 0 が使用されます。NLB は、フロントエンドポートに基づいてリクエストをバックエンドサーバーに転送します。 ListServerGroups 操作を呼び出し、AnyPortEnabled 値をクエリして、全ポート転送が有効になっているかどうかを確認できます。 |
ServerIp | String | いいえ | はい | サーバーの IP アドレス。 | ServerType が Ip に設定されている場合は、このプロパティを指定する必要があります。 |
Weight | Integer | いいえ | はい | バックエンドサーバーの重み。 | 有効な値:0 ~ 100。デフォルト値:100。このプロパティの値として 0 を指定すると、リクエストはバックエンドサーバーに転送されません。 |
戻り値
Fn::GetAtt
ServerGroupId:サーバーグループの ID。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ServerGroupId:
Type: String
Description:
en: The ID of the server group. // サーバーグループの ID
Required: true
Servers:
AssociationPropertyMetadata:
Parameters:
ServerType:
Type: String
Description:
en: |-
The type of the backend server. Valid values: // バックエンドサーバーのタイプ。有効な値:
Ecs: an ECS instance // ECS インスタンス
Eni: an ENI // ENI
Eci: an elastic container instance // Elastic Container Instance
Ip: an IP address // IP アドレス
AllowedValues:
- Eci
- Ecs
- Eni
- Ip
Required: true
Description:
AssociationProperty: TextArea
Type: String
Description:
en: ' The description of the servers. The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).' // サーバーの説明。説明は 2 ~ 256 文字で、英字、数字、カンマ( , )、ピリオド( . )、セミコロン( ; )、スラッシュ( / )、アットマーク( @ )、アンダースコア( _ )、ハイフン( - )を含めることができます。
Required: false
MinLength: 2
MaxLength: 256
ServerId:
Type: String
Description:
en: The ID of the server. // サーバーの ID
Required: true
ServerIp:
Type: String
Description:
en: The IP address of the server. If the server group type is Ip, set the ServerId parameter to an IP address. // サーバーの IP アドレス。サーバーグループのタイプが Ip の場合は、ServerId パラメーターを IP アドレスに設定します。
Required: false
Port:
Type: Number
Description:
en: 'The port used by the backend server. Valid values: 0 to 65535.' // バックエンドサーバーが使用するポート。有効な値:0 ~ 65535。
Required: false
MinValue: 0
MaxValue: 65535
Weight:
Type: Number
Description:
en: 'The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the weight of a backend server is set to 0, no requests are forwarded to the backend server.' // バックエンドサーバーの重み。有効な値:0 ~ 100。デフォルト値:100。バックエンドサーバーの重みを 0 に設定すると、リクエストはバックエンドサーバーに転送されません。
Required: false
MinValue: 0
MaxValue: 100
AssociationProperty: List[Parameters]
Type: Json
Description:
en: |-
The backend servers that you want to add to the server group. You can specify up to // サーバーグループに追加するバックエンドサーバー。最大
200 servers in each call. // 200 台のサーバーを指定できます。
Required: true
MinLength: 1
MaxLength: 200
Resources:
BackendServerAttachment:
Type: ALIYUN::NLB::BackendServerAttachment
Properties:
ServerGroupId:
Ref: ServerGroupId
Servers:
Ref: Servers
Outputs:
ServerGroupId:
Description: The ID of the server group. // サーバーグループの ID
Value:
Fn::GetAtt:
- BackendServerAttachment
- ServerGroupId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ServerGroupId": {
"Type": "String",
"Description": {
"en": "The ID of the server group." // サーバーグループの ID
},
"Required": true
},
"Servers": {
"AssociationPropertyMetadata": {
"Parameters": {
"ServerType": {
"Type": "String",
"Description": {
"en": "The type of the backend server. Valid values:\nEcs: an ECS instance\nEni: an ENI\nEci: an elastic container instance\nIp: an IP address" // バックエンドサーバーのタイプ。有効な値:\nEcs:ECS インスタンス\nEni:ENI\nEci:Elastic Container Instance\nIp:IP アドレス
},
"AllowedValues": [
"Eci",
"Ecs",
"Eni",
"Ip"
],
"Required": true
},
"Description": {
"AssociationProperty": "TextArea",
"Type": "String",
"Description": {
"en": " The description of the servers. The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-)." // サーバーの説明。説明は 2 ~ 256 文字で、英字、数字、カンマ( , )、ピリオド( . )、セミコロン( ; )、スラッシュ( / )、アットマーク( @ )、アンダースコア( _ )、ハイフン( - )を含めることができます。
},
"Required": false,
"MinLength": 2,
"MaxLength": 256
},
"ServerId": {
"Type": "String",
"Description": {
"en": "The ID of the server." // サーバーの ID
},
"Required": true
},
"ServerIp": {
"Type": "String",
"Description": {
"en": "The IP address of the server. If the server group type is Ip, set the ServerId parameter to an IP address." // サーバーの IP アドレス。サーバーグループのタイプが Ip の場合は、ServerId パラメーターを IP アドレスに設定します。
},
"Required": false
},
"Port": {
"Type": "Number",
"Description": {
"en": "The port used by the backend server. Valid values: 0 to 65535." // バックエンドサーバーが使用するポート。有効な値:0 ~ 65535。
},
"Required": false,
"MinValue": 0,
"MaxValue": 65535
},
"Weight": {
"Type": "Number",
"Description": {
"en": "The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the weight of a backend server is set to 0, no requests are forwarded to the backend server." // バックエンドサーバーの重み。有効な値:0 ~ 100。デフォルト値:100。バックエンドサーバーの重みを 0 に設定すると、リクエストはバックエンドサーバーに転送されません。
},
"Required": false,
"MinValue": 0,
"MaxValue": 100
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "The backend servers that you want to add to the server group. You can specify up to\n200 servers in each call." // サーバーグループに追加するバックエンドサーバー。1 回の呼び出しで最大\n200 台のサーバーを指定できます。
},
"Required": true,
"MinLength": 1,
"MaxLength": 200
}
},
"Resources": {
"BackendServerAttachment": {
"Type": "ALIYUN::NLB::BackendServerAttachment",
"Properties": {
"ServerGroupId": {
"Ref": "ServerGroupId"
},
"Servers": {
"Ref": "Servers"
}
}
}
},
"Outputs": {
"ServerGroupId": {
"Description": "The ID of the server group.", // サーバーグループの ID
"Value": {
"Fn::GetAtt": [
"BackendServerAttachment",
"ServerGroupId"
]
}
}
}
}