All Products
Search
Document Center

ModifyCluster

Last Updated: May 14, 2018

Description

Modifies the cluster information.

Request syntax

  1. PUT /clusters/{Id}
  2. {
  3. "Groups": {
  4. "{GroupName}": {
  5. "DesiredVMCount": 3,
  6. "SpotStrategy": "SpotAsPriceGo",
  7. "SpotPriceLimit": 0.0
  8. }
  9. }
  10. }

Attribute description

Attribute Type Required Description
Id String Yes Cluster ID.
GroupName String Yes Group name.
DesiredVMCount int No Expected number of instances.
SpotStrategy String No Bidding strategy for an instance. It takes effect only when ResourceType is Spot.
Values:
SpotWithPriceLimit: Set the maximum price for the spot instance.
SpotAsPriceGo: The system provides a price automatically. The maximum value is the Pay-As-You-Go price.
SpotPriceLimit Float No Maximum price of an instance per hour.The value can contain at most three decimals. It takes effect when SpotStrategy is SpotWithPriceLimit.

Response

Success

The 200 status code is returned.

Error codes

Error code Error message HTTP status code Meaning
Invalid{Parameter} Specified parameter {Parameter} is not valid. 400 The {Parameter} parameter is invalid.
InvalidDesiredVMCount Specified parameter DesiredVMCount is not valid. Its type must be integer. 400 DesiredVMCount must be an integer.
InvalidDesiredVMCount Specified parameter DesiredVMCount is not valid. It must be in [1, 65536]. 400 The value of DesiredVMCount must be in the range of [1, 65536].
InvalidGroups Specified parameter Groups is not valid. Its type must be object. 400 Groups must be an object.
InvalidGroups.{key} Specified parameter Groups.{key} is not valid. Its type must be object. 400 Groups.{key} must be an object.
InvalidGroups.{key} Specified parameter Groups.{key} is not valid. Its size must be in [1, 64]. 400 The value of Groups.{key} must be in the range of [1, 64].
MissingDesiredVMCount DesiredVMCount is mandatory for this action. 400 The parameter DesiredVMCount is missing.
MissingGroups Groups is mandatory for this action. 400 The parameter Groups is missing.
QuotaExhausted.MaxClusterGroupDesiredVMCount The MaxClusterGroupDesiredVMCount ({value}) quota is exhausted. 403 DesiredVMCount of a group in a cluster cannot exceed {value}.
InvalidResource.NotFound Specified resource is not found. 404 The user requested resource does not exist.