fbpx
PUThttps://api.spotinst.io/ocean/aws/ecs/cluster/{OCEAN_CLUSTER_ID}?accountId={ACCOUNT_ID}

All Ocean parameters are updatable, excluding the Region and Id.

This API supports partial updates, so specific fields can be updated separately.

URL Parameters

Parameter Type Description
OCEAN_CLUSTER_ID * String

The Ocean cluster to update.

ACCOUNT_ID * String

Your Spotinst accountId associated with your token.

Request - Example - update cluster's name

Headers
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "cluster": {
    "name": "newName"
   }
}
Response - 200

Body
Copied!
Downloaded!
{
    "request": {
        "id": "6b9f7c91-140e-4c8b-9b40-edde4fac243f",
        "url": "/ocean/aws/ecs/cluster/o-1234ds2e?accountId=act-7461862f",
        "method": "PUT",
        "timestamp": "2019-06-18T06:28:08.637Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:ocean:aws:ecs",
        "items": [
            {
                "id": "o-bd3ed435",
                "name": "myOceanController",
                "clusterName": "oceanEcs-FirstOfHisName",
                "autoScaler": {
                    "isEnabled": true,
                    "cooldown": 180,
                    "down": {
                        "evaluationPeriods": 3,
                        "maxScaleDownPercentage": 60
                     },
                     "headroom": {
                         "cpuPerUnit": 2000,
                         "memoryPerUnit": 0,
                         "numOfUnits": 4
                     },
                     "resourceLimits": {
                     "maxVCpu": 2,
                     "maxMemoryGib": 1
                      },
                     "isAutoConfig": false
                 },
                "region": "us-west-2",
                "capacity": {
                    "minimum": 0,
                    "maximum": 0,
                    "target": 0
                },
                "strategy": {
                    "utilizeReservedInstances": true,
                    "fallbackToOd": true,
                    "spotPercentage": 100,
                    "drainingTimeout": 60
                },
                "compute": {
                    "subnetIds": [
                        "subnet-79da021e"
                    ],
                    "instanceTypes": {
                        "whitelist": [
                            "c4.2xlarge",
                            "c4.xlarge",
                            "c4.4xlarge",
                            "c4.8xlarge"
                        ]
                    },
                    "launchSpecification": {
                        "securityGroupIds": [
                            "sg-c3d914b0"
                        ],
                        "iamInstanceProfile": {
                            "arn": "orfrom"
                        },
                        "keyPair": "spotinst-labs-oregon",
                        "tags": [
                            {
                                "tagKey": "creator",
                                "tagValue": "orfrom"
                            },
                            {
                                "tagKey": "k8s.io/role/node",
                                "tagValue": "1"
                            }
                        ],
                        "loadBalancers": [
                            {
                                "arn": "arn:aws:elasticloadbalancing:us-west-2:922761411234:targetgroup",
                                "type": "TARGET_GROUP"
                            },
                            {
                                "name": "MyClassicLB",
                                "type": "CLASSIC"
                            }
                        ],
                        "associatePublicIpAddress": true,
                        "monitoring": false,
                        "ebsOptimized": false,
                        "userData": ""
                    }
                },
                "createdAt": "2019-06-18T06:28:08.488Z",
                "updatedAt": "2019-06-18T06:28:08.488Z"
            }
        ],
        "count": 1
    }
}