Atualiza as configurações de um grupo de servidores, como verificações de integridade, persistência de sessão, nome, algoritmo de agendamento e protocolo de verificação de integridade.
Descrição da operação
The UpdateServerGroupAttribute operation is asynchronous. After you send the request, the system returns a request ID, but the server group configurations are not immediately updated. The update task runs in the background. You can call the ListServerGroups operation to query the update status of the server group configurations:
If the server group configurations are in the Configuring state, the configurations are being updated.
If the server group configurations are in the Available state, the configurations are updated.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
alb:UpdateServerGroupAttribute |
update |
*ServerGroup.
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| ServerGroupName |
string |
Não |
O nome do grupo de servidores. O nome deve ter entre 2 e 128 caracteres e pode conter letras, dígitos, pontos (.), sublinhados (_), hífens (-) e espaços. Ele deve começar com uma letra ou um dígito. |
test |
| Scheduler |
string |
Não |
The scheduling algorithm. Valid values:
|
Wrr |
| ClientToken |
string |
Não |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The client token can contain only ASCII characters. Nota
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the client token. The RequestId of each API request may be different. |
5A2CFF0E-5718-45B5-9D4D-70B3****** |
| DryRun |
boolean |
Não |
Specifies whether to perform only a dry run. Valid values:
|
true |
| HealthCheckConfig |
object |
Não |
A estrutura de configuração da verificação de integridade. |
true |
| HealthCheckCodes |
array |
Não |
A lista de códigos de status que indicam uma verificação de integridade bem-sucedida. |
|
|
string |
Não |
The status codes that indicate a successful health check.
Nota
This parameter takes effect only when HealthCheckEnabled is set to true and HealthCheckProtocol is set to HTTP, HTTPS, or gRPC for the server group. |
200 |
|
| HealthCheckConnectPort |
integer |
Não |
The port of the backend server that is used for health checks. Valid values: 0 to 65535. A value of 0 indicates that the port of the backend server is used for health checks. Nota
The parameter settings take effect only when HealthCheckEnabled is set to true for the server group. |
80 |
| HealthCheckEnabled |
boolean |
Não |
Specifies whether to enable health checks. Valid values:
|
true |
| HealthCheckHost |
string |
Não |
The domain name that is used for health checks.
Nota
This parameter takes effect only when HealthCheckProtocol is set to HTTP, HTTPS, or gRPC. |
example.com |
| HealthCheckHttpVersion |
string |
Não |
The HTTP version that is used for health checks. Valid values:
Nota
This parameter takes effect only when HealthCheckEnabled is set to true and HealthCheckProtocol is set to HTTP or HTTPS for the server group. |
HTTP1.1 |
| HealthCheckInterval |
integer |
Não |
The interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. Nota
The parameter settings take effect only when HealthCheckEnabled is set to true for the server group. |
5 |
| HealthCheckMethod |
string |
Não |
The HTTP method that is used for health checks. Valid values:
Nota
This parameter takes effect only when HealthCheckEnabled is set to true and HealthCheckProtocol is set to HTTP, HTTPS, or gRPC for the server group. |
HEAD |
| HealthCheckPath |
string |
Não |
The path that is used for health checks. The path must be 1 to 80 characters in length, and can contain only letters, digits, the characters Nota
This parameter takes effect only when HealthCheckEnabled is set to true and the HealthCheckProtocol settings are HTTP or HTTPS for the server group. |
/test/index.html |
| HealthCheckProtocol |
string |
Não |
The protocol that is used for health checks. Valid values:
|
HTTP |
| HealthCheckTimeout |
integer |
Não |
The timeout period to accept a response from a health check. If the backend ECS instance does not respond correctly within the specified time, the health check is failed. Unit: seconds. Valid values: 1 to 300. Nota
The parameter settings take effect only when HealthCheckEnabled is set to true for the server group. |
3 |
| HealthyThreshold |
integer |
Não |
The number of consecutive successful health checks that must occur before the health check status of a backend server changes from fail to success. Valid values: 2 to 10. |
4 |
| UnhealthyThreshold |
integer |
Não |
The number of consecutive failed health checks that must occur before the health check status of a backend server changes from success to fail. Valid values: 2 to 10. |
4 |
| StickySessionConfig |
object |
Não |
A estrutura de configuração da persistência de sessão. |
|
| Cookie |
string |
Não |
The cookie configured on the server. The cookie must be 1 to 200 characters in length, and can contain only ASCII letters and digits. It cannot contain commas (,), semicolons (;), or spaces, and cannot start with a dollar sign ($). Nota
This parameter takes effect only when StickySessionEnabled is set to true and StickySessionType is set to Server for the server group. |
B490B5EBF6F3CD402E515D22B****** |
| CookieTimeout |
integer |
Não |
The timeout period of the cookie. Unit: seconds. Valid values: 1 to 86400. Nota
This parameter takes effect only when StickySessionEnabled is set to true and StickySessionType is set to Insert for the server group. |
1000 |
| StickySessionEnabled |
boolean |
Não |
Specifies whether to enable session persistence. Valid values:
|
false |
| StickySessionType |
string |
Não |
The method that is used to handle cookies. Valid values:
Nota
This parameter takes effect only when StickySessionEnabled is set to true for the server group. |
Insert |
| ServerGroupId |
string |
Sim |
O ID do grupo de servidores. |
sgp-atstuj3rtop**** |
| UpstreamKeepaliveEnabled |
boolean |
Não |
Specifies whether to enable backend keep-alive. Valid values:
|
false |
| ServiceName |
string |
Não |
This parameter is applicable only to ALB Ingress scenarios and specifies the name of the |
test2 |
| UchConfig |
object |
Não |
As configurações do parâmetro de hash consistente de URL. |
|
| Type |
string |
Sim |
O tipo do parâmetro. Somente QueryString é suportado. |
QueryString |
| Value |
string |
Sim |
O valor do parâmetro de hash consistente. |
abc |
| ConnectionDrainConfig |
object |
Não |
The graceful connection break configuration. After the graceful connection break is enabled, load balancing allows existing connections to be normally transmitted within a specified period after a backend server is removed or a health check is failed. Nota
|
|
| ConnectionDrainEnabled |
boolean |
Não |
Specifies whether to enable connection draining. Valid values:
|
false |
| ConnectionDrainTimeout |
integer |
Não |
The connection draining timeout period. Valid values: 0 to 900. |
300 |
| SlowStartConfig |
object |
Não |
The slow start configuration. After slow start is enabled, newly added backend servers in the backend server group are warmed up within the specified time period, and the number of requests forwarded to the servers increases linearly. Nota
|
|
| SlowStartDuration |
integer |
Não |
The slow start duration. Valid values: 30 to 900. |
30 |
| SlowStartEnabled |
boolean |
Não |
Specifies whether to enable slow start. Valid values:
|
false |
| CrossZoneEnabled |
boolean |
Não |
Specifies whether to enable cross-zone load balancing for the server group. Valid values:
Nota
|
true |
| IpVersionAffinityMode |
string |
Não |
The IP version affinity mode. Valid values:
This parameter takes effect only when Ipv6Enabled is set to true. |
Affinity |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
The response data structure. |
||
| JobId |
string |
O ID da tarefa assíncrona. |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF3***** |
Exemplos
Resposta de sucesso
JSON formato
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF3*****"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | IncorrectStatus.ServerGroup | The status of %s [%s] is incorrect. | O status do grupo de servidores é inválido. |
| 400 | Mismatch.LoadBalancerEditionAndConnectionDrain | The %s and %s are mismatched. | Os parâmetros %s e %s não correspondem. |
| 400 | Mismatch.ServerGroupSchedulerAndSlowStartEnable | The %s and %s are mismatched. | Os parâmetros %s e %s não correspondem. |
| 400 | QuotaExceeded.ConnectionDrainTimeout | The quota of %s is exceeded, usage %s/%s. | O parâmetro %s excede o limite de cota. O valor atual é %s e o valor da cota é %s. |
| 400 | UnsupportedFeature.ConnectionDrain | The feature of %s is not supported. | O recurso %s não é suportado. |
| 400 | QuotaExceeded.SlowStartDuration | The quota of %s is exceeded, usage %s/%s. | O parâmetro %s excede o limite de cota. O valor atual é %s e o valor da cota é %s. |
| 400 | UnsupportedFeature.SlowStart | The feature of %s is not supported. | O recurso %s não é suportado. |
| 400 | Mismatch.LoadBalancerEditionAndSlowStartEnable | The %s and %s are mismatched. | Os parâmetros %s e %s não correspondem. |
| 400 | OperationDenied.UpstreamKeepaliveDisabled | The operation is not allowed because of UpstreamKeepaliveDisabled. | Não é permitido desativar conexões persistentes de backend. |
| 400 | OperationDenied.UpstreamKeepaliveEnabled | The operation is not allowed because of UpstreamKeepaliveEnabled. | Não é permitido atualizar conexões persistentes de backend para o status ativado. |
| 400 | CloseUpstreamKeepaliveNotSupport | The param of UpstreamKeepalive is not Support. | A desativação de conexões persistentes de back-end para o grupo de servidores não é suportada. |
| 400 | OperationDenied.VpcNotSupportIpv6 | The operation is not allowed because of VpcNotSupportIpv6. | A operação não é permitida porque o IPv6 não está ativado para a VPC atual. |
| 400 | OperationDenied.Ipv6ServerExists | IPv6 backend servers exist in the specified server group. | O grupo de servidores contém servidores de backend IPv6 e não pode ser alterado para IPv4. |
| 404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. | O grupo de servidores de back-end não existe. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.