elasticsearch/docs/java-rest/high-level/security/get-service-accounts.asciidoc
Yang Wang 2350369782
Service Accounts - HLRC (#72431)
This PR adds corresponding components in High Level Rest Client for the new
APIs related to the service accounts feature.
2021-06-17 21:27:20 +10:00

49 lines
1.6 KiB
Text

--
:api: get-service-accounts
:request: GetServiceAccountsRequest
:response: GetServiceAccountsResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Get Service Accounts API
[id="{upid}-{api}-request"]
==== Get Service Accounts Request
Retrieving a service account can be performed by setting the namespace
and service-name on +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
Retrieving service accounts belong to a namespace can be performed
by just setting the namespace on +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request-namespace]
--------------------------------------------------
Retrieving all service accounts can be performed without specifying
either namespace or service-name on +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request-all]
--------------------------------------------------
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Get Service Accounts Response
The returned +{response}+ allows getting information about the retrieved service accounts as follows.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> Information for the requested service account