Software Secure Workload
Activity Configure

Update a Cluster

This endpoint updates a cluster.

PUT /openapi/v1/clusters/{cluster_id}

Parameters: The request URL contains the following parameters

Name

Type

Description

cluster_id

string

Unique identifier for the cluster.

The JSON query body contains the following keys

Attribute

Type

Description

name

string

The name of the cluster.

description

string

(optional) The description of the cluster.

approved

boolean

An approved cluster will not be updated during an automatic policy discovery run.

query

JSON

Filter (or match criteria) associated with the filter. Alternate Query Mode (also called Dynamic Mode) must be enabled on the workspace, otherwise ignored.

Response object: Returns the modified cluster object associated with specified ID.

Sample python code


  cluster_id = '5d02d2a4497d4f5194f104ef'
  payload = {
    'name': 'new_test_cluster',
  }
  restclient.put('/clusters/%s' % cluster_id, json_body=json.dumps(payload))