mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* mark context ES client & ES client methods deprecated * update docs * improve comment
This commit is contained in:
parent
4efd1d9493
commit
9a6acb4ee5
7 changed files with 24 additions and 0 deletions
|
@ -4,6 +4,11 @@
|
|||
|
||||
## LegacyClusterClient.callAsInternalUser property
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [IClusterClient.asInternalUser](./kibana-plugin-core-server.iclusterclient.asinternaluser.md)<!-- -->.
|
||||
>
|
||||
|
||||
Calls specified endpoint with provided clientParams on behalf of the Kibana internal user. See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## LegacyScopedClusterClient.callAsCurrentUser() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [IScopedClusterClient.asCurrentUser](./kibana-plugin-core-server.iscopedclusterclient.ascurrentuser.md)<!-- -->.
|
||||
>
|
||||
|
||||
Calls specified `endpoint` with provided `clientParams` on behalf of the user initiated request to the Kibana server (via HTTP request headers). See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## LegacyScopedClusterClient.callAsInternalUser() method
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [IScopedClusterClient.asInternalUser](./kibana-plugin-core-server.iscopedclusterclient.asinternaluser.md)<!-- -->.
|
||||
>
|
||||
|
||||
Calls specified `endpoint` with provided `clientParams` on behalf of the Kibana internal user. See [LegacyAPICaller](./kibana-plugin-core-server.legacyapicaller.md)<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -140,6 +140,7 @@ export class LegacyClusterClient implements ILegacyClusterClient {
|
|||
* Calls specified endpoint with provided clientParams on behalf of the
|
||||
* Kibana internal user.
|
||||
* See {@link LegacyAPICaller}.
|
||||
* @deprecated Use {@link IClusterClient.asInternalUser}.
|
||||
*
|
||||
* @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`.
|
||||
* @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client.
|
||||
|
|
|
@ -56,6 +56,7 @@ export class LegacyScopedClusterClient implements ILegacyScopedClusterClient {
|
|||
* Calls specified `endpoint` with provided `clientParams` on behalf of the
|
||||
* Kibana internal user.
|
||||
* See {@link LegacyAPICaller}.
|
||||
* @deprecated Use {@link IScopedClusterClient.asInternalUser}.
|
||||
*
|
||||
* @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`.
|
||||
* @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client.
|
||||
|
@ -73,6 +74,7 @@ export class LegacyScopedClusterClient implements ILegacyScopedClusterClient {
|
|||
* Calls specified `endpoint` with provided `clientParams` on behalf of the
|
||||
* user initiated request to the Kibana server (via HTTP request headers).
|
||||
* See {@link LegacyAPICaller}.
|
||||
* @deprecated Use {@link IScopedClusterClient.asCurrentUser}.
|
||||
*
|
||||
* @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`.
|
||||
* @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client.
|
||||
|
|
|
@ -394,6 +394,9 @@ export interface RequestHandlerContext {
|
|||
elasticsearch: {
|
||||
client: IScopedClusterClient;
|
||||
legacy: {
|
||||
/*
|
||||
* @deprecated Use {@link IScopedClusterClient}.
|
||||
*/
|
||||
client: ILegacyScopedClusterClient;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1324,6 +1324,7 @@ export interface LegacyCallAPIOptions {
|
|||
export class LegacyClusterClient implements ILegacyClusterClient {
|
||||
constructor(config: LegacyElasticsearchClientConfig, log: Logger, getAuthHeaders?: GetAuthHeaders);
|
||||
asScoped(request?: ScopeableRequest): ILegacyScopedClusterClient;
|
||||
// @deprecated
|
||||
callAsInternalUser: LegacyAPICaller;
|
||||
close(): void;
|
||||
}
|
||||
|
@ -1371,7 +1372,9 @@ export interface LegacyRequest extends Request {
|
|||
// @public @deprecated
|
||||
export class LegacyScopedClusterClient implements ILegacyScopedClusterClient {
|
||||
constructor(internalAPICaller: LegacyAPICaller, scopedAPICaller: LegacyAPICaller, headers?: Headers | undefined);
|
||||
// @deprecated
|
||||
callAsCurrentUser(endpoint: string, clientParams?: Record<string, any>, options?: LegacyCallAPIOptions): Promise<any>;
|
||||
// @deprecated
|
||||
callAsInternalUser(endpoint: string, clientParams?: Record<string, any>, options?: LegacyCallAPIOptions): Promise<any>;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue