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

URL Parameters

Parameter Type Description
OCEAN_CLUSTER_ID * String

The Ocean cluster to update.

ACCOUNT_ID * String

Your Spotinst accountId associated with your token.

All Ocean parameters are updatable, excluding the Region and Id. This API supports partial updates, so specific fields can be updated separately.

Request

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

Body
Copied!
Downloaded!
{
  "request": {
    "id": "f77f3705-589f-4059-9c44-325b1d654c42",
    "url": "/ocean/aws/k8s/cluster/o-482d9d26?accountId=act-594fb635",
    "method": "PUT",
    "timestamp": "2018-11-05T12:59:35.207Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:ocean:aws:k8s",
    "items": [
      {
        "id": "o-482d9d26",
        "name": "blacklistTest",
        "controllerClusterId": "from.opt.test3",
        "region": "us-west-2",
        "autoScaler": {
          "cooldown": 180,
          "down": {
            "evaluationPeriods": 3,
            "maxScaleDownPercentage": 60
          },
          "resourceLimits": {
            "maxMemoryGib": 1500,
            "maxVCpu": 750
          },
          "headroom": {
            "cpuPerUnit": 2000,
            "memoryPerUnit": 0,
            "gpuPerUnit": 1,
            "numOfUnits": 4
          },
          "isAutoConfig": false,
          "autoHeadroomPercentage": null,
          "isEnabled": true
        },
        "capacity": {
          "minimum": 0,
          "maximum": 1000,
          "target": 1
        },
        "strategy": {
          "fallbackToOd": true,
          "utilizeReservedInstances": true,
          "drainingTimeout": 60,
          "gracePeriod": 600
        },
        "scheduling": {
          "shutdownHours": {
            "isEnabled": true,
            "timeWindows": [
              "Fri:15:30-Wed:14:30",
              "Wed:15:30-Thu:18:30"
            ]
          },
          "tasks": {
            "isEnabled": true,
            "cronExpression": "0 1 * * *",
            "taskType": "clusterRoll"
          }
        },
        "security": {
          "containerImage": {
            "approvedImages": [
              "*.ecr.*.amazonaws.com/*",
              "docker.*"
            ]
          }
        },
        "compute": {
          "subnetIds": [
            "subnet-cb6c3ab2"
          ],
          "instanceTypes": {},
          "launchSpecification": {
            "securityGroupIds": [
              "sg-c3d914b0"
            ],
            "iamInstanceProfile": {},
            "tags": [
              {
                "tagKey": "or",
                "tagValue": "from"
              }
            ],
            "loadBalancers": [
              {
                "arn": "arn:aws:elasticloadbalancing:us-west2:922761411234:targetgroup",
                "type": "TARGET_GROUP"
              },
              {
                "name": "MyClassicLB",
                "type": "CLASSIC"
              }
            ],
            "associatePublicIpAddress": true,
            "monitoring": false,
            "ebsOptimized": false
          }
        },
        "createdAt": "2018-11-05T12:55:50.000+0000",
        "updatedAt": "2018-11-05T12:58:15.000+0000"
      }
    ],
    "count": 1
  }
}