Deployment - Remote Clusters

edit

Get eligible remote clusters

edit

Returns the list of deployments which contain eligible remote clusters for a specific version.

Request

edit

POST /api/v1/deployments/eligible-remote-clusters

Query parameters

edit
Name Type Required Description

version

string

Y

The version of the Elasticsearch cluster cluster that will potentially be configured to have remote clusters.

Request body

edit

(SearchRequest) (Optional) The search query to run against all deployments containing eligible remote clusters. When not specified, all the eligible deployments are matched.

Responses

edit
200

(DeploymentsSearchResponse)

List of deployments which contains eligible remote clusters for a specific version

400

(BasicFailedReply)

The provided version is invalid. (code: stackpack.invalid_version)

Headers

x-cloud-error-codes (string; allowed values: [stackpack.invalid_version])
The error codes associated with the response

Request example

edit
curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/eligible-remote-clusters \
-H "Authorization: ApiKey $EC_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "cursor" : "string",
   "from" : 0,
   "query" : {
      "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"
         }
      }
   },
   "size" : 0,
   "sort" : [
      {}
   ]
}
'

Get eligible remote clusters

edit

Returns the list of deployments which contain eligible remote clusters for the elasticsearch resource.

Request

edit

POST /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/eligible-remote-clusters

Path parameters

edit
Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource (or '_main' if there is only one).

Request body

edit

(SearchRequest) (Optional) The search query to run against all deployments containing eligible remote clusters. When not specified, all the eligible deployments are matched.

Responses

edit
200

(DeploymentsSearchResponse)

List of deployments which contains eligible remote clusters for the resource

400

(BasicFailedReply)

The resource specified doesn't yet have a valid version for the current plan or the pending plan. (code: deployments.resource_does_not_have_a_valid_version)

Headers

x-cloud-error-codes (string; allowed values: [deployments.resource_does_not_have_a_valid_version])
The error codes associated with the response
404

(BasicFailedReply)

  • The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found)
  • The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response

Request example

edit
curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/eligible-remote-clusters \
-H "Authorization: ApiKey $EC_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "cursor" : "string",
   "from" : 0,
   "query" : {
      "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"
         }
      }
   },
   "size" : 0,
   "sort" : [
      {}
   ]
}
'

Get certificate based remote clusters

edit

Returns the list of certificate based remote clusters for the elasticsearch resource.

Request

edit

GET /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/remote-clusters

Path parameters

edit
Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource (or '_main' if there is only one).

Responses

edit
200

(RemoteResources)

List of certificate based remote clusters for the resource

404

(BasicFailedReply)

  • The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found)
  • The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response

Request example

edit
curl -XGET https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/remote-clusters \
-H "Authorization: ApiKey $EC_API_KEY"

Set certificate based remote clusters

edit

Overwrites or creates the list of certificate based remote clusters for the elasticsearch resource.

Request

edit

PUT /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/remote-clusters

Path parameters

edit
Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource (or '_main' if there is only one).

Request body

edit

(RemoteResources) (required) List of certificate based remote clusters for the resource

Responses

edit
202

(EmptyResponse)

The Remote Clusters were updated

404

(BasicFailedReply)

  • The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found)
  • The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response

Request example

edit
curl -XPUT https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/remote-clusters \
-H "Authorization: ApiKey $EC_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "resources" : [
      {
         "alias" : "string",
         "deployment_id" : "string",
         "elasticsearch_ref_id" : "string",
         "info" : {
            "compatible" : true,
            "connected" : true,
            "healthy" : true,
            "trusted" : true,
            "trusted_back" : true
         },
         "skip_unavailable" : true
      }
   ]
}
'