mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
This PR adds corresponding components in High Level Rest Client for the new APIs related to the service accounts feature.
49 lines
1.6 KiB
Text
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
|