Files
elasticsearch-js/docs/reference-security-create_service_token.asciidoc
2024-12-05 14:46:46 -06:00

67 lines
4.2 KiB
Plaintext

[[reference-security-create_service_token]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.security.createServiceToken
Create a service account token. Create a service accounts token for access without requiring basic authentication.
{ref}/security-api-create-service-token.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(SecurityCreateServiceTokenRequest, options?): Promise<SecurityCreateServiceTokenResponse>
----
[discrete]
===== `SecurityCreateServiceTokenRequest`
[source,ts]
----
interface SecurityCreateServiceTokenRequest extends <<shared-type-request-base, RequestBase>> {
namespace: <<shared-type-namespace, Namespace>>
service: <<shared-type-service, Service>>
name?: <<shared-type-name, Name>>
refresh?: <<shared-type-refresh, Refresh>>
}
----
[discrete]
===== `SecurityCreateServiceTokenResponse`
[source,ts]
----
interface SecurityCreateServiceTokenResponse {
created: boolean
token: SecurityCreateServiceTokenToken
}
----