PUThttps://api.spotinst.io/loadBalancer/targetSet/{TARGET_SET_ID}?accountId={ACCOUNT_ID}
Update one or more parameters in your target sets. Only the specified fields will be affected. For more information on the body parameters please checkout the Target Set/Create documentation
URL Parameters
Parameter | Type | Description |
---|---|---|
TARGET_SET_ID * | String | The target set id you want to update Example: ts-12345 |
ACCOUNT_ID | String | Account ID from Spotinst console Example: act-12345 |
Request - Update Weight
Headers
{ "Content-Type": "application/json", "Authorization": "Bearer ${token}" }
Body
{ "targetSet": { "weight": 1 } }
Request - Update Health Check
Headers
{ "Content-Type": "application/json", "Authorization": "Bearer ${token}" }
Body
{ "targetSet": { "healthCheck": { "interval": 10, "path": "/healthCheck", "port": 80, "protocol": "HTTP", "timeout": 5, "healthyThresholdCount": 2, "unhealthyThresholdCount": 3 } } }
Body Attributes
targetSet.name String
The name of the Target Set. Must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.targetSet.weight Integer
Defined how the traffic is distributed between the Target SettargetSet.healthCheck.interval Integer
The interval for the health checktargetSet.healthCheck.path String
The path to perform the health checktargetSet.healthCheck.port Integer
The port on which the load balancer is listening.targetSet.healthCheck.protocol String
The protocol to allow connections to the target for the health checktargetSet.healthCheck.timeout Integer
The time out for the health checktargetSet.healthCheck.healthyThresholdCount String
Total number of allowed healthy TargetstargetSet.healthCheck.unhealthyThresholdCount Integer
Total number of allowed unheathy Targets
Response - 200
Headers
{ "Content-Type": "application/json", "Authorization": "Bearer ${token}" }
Body
{ "status": { "code": 200, "message": "OK" } }