ALIYUN::ALB::BackendServerAttachment は、サーバーグループにバックエンドサーバーを追加するために使用されます。
構文
{
"Type": "ALIYUN::ALB::BackendServerAttachment",
"Properties": {
"ServerGroupId": String,
"Servers": List
}
}プロパティ
プロパティ | タイプ | 必須 | 更新の許可 | 説明 | 制約 |
ServerGroupId | String | はい | いいえ | サーバーグループ ID。 | なし。 |
Servers | List | はい | はい | サーバーグループに追加するバックエンドサーバーです。 | サーバーグループには最大 40 台のバックエンドサーバーを追加できます。 詳細については、Servers プロパティをご参照ください。 |
Servers 構文
"Servers": [
{
"ServerType": String,
"Description": String,
"ServerId": String,
"ServerIp": String,
"Port": Integer,
"Weight": Integer,
"RemoteIpEnabled": Boolean
}
]Servers プロパティ
プロパティ | タイプ | 必須 | 更新の許可 | 説明 | 制約 |
Description | String | いいえ | はい | バックエンドサーバーの説明です。 | 説明の長さは 2 ~ 256 文字である必要があります。 |
Port | Integer | いいえ | はい | バックエンドサーバーのポートです。 | 有効な値:1 ~ 65535。 説明 このフィールドは、[ServerType] が [Ecs]、[Eni]、[Eci]、または [Ip] に設定されている場合に必須です。[ServerType] が [Fc] に設定されている場合は、このフィールドを無視できます。 |
RemoteIpEnabled | Boolean | いいえ | はい | リモート IP 機能が有効になっているかどうかを指定します。 | 1 回の呼び出しで最大 200 台のサーバーを追加できます。有効な値:
説明 このフィールドは、[ServerType] の値が [Ip] の場合にのみ有効です。 |
ServerId | String | はい | はい | リソース ID または IP アドレスです。 | 有効な値:
|
ServerIp | String | いいえ | はい | ENI マルチ IP モードで指定された IP アドレス | 説明 [ServerType] が [Fc] に設定されている場合は、このフィールドを無視できます。 |
ServerType | String | はい | はい | バックエンドサーバーのタイプ。 | 有効な値:
|
Weight | Integer | いいえ | はい | バックエンドサーバーの重み。 | 有効な値:0 ~ 100。 デフォルト値:100。 説明 値が 0 の場合、リクエストはバックエンドサーバーに転送されません。 [ServerType] が [Fc] に設定されている場合は、このフィールドを無視できます。 |
戻り値
Fn::GetAtt
ServerGroupId: サーバーグループ ID。
例
YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ServerGroupId:
Type: String
Description: サーバーグループの ID です。 # Added JP comment
Default: sgp-46ndzg2wz4v5mp1****
Resources:
BackendServerAttachment:
Type: ALIYUN::ALB::BackendServerAttachment
Properties:
ServerGroupId:
Ref: ServerGroupId
Servers:
- Description: test
Port: 80
ServerId: ecs-bp67acfmxazb4p****
ServerIp: 192.168.1.1
ServerType: Ecs
Weight: 100
Outputs:
ServerGroupId:
Description: サーバーグループの ID です。 # Added JP comment
Value:
Fn::GetAtt:
- BackendServerAttachment
- ServerGroupId JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ServerGroupId": {
"Type": "String",
"Description": "サーバーグループの ID です。", // Added JP comment
"Default": "sgp-46ndzg2wz4v5mp1****"
}
},
"Resources": {
"BackendServerAttachment": {
"Type": "ALIYUN::ALB::BackendServerAttachment",
"Properties": {
"ServerGroupId": {
"Ref": "ServerGroupId"
},
"Servers": [
{
"Description": "test",
"Port": 80,
"ServerId": "ecs-bp67acfmxazb4p****",
"ServerIp": "192.168.1.1",
"ServerType": "Ecs",
"Weight": 100
}
]
}
}
},
"Outputs": {
"ServerGroupId": {
"Description": "サーバーグループの ID です。", // Added JP comment
"Value": {
"Fn::GetAtt": [
"BackendServerAttachment",
"ServerGroupId"
]
}
}
}
}