OpenSearch/docs/java-rest/high-level/migration/get-assistance.asciidoc
Luca Cavanna 3e692c3f3d
HLRC: migration get assistance API (#32744)
The request and response classes have been extracted from `IndexUpgradeInfoAction` into top-level classes, and moved to the protocol jar. The `UpgradeActionRequired` enum is also moved.

Relates to #29827
2018-08-13 11:05:27 +02:00

50 lines
2.0 KiB
Plaintext

[[java-rest-high-migration-get-assistance]]
=== Migration Get Assistance
[[java-rest-high-migraton-get-assistance-request]]
==== Index Upgrade Info Request
An `IndexUpgradeInfoRequest` does not require any argument:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[get-assistance-request]
--------------------------------------------------
<1> Create a new request instance
==== Optional arguments
The following arguments can optionally be provided:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[get-assistance-request-indices]
--------------------------------------------------
<1> Set the indices to the request
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[get-assistance-request-indices-options]
--------------------------------------------------
<1> Set the `IndicesOptions` to control how unavailable indices are resolved and
how wildcard expressions are expanded
[[java-rest-high-migration-get-assistance-execution]]
==== Execution
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[get-assistance-execute]
--------------------------------------------------
[[java-rest-high-migration-get-assistance-response]]
==== Response
The returned `IndexUpgradeInfoResponse` contains the actions required for each index.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/MigrationClientDocumentationIT.java[get-assistance-response]
--------------------------------------------------
<1> Retrieve the index
<2> Retrieve the action required for the migration of the current index