Build request to migrate deployment to a different template
Returns a deployment update request that would migrate this deployment to a different template.
Path parameters
-
Identifier for the Deployment
Query parameters
-
The ID of the deployment template to migrate to
Responses
-
The request was valid and the deployment can be migrated to the template with the provided ID.
-
The deployment cannot be successfully migrated to the template with the provided ID.
-
You are not authorized to perform this action.
-
The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
)
GET /deployments/{deployment_id}/migrate_template
curl \
-X GET https://{{hostname}}/api/v1/deployments/{deployment_id}/migrate_template?template_id=string
Response examples (200)
{
"name": "string",
"prune_orphans": true,
"resources": {
"elasticsearch": [
{
"ref_id": "string",
"display_name": "string",
"region": "string",
"plan": {
"cluster_topology": [
{
"id": "string",
"node_type": {
"master": true,
"data": true,
"ingest": true,
"ml": true
},
"node_roles": [
"master"
],
"memory_per_node": 42,
"node_count_per_zone": 42,
"zone_count": 42,
"elasticsearch": {
"version": "string",
"docker_image": "string",
"system_settings": {
"scripting": {
"painless_enabled": true,
"mustache_enabled": true,
"expressions_enabled": true,
"stored": {
"enabled": true,
"sandbox_mode": true
},
"file": {
"enabled": true,
"sandbox_mode": true
},
"inline": {
"enabled": true,
"sandbox_mode": true
}
},
"reindex_whitelist": [
"string"
],
"auto_create_index": true,
"enable_close_index": true,
"destructive_requires_name": true,
"watcher_trigger_engine": "string",
"default_shards_per_index": 42,
"monitoring_collection_interval": 42,
"monitoring_history_duration": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string",
"enabled_built_in_plugins": [
"string"
],
"user_plugins": [
{
"name": "string",
"url": "string",
"elasticsearch_version": "string"
}
],
"user_bundles": [
{
"name": "string",
"url": "string",
"elasticsearch_version": "string"
}
],
"curation": {
"from_instance_configuration_id": "string",
"to_instance_configuration_id": "string"
},
"node_attributes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"instance_configuration_id": "string",
"instance_configuration_version": 42,
"size": {
"value": 42,
"resource": "memory"
},
"autoscaling_min": {
"value": 42,
"resource": "memory"
},
"autoscaling_max": {
"value": 42,
"resource": "memory"
},
"autoscaling_policy_override_json": {},
"topology_element_control": {
"min": {
"value": 42,
"resource": "memory"
}
},
"autoscaling_tier_override": true
}
],
"elasticsearch": {
"version": "string",
"docker_image": "string",
"system_settings": {
"scripting": {
"painless_enabled": true,
"mustache_enabled": true,
"expressions_enabled": true,
"stored": {
"enabled": true,
"sandbox_mode": true
},
"file": {
"enabled": true,
"sandbox_mode": true
},
"inline": {
"enabled": true,
"sandbox_mode": true
}
},
"reindex_whitelist": [
"string"
],
"auto_create_index": true,
"enable_close_index": true,
"destructive_requires_name": true,
"watcher_trigger_engine": "string",
"default_shards_per_index": 42,
"monitoring_collection_interval": 42,
"monitoring_history_duration": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string",
"enabled_built_in_plugins": [
"string"
],
"user_plugins": [
{
"name": "string",
"url": "string",
"elasticsearch_version": "string"
}
],
"user_bundles": [
{
"name": "string",
"url": "string",
"elasticsearch_version": "string"
}
],
"curation": {
"from_instance_configuration_id": "string",
"to_instance_configuration_id": "string"
},
"node_attributes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"deployment_template": {
"id": "string",
"version": "string"
},
"transient": {
"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": {}
},
"autoscaling_enabled": true
},
"settings": {
"snapshot": {
"repository": {
"static": {
"repository_type": "string",
"settings": {}
},
"reference": {
"repository_name": "string"
},
"default": {}
},
"interval": "string",
"pending_interval": "string",
"wait_time_after_snapshotting": "string",
"enabled": true,
"suspended": [
"string"
],
"retention": {
"snapshots": 42,
"max_age": "string"
},
"slm": true,
"cron_expression": "string"
},
"monitoring": {
"target_cluster_id": "string"
},
"metadata": {
"name": "string",
"owner_id": "string",
"organization_id": "string",
"subscription_level": "string",
"system_owned": true,
"contact_email": "string",
"hidden": true,
"resources": {
"cpu": {
"boost": true,
"hard_limit": true
}
}
},
"curation": {
"specs": [
{
"index_pattern": "string",
"trigger_interval_seconds": 42
}
]
},
"dedicated_masters_threshold": 42,
"traffic_filter": {
"rulesets": [
"string"
]
},
"trust": {
"accounts": [
{
"account_id": "string",
"name": "string",
"trust_all": true,
"trust_allowlist": [
"string"
]
}
],
"external": [
{
"trust_relationship_id": "string",
"name": "string",
"trust_all": true,
"trust_allowlist": [
"string"
]
}
],
"direct": [
{
"uid": "string",
"name": "string",
"type": "ECE",
"trust_all": true,
"trust_allowlist": [
"string"
],
"scope_id": "abc123",
"additional_node_names": [
"string"
],
"certificates": [
{
"pem": "string",
"metadata": {
"fingerprint": "string",
"valid_to": "2024-05-04T09:42:00+00:00",
"valid_from": "2024-05-04T09:42:00+00:00",
"also_trusted_by": [
"string"
]
}
}
]
}
]
},
"keystore_contents": {
"secrets": {
"additionalProperty1": {
"value": {},
"as_file": true
},
"additionalProperty2": {
"value": {},
"as_file": true
}
}
}
}
}
],
"kibana": [
{
"ref_id": "string",
"elasticsearch_cluster_ref_id": "string",
"display_name": "string",
"region": "string",
"plan": {
"cluster_topology": [
{
"memory_per_node": 42,
"node_count_per_zone": 42,
"instance_configuration_id": "string",
"instance_configuration_version": 42,
"size": {
"value": 42,
"resource": "memory"
},
"zone_count": 42,
"kibana": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
}
}
],
"kibana": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
},
"transient": {
"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
}
],
"reallocate_instances": true,
"preferred_allocators": [
"string"
],
"preferred_allocator_tags": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"extended_maintenance": true,
"cluster_reboot": "forced",
"override_failsafe": true
}
}
},
"settings": {
"metadata": {
"name": "string",
"owner_id": "string",
"organization_id": "string",
"subscription_level": "string",
"system_owned": true,
"contact_email": "string",
"hidden": true,
"resources": {
"cpu": {
"boost": true,
"hard_limit": true
}
}
}
}
}
],
"apm": [
{
"ref_id": "string",
"elasticsearch_cluster_ref_id": "string",
"display_name": "string",
"region": "string",
"plan": {
"cluster_topology": [
{
"instance_configuration_id": "string",
"instance_configuration_version": 42,
"size": {
"value": 42,
"resource": "memory"
},
"zone_count": 42,
"apm": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"kibana_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_token": "string",
"debug_enabled": true
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
}
}
],
"apm": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"kibana_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_token": "string",
"debug_enabled": true
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
},
"transient": {
"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
}
],
"reallocate_instances": true,
"preferred_allocators": [
"string"
],
"preferred_allocator_tags": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"extended_maintenance": true,
"cluster_reboot": "forced",
"override_failsafe": true
}
}
},
"settings": {
"metadata": {
"name": "string",
"owner_id": "string",
"organization_id": "string",
"subscription_level": "string",
"system_owned": true,
"contact_email": "string",
"hidden": true,
"resources": {
"cpu": {
"boost": true,
"hard_limit": true
}
}
}
}
}
],
"appsearch": [
{
"ref_id": "string",
"elasticsearch_cluster_ref_id": "string",
"display_name": "string",
"region": "string",
"plan": {
"cluster_topology": [
{
"node_type": {
"appserver": true,
"worker": true
},
"instance_configuration_id": "string",
"instance_configuration_version": 42,
"size": {
"value": 42,
"resource": "memory"
},
"zone_count": 42,
"appsearch": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_session_key": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
}
}
],
"appsearch": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_session_key": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
},
"transient": {
"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
}
],
"reallocate_instances": true,
"preferred_allocators": [
"string"
],
"preferred_allocator_tags": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"extended_maintenance": true,
"cluster_reboot": "forced",
"override_failsafe": true
}
}
},
"settings": {
"metadata": {
"name": "string",
"owner_id": "string",
"organization_id": "string",
"subscription_level": "string",
"system_owned": true,
"contact_email": "string",
"hidden": true,
"resources": {
"cpu": {
"boost": true,
"hard_limit": true
}
}
}
}
}
],
"enterprise_search": [
{
"ref_id": "string",
"elasticsearch_cluster_ref_id": "string",
"display_name": "string",
"region": "string",
"plan": {
"cluster_topology": [
{
"node_type": {
"appserver": true,
"worker": true,
"connector": true
},
"instance_configuration_id": "string",
"instance_configuration_version": 42,
"size": {
"value": 42,
"resource": "memory"
},
"zone_count": 42,
"enterprise_search": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_session_key": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
},
"allocator_filter": {},
"node_configuration": "string",
"memory_per_node": {},
"node_count_per_zone": {}
}
],
"enterprise_search": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_session_key": "string"
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string"
},
"transient": {
"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
}
],
"reallocate_instances": true,
"preferred_allocators": [
"string"
],
"preferred_allocator_tags": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"extended_maintenance": true,
"cluster_reboot": "forced",
"override_failsafe": true
}
}
},
"settings": {
"metadata": {
"name": "string",
"owner_id": "string",
"organization_id": "string",
"subscription_level": "string",
"system_owned": true,
"contact_email": "string",
"hidden": true,
"resources": {
"cpu": {
"boost": true,
"hard_limit": true
}
}
}
}
}
],
"integrations_server": [
{
"ref_id": "string",
"elasticsearch_cluster_ref_id": "string",
"display_name": "string",
"region": "string",
"plan": {
"cluster_topology": [
{
"instance_configuration_id": "string",
"instance_configuration_version": 42,
"size": {
"value": 42,
"resource": "memory"
},
"zone_count": 42,
"integrations_server": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"kibana_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_token": "string",
"debug_enabled": true
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string",
"mode": "standalone"
}
}
],
"integrations_server": {
"version": "string",
"docker_image": "string",
"system_settings": {
"elasticsearch_url": "string",
"kibana_url": "string",
"elasticsearch_username": "string",
"elasticsearch_password": "string",
"secret_token": "string",
"debug_enabled": true
},
"user_settings_json": {},
"user_settings_yaml": "string",
"user_settings_override_json": {},
"user_settings_override_yaml": "string",
"mode": "standalone"
},
"transient": {
"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
}
],
"reallocate_instances": true,
"preferred_allocators": [
"string"
],
"preferred_allocator_tags": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"extended_maintenance": true,
"cluster_reboot": "forced",
"override_failsafe": true
}
}
},
"settings": {
"metadata": {
"name": "string",
"owner_id": "string",
"organization_id": "string",
"subscription_level": "string",
"system_owned": true,
"contact_email": "string",
"hidden": true,
"resources": {
"cpu": {
"boost": true,
"hard_limit": true
}
}
}
}
}
]
},
"settings": {
"observability": {
"logging": {
"destination": {
"deployment_id": "string",
"ref_id": "string"
}
},
"metrics": {
"destination": {
"deployment_id": "string",
"ref_id": "string"
},
"force_legacy_monitoring": true
}
},
"autoscaling_enabled": true
},
"metadata": {
"system_owned": true,
"hidden": true,
"tags": [
{
"key": "string",
"value": "string"
}
]
},
"alias": "string"
}
Response examples (400)
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (401)
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (404)
# Headers
x-cloud-error-codes: deployments.deployment_not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}