elasticsearch/docs/java-rest/high-level/security/get-service-account-credentials.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

38 lines
1.3 KiB
Text

--
:api: get-service-account-credentials
:request: GetServiceAccountCredentialsRequest
:response: GetServiceAccountCredentialsResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Get Service Account Credentials API
[id="{upid}-{api}-request"]
==== Get Service Account Credentials Request
Retrieving all credentials for 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]
--------------------------------------------------
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Get Service Account Credentials Response
The returned +{response}+ contains a list of service account tokens for the requested service account.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> Principal of the service account
<2> Name of the node that processed the request. Information of file service tokens is only collected from this node.
<3> List of service token information
<4> Name of the first service account token
<5> Source of the first service account token. The value is either `file` or `index`.