最近更新时间:2024.01.16 14:13:13
首次发布时间:2022.05.13 10:42:44
调用 AttachServerGroups 为伸缩组关联一个或多个负载均衡后端服务器组。
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AttachServerGroups | 要执行的操作,取值:AttachServerGroups |
Version | String | 是 | 2020-01-01 | API的版本,取值为:2020-01-01。 |
ScalingGroupId | String | 是 | scg-ybmssdnnhn5pkgyd**** | 伸缩组的ID。您可以调用DescribeScalingGroups查询伸缩组ID。 |
ServerGroupAttributes.N.Type | String | 是 | ServerGroupAttributes.1.Type=CLB&ServerGroupAttributes.2.Type=ALB | 负载均衡服务器组类型:
|
ServerGroupAttributes.N.ServerGroupId | String | 是 | ServerGroupAttributes.1.ServerGroupId=rsp-12b2z5fnxvhts17q7y2fj****&ServerGroupAttributes.2.ServerGroupId=rsp-12b2z5fnxvhts17q7y3tf**** | 负载均衡后端服务器组的ID。您可以调用DescribeServerGroups接口查询后端服务器组ID。
|
ServerGroupAttributes.N.Port | Integer | 是 | ServerGroupAttributes.1.Port=80&ServerGroupAttributes.2.Port=8080 | 负载均衡后端服务器组中服务器的端口号。
|
ServerGroupAttributes.N.Weight | Integer | 是 | ServerGroupAttributes.1.Weight=20&ServerGroupAttributes.2.Weight=30 | 负载均衡后端服务器组中服务器的权重。
|
ClientToken | String | 否 | 333456899ff**** | 保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。取值: |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ScalingGroupId | String | scg-ybmssdnnhn5pkgyd**** | 伸缩组ID。 |
GET /?Action=AttachServerGroups&ScalingGroupId=scg-ybmssdnnhn5pkgyd****&ServerGroupAttributes.1.Type=CLB&ScalingGroupId&ServerGroupAttributes.1.Port=12&ServerGroupAttributes.1.ServerGroupId=rsp-12b2z5fnxvhts17q7y2fj****&ServerGroupAttributes.1.Weight=20&Version=2020-01-01 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: auto_scaling
{ "ResponseMetadata": { "RequestId": "20220419180700010174235038050C****", "Action": "AttachServerGroups", "Version": "2020-01-01", "Service": "auto_scaling", "Region": "cn-beijing" }, "Result": { "ScalingGroupId": "scg-ybmssdnnhn5pkgyd***" } }