Set instance configurationedit

Creates or updates an instance configuration.

Requestedit

PUT /api/v1/platform/configuration/instances/{id}

Path parametersedit

Name Type Required Description

id

string

Y

ID of the instance configuration

Query parametersedit

Name Type Required Description

config_control

boolean

N

If true, then an update that changes immutable fields will create a new version of the IC (leaving the previous ones accessible via 'config_version'). Otherwise such updates will fail.

create_only

boolean

N

If true, will fail if an instance configuration already exists at the given id

strict_mode

boolean

N

If true, then allocator_filter and storage_multiplier cannot be changed in an existing IC. Defaults to false unless config_control is true (in which case a new version is created)

test_config

boolean

N

If true, The IC is added as a test version (set 'instance_config_version': -1 in the deployment request to reference), leaving the existing IC alone. Will error if the IC doesn't already exist.

version

integer

N

This is a database-level field, not related to the application-level 'config_version', except as described in the following docs. If specified, checks for conflicts against 'x-cloud-resource-version' from the GET request (where the 'config_version' in the GET should match the the 'configuration_version' in the PUT body if the IC is configuration controlled).

Request bodyedit

(InstanceConfiguration) (required) the Instance Configuration

Responsesedit

200

(VersionedIdResponse)

The instance configuration was updated successfully.

201

(VersionedIdResponse)

The instance configuration was created successfully.

400

(BasicFailedReply)

cluster_type in the InstanceConfiguration model is invalid (code: 'configuration.invalid_cluster_type') or the ZooKeeper operation failed due to bad version, etc. (code: 'configuration.instance_configuration_update_failed') or the id in the InstanceConfiguration model is reserved/prohibited (code: 'configuration.configuration_id_reserved') or the discrete_sizes in the InstanceConfiguration model is invalid (code: 'configuration.invalid_discrete_sizes') or the metadata in the InstanceConfiguration model has empty keys or values (code: 'configuration.bad_meta_data')

403

(BasicFailedReply)

system_owned or deleted_on cannot be set externally (code: 'configuration.system_owned')

404

(BasicFailedReply)

Instance configuration specified by {id} cannot be found or the operation failed (code: 'configuration.instance_configuration_not_found')

Request exampleedit

curl -XPUT https://{{hostname}}/api/v1/platform/configuration/instances/{id} \
-H "Authorization: ApiKey $ECE_API_KEY" \
-d '
{
   "allocator_filter" : {
      "bool" : {
         "filter" : [
            null
         ],
         "minimum_should_match" : 0,
         "must" : [
            null
         ],
         "must_not" : [
            null
         ],
         "should" : [
            null
         ]
      },
      "exists" : {
         "field" : "string"
      },
      "match" : {
         "some_property" : {
            "analyzer" : "string",
            "minimum_should_match" : 0,
            "operator" : "string",
            "query" : "string"
         }
      },
      "match_all" : {},
      "match_none" : {},
      "nested" : {
         "path" : "string",
         "query" : null,
         "score_mode" : "string"
      },
      "prefix" : {
         "some_property" : {
            "boost" : 0.1,
            "value" : "string"
         }
      },
      "query_string" : {
         "allow_leading_wildcard" : true,
         "analyzer" : "string",
         "default_field" : "string",
         "default_operator" : "string",
         "query" : "string"
      },
      "range" : {
         "some_property" : {
            "boost" : 0.1,
            "format" : "string",
            "gt" : {},
            "gte" : {},
            "lt" : {},
            "lte" : {},
            "time_zone" : "string"
         }
      },
      "simple_query_string" : {
         "analyze_wildcard" : true,
         "analyzer" : "string",
         "auto_generate_synonyms_phrase_query" : true,
         "default_operator" : "string",
         "fields" : [
            "string"
         ],
         "flags" : "string",
         "fuzzy_max_expansions" : 0,
         "fuzzy_prefix_length" : 0,
         "fuzzy_transpositions" : true,
         "lenient" : true,
         "minimum_should_match" : "string",
         "query" : "string",
         "quote_field_suffix" : "string"
      },
      "term" : {
         "some_property" : {
            "value" : "string"
         }
      }
   },
   "config_version" : 0,
   "cpu_multiplier" : 0.1,
   "deleted_on" : "2019-01-01T00:00:00Z",
   "description" : "string",
   "discrete_sizes" : {
      "default_size" : 0,
      "resource" : "string",
      "sizes" : [
         0
      ]
   },
   "id" : "string",
   "instance_type" : "string",
   "max_zones" : 0,
   "metadata" : {},
   "name" : "string",
   "node_types" : [
      "string"
   ],
   "storage_multiplier" : 0.1,
   "system_owned" : true
}
'