Test run of new docs
This commit is contained in:
71
docs/reference-security-grant_api_key.asciidoc
Normal file
71
docs/reference-security-grant_api_key.asciidoc
Normal file
@ -0,0 +1,71 @@
|
||||
[[reference-security-grant_api_key]]
|
||||
|
||||
////////
|
||||
===========================================================================================================================
|
||||
|| ||
|
||||
|| ||
|
||||
|| ||
|
||||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|
||||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|
||||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|
||||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|
||||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|
||||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|
||||
|| ||
|
||||
|| ||
|
||||
|| 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.grantApiKey
|
||||
|
||||
Grant an API key. Create an API key on behalf of another user. This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. It is not possible to use this API to create an API key without that user’s credentials. The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. In this case, the API key will be created on behalf of the impersonated user. This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. By default, API keys never expire. You can specify expiration information when you create the API keys.
|
||||
|
||||
{ref}/security-api-grant-api-key.html[{es} documentation]
|
||||
|
||||
[discrete]
|
||||
==== Function signature
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
(SecurityGrantApiKeyRequest, options?): Promise<SecurityGrantApiKeyResponse>
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== `SecurityGrantApiKeyRequest`
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
interface SecurityGrantApiKeyRequest extends <<shared-type-request-base, RequestBase>> {
|
||||
api_key: SecurityGrantApiKeyGrantApiKey
|
||||
grant_type: SecurityGrantApiKeyApiKeyGrantType
|
||||
access_token?: string
|
||||
username?: <<shared-type-username, Username>>
|
||||
password?: <<shared-type-password, Password>>
|
||||
run_as?: <<shared-type-username, Username>>
|
||||
}
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== `SecurityGrantApiKeyResponse`
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
interface SecurityGrantApiKeyResponse {
|
||||
api_key: string
|
||||
id: <<shared-type-id, Id>>
|
||||
name: <<shared-type-name, Name>>
|
||||
expiration?: <<shared-type-epoch-time, EpochTime>><<<shared-type-unit-millis, UnitMillis>>>
|
||||
encoded: string
|
||||
}
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user