URL Parameters

Parameter Type Description

The Spot accountId associated with your token.

Example: act-123abc

Ocean cluster launchSpec ID. Can get launchSpec ID with get call.

autoApplyTags Boolean

Optionally update instance tags on the fly without rolling the launch specification.

Example: true
Default: false

  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
	"launchSpec": {
      "labels": [
          "key": "env",
          "value": "test"

Body Attributes

Attribute Type Description
launchSpec.imageId String

Set image ID. Can be null

launchSpec.userData String

Set user data script in Base64-encoded MIME

launchSpec.iamInstanceProfile Object

The instance profile iamRole object

launchSpec.iamInstanceProfile.arn String

The iamRole arn. If set - do not set launchSpec.iamInstanceProfile.name

launchSpec.iamInstanceProfile.name String

The iamRole name. If set - do not set launchSpec.iamInstanceProfile.arn

launchSpec.securityGroupIds Array<String>

Set security groups. Each element in array should be security group ID

launchSpec.instanceTypes Array<String>

A list of instance types allowed to be provisioned for pods pending for the launch specification. The list overrides the list defined for the Ocean cluster. Can be null.

Example: "c3.2xlarge", "c4.2xlarge"
launchSpec.rootVolumeSize Integer

Set root volume size (in GB)

launchSpec.labels Array<Object>

Add labels to cluster

launchSpec.labels.key String

Set label key

launchSpec.labels.value String

Set label value

launchSpec.taints Array<Object>

Add taints to cluster

launchSpec.taints.key String

Set taints key

launchSpec.taints.value String

Set taints value

launchSpec.taints.effect String

Set taints effect

Example: NoSchedule
launchSpec.subnetIds Array<String>

Set subnets in launchSpec. Each element in array should be subnet ID

launchSpec.elasticIpPool Object

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

launchSpec.elasticIpPool.tagSelector Object

Key-value object, which defines an Elastic IP from the customer pool. Can be null.

launchSpec.elasticIpPool.tagSelector.tagKey String

Elastic IP tag key. The launch spec will consider all elastic IPs tagged with this tag as a part of the elastic IP pool to use.

Example: "color"
launchSpec.elasticIpPool.tagSelector.tagValue String

Elastic IP tag value. Can be null.

Example: "orange"
launchSpec.autoScale Object

launchSpec.autoScale.headrooms Array<Object>

Set custom headroom per launch spec. provide list of launchSpec.autoscale.headrooms object

launchSpec.autoScale.headrooms.cpuPerUnit Integer

configure the number of CPUs to allocate the headroom. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU

Example: 2000
launchSpec.autoScale.headrooms.memoryPerUnit Integer

Configure the amount of memory (MiB) to allocate the headroom.

Example: 2048
launchSpec.autoScale.headrooms.gpuPerUnit Integer

How much GPU allocate for headroom unit

Example: 1
launchSpec.autoScale.headrooms.numOfUnits Integer

The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.

Example: 3
launchSpec.tags Array<Object>

List of kay-value pairs of tags

launchSpec.tags.tagKey String

Set the tag key

launchSpec.tags.tagValue String

Set the tag value

launchSpec.blockDeviceMappings Array<Object>

Block devices that are exposed to the instance. You can specify virtual devices and EBS volumes. This parameter and rootVolumeSize cannot be in the spec at the same time. This parameter can be null, but if not null, it must contain at least one block device.

launchSpec.blockDeviceMappings.deviceName String

Set device name.

Example: /dev/xvda
launchSpec.blockDeviceMappings.ebs.volumeType String

Set volume type.

Example: gp2
launchSpec.blockDeviceMappings.ebs.deleteOnTermination Boolean

Flag to delete the EBS on instance termination.

Example: true
launchSpec.blockDeviceMappings.ebs.encrypted Boolean

Example: false
launchSpec.blockDeviceMappings.ebs.iops Integer

Must be greater than or equal to 0.

Example: 1
launchSpec.blockDeviceMappings.ebs.kmsKeyId String

Example: alias/aws/ebs
launchSpec.blockDeviceMappings.ebs.snapshotId String

Example: snap-abcdefghi111110
launchSpec.blockDeviceMappings.ebs.volumeSize String

Set volume size (in GB). When using this property, you cannot use dynamicVolumeSize. You must use one of the other. Volume size should be greater or equal than the size configured in the AMI.

launchSpec.blockDeviceMappings.ebs.dynamicVolumeSize Object

Set dynamic volume size properties. When using this object, you cannot use volumeSize. You must use one or the other.

launchSpec.blockDeviceMappings.ebs.dynamicVolumeSize.baseSize * Integer

Initial size for volume.

Example: 50
launchSpec.blockDeviceMappings.ebs.dynamicVolumeSize.resource * String

Valid values: "CPU"

Example: CPU
launchSpec.blockDeviceMappings.ebs.dynamicVolumeSize.sizePerResourceUnit * Integer

Additional size per resource unit (in GB). For example: if baseSize=50, and sizePerResourceUnit=20, and an instance with 2 CPU is launched - its disk size will be: 90GB

Example: 20
launchSpec.resourceLimits Object

launchSpec.resourceLimits.maxInstanceCount Integer

Option to set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.

Example: 10
Response - 200

  "request": {
    "id": "XXXXXXX-abce-XXXX-XXXX-XXX11111XXXX",
    "url": "/ocean/aws/k8s/launchSpec/ols-123?accountId=XXXXXXXX",
    "method": "put",
    "timestamp": "2019-02-19T18:25:51.767Z"
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    "kind": "spotinst:ocean:aws:k8s",
    "items": [
        "id": "ols-123",
        "oceanId": "o-123",
        "securityGroupIds": [
        "instanceTypes": [
        "rootVolumeSize": 8,
        "labels": [
            "key": "env",
            "value": "test"
            "key": "creator",
            "value": "test"
        "taints": [
            "key": "taintKey",
            "value": "taintValue",
            "effect": "NoSchedule"
        "subnetIds": [
        "elasticIpPool": {
          "tagSelector": {
            "tagKey": "color",
            "tagValue": "orange"
        "autoScale": {
          "headrooms": [
              "cpuPerUnit": 1000,
              "memoryPerUnit": 2048,
              "gpuPerUnit": 0,
              "numOfUnits": 3
        "tags": [
            "tagKey": "Creator",
            "tagValue": "John Doe"
            "tagKey": "k8s.io/cluster-autoscaler/node-template/label/kops.k8s.io/instancegroup",
            "tagValue": "nodes"
            "tagKey": "k8s.io/role/node",
            "tagValue": "1"
            "tagKey": "KubernetesCluster",
            "tagValue": "from2.ek8s.com"
            "tagKey": "kops.k8s.io/instancegroup",
            "tagValue": "nodes"
        "blockDeviceMappings": [
            "deviceName": "/dev/xvda",
            "ebs": {
              "deleteOnTermination": false,
              "encrypted": "false",
              "iops": 1,
              "kmsKeyId": "alias/aws/ebs",
              "snapshotId": "snap-abcdefghi111110",
              "dynamicVolumeSize": {
                "baseSize": 10,
                "resource": "CPU",
                "sizePerResourceUnit": 1
              "volumeType": "gp2"
        "createdAt": "2019-02-19T18:25:51.752Z",
        "updatedAt": "2019-02-19T18:25:51.752Z"
    "count": 1