fbpx
PUThttps://api.spotinst.io/loadBalancer/target/{TARGET_ID}?accountId={ACCOUNT_ID}

Update one or more parameters in your targets. Only the specified fields will apply. For a full list of parameters you can update check the Target/Create documentation

Parameter Type Description
TARGET_ID * String

The target id you want to update

Example: t-12345
ACCOUNT_ID String

Account ID from Spotinst console

Example: act-12345
Request - Weight

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "target": {
    "weight": 1
  }
}

Body Attributes


  • target.name String
    The name of the Target . Must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
  • target.host String
    The new target host
  • target.port Integer
    The new target port
  • target.weight Integer
    Defined how the traffic is distributed between the Target
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "status": {
        "code": 200,
        "message": "OK"
    }
}