Add HLRC support for enrich get policy API. (#45970)

Changed the signature of AbstractResponseTestCase#createServerTestInstance(...)
to include the randomly selected xcontent type. This is needed for the
creating a server response instance with a query which is represented as BytesReference.
Maybe this should go into a different change?

This PR also includes HLRC docs for the get policy api.

Relates to #32789
This commit is contained in:
Martijn van Groningen 2019-09-11 14:26:42 +02:00 committed by GitHub
parent 534527451b
commit 5d76d2d1e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 511 additions and 39 deletions

View file

@ -0,0 +1,32 @@
--
:api: enrich-get-policy
:request: GetPolicyRequest
:response: GetPolicyResponse
--
[id="{upid}-{api}"]
=== Get Policy API
[id="{upid}-{api}-request"]
==== Request
The Get Policy API allows to retrieve enrich policies by name
or all policies if no name is provided.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
[id="{upid}-{api}-response"]
==== Response
The returned +{response}+ includes the requested enrich policy.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> The actual enrich policy.
include::../execution.asciidoc[]

View file

@ -604,6 +604,8 @@ The Java High Level REST Client supports the following Enrich APIs:
* <<{upid}-enrich-put-policy>>
* <<{upid}-enrich-delete-policy>>
* <<{upid}-enrich-get-policy>>
include::enrich/put_policy.asciidoc[]
include::enrich/delete_policy.asciidoc[]
include::enrich/get_policy.asciidoc[]