Move Elasticsearch resource instances
Moves one or more instances belonging to the given Elasticsearch resource to a different allocator.
Path parameters
-
Identifier for the Deployment.
-
User-specified RefId for the Resource (or '_main' if there is only one).
-
A comma-separated list of instance identifiers.
Query parameters
-
When
true
and the instance does not exist, proceeds to the next instance, or treats the instance as an error.Default value is
false
. -
When
true
, cancels and overwrites the pending plans, or treats the instance as an error.Default value is
false
. -
When
true
, the instances specified byinstance_ids
are considered permanently shut down for data migration logic.Default value is
false
. -
When
true
, moves the specified instances and ignores the changes for the cluster state.Default value is
true
. -
When
true
, moves instance data at file-system level (not via Elasticsearch), and re-creates instances on target allocator(s).Default value is
false
. -
When
true
, validates the move request, then returns the calculated plan without applying the plan.Default value is
false
.
Body
Overrides the default move configuration
-
The options for performing a plan change. Specify only one property each time. The default is
grow_and_shrink
. -
The configuration settings for the timeout and fallback parameters.
-
Restores a snapshot from a local or remote repository.
-
The list of resources used as remote clusters
-
If specified, contains transient settings to be applied to an Elasticsearch cluster during changes,default values shown below applied. These can be overridden by specifying them in the map (or null to unset). Additional settings can also be set. Settings will be cleared after the plan has finished. If not specified, no settings will be applied. NOTE: These settings are only explicitly cleared for 5.x+ clusters, they must be hand-reset to their defaults in 2.x- (or a cluster reboot will clear them).
- indices.store.throttle.max_bytes_per_sec: 120Mb
- indices.recovery.max_bytes_per_sec: 120Mb
- cluster.routing.allocation.cluster_concurrent_rebalance: 5
- cluster.routing.allocation.node_initial_primaries_recoveries: 5
- cluster.routing.allocation.node_concurrent_incoming_recoveries: 5 For version 8.1 and later no defaults are provided through this mechanism, but instead hardware dependent settings are provided to each instance.
Responses
-
If
validate_only
istrue
, the calculated plan is returned -
The move command was issued successfully. Use the "GET" command on the /{deployment_id} resource to monitor progress
-
- The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
) - The Elasticsearch Resource specified by {ref_id} cannot be found. (code:
deployments.deployment_resource_not_found
) - One or more instances of the given resource type are missing. (code:
deployments.instances_missing_on_update_error
)
- The Deployment specified by {deployment_id} cannot be found. (code:
curl \
--request POST 'https://{{hostname}}/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/instances/{instance_ids}/_move' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{"strategy":{"rolling":{"group_by":"string","allow_inline_resize":true,"skip_synced_flush":true,"shard_init_wait_time":42},"grow_and_shrink":{},"rolling_grow_and_shrink":{},"autodetect":{}},"plan_configuration":{"timeout":42,"calm_wait_time":42,"move_instances":[{"from":"string","to":["string"],"instance_down":true}],"move_allocators":[{"from":"string","to":["string"],"allocator_down":true}],"move_only":true,"reallocate_instances":true,"preferred_allocators":["string"],"preferred_allocator_tags":{"additionalProperty1":"string","additionalProperty2":"string"},"skip_snapshot":true,"max_snapshot_attempts":42,"max_snapshot_age":42,"extended_maintenance":true,"cluster_reboot":"forced","override_failsafe":true,"skip_data_migration":true,"skip_upgrade_checker":true,"skip_post_upgrade_steps":true,"skip_snapshot_post_major_upgrade":true},"restore_snapshot":{"repository_name":"string","snapshot_name":"string","repository_config":{"raw_settings":{}},"restore_payload":{"indices":["string"],"raw_settings":{}},"strategy":"partial","source_cluster_id":"string"},"remote_clusters":{"resources":[{"deployment_id":"string","elasticsearch_ref_id":"string","alias":"string","skip_unavailable":true,"info":{"healthy":true,"connected":true,"compatible":true,"trusted":true,"trusted_back":true}}]},"cluster_settings_json":{}}'