fbpx
PUThttps://api.spotinst.io/ocean/gcp/k8s/launchSpec/{OCEAN_LAUNCH_SPEC_ID}?accountId={ACCOUNT_ID}

URL Parameters

Parameter Type Description
OCEAN_LAUNCH_SPEC_ID * String

Ocean cluster launchSpec ID.

ACCOUNT_ID * String

The Spotinst accountId associated with your token.

Example: act-123abc
Request - Example - Update Group Labels

Headers
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "launchSpec": {
        "labels":  [
            {
                "key": "env",
                "value": "test"
            }
        ]
    }
}

Body Attributes


Attribute Type Description
launchSpec.oceanId * String

The Ocean cluster ID. required for launchSpec create.

launchSpec.sourceImage * String

Set image URL.

launchSpec.metadata * Array<Object>

Metadata settings for cluster

launchSpec.metadata.key String

launchSpec.metadata.value String

launchSpec.labels Array<Object>

Add labels to cluster

launchSpec.labels.key String

launchSpec.labels.value String

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
Response - 200

Body
Copied!
Downloaded!
{
    "request": {
        "id": "e1aba6b3-d1be-419f-b19a-9542e09716a5",
        "url": "/ocean/gcp/k8s/cluster/launchSpec/CLUST-1?spotinstAccountId=act-7461862f",
        "method": "PUT",
        "timestamp": "2018-11-05T15:43:16.306Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:ocean:gcp:k8s",
        "items": [
			{
			    "launchSpec": {
			        "oceanId" : "o-1fff54ed",
			        "sourceImage":"https://www.googleapis.com/compute/v1/projects/gke-node-images/global/images/container-v1-3-v20160517",
			        "metadata": [
						  {
                              "key": "example_key1",
                              "value": "exmample_value1"
                          },
                          {
                              "key": "example_key2",
                              "value": "example_value2"
                          }
					],
					"taints": [
						{
							"key":"test",
			                "value":"test",
			                "effect":"NoExecute"
			            }
			            ],
			        "labels":[
                        {
			                "key":"env",
			                "value":"test"
			            }
					]
			    }
			}
		],
        "count": 1
    }
}