Opensearch dashboards.legacyclusterclient.asscoped
Home > opensearch-dashboards > LegacyClusterClient > asScoped
LegacyClusterClient.asScoped() method
Creates an instance of ILegacyScopedClusterClient based on the configuration the current cluster client that exposes additional callAsCurrentUser
method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed.
Signature:
asScoped(request?: ScopeableRequest): ILegacyScopedClusterClient;
Parameters
Parameter | Type | Description |
---|---|---|
request | ScopeableRequest | Request the IScopedClusterClient instance will be scoped to. Supports request optionality, Legacy.Request & FakeRequest for BWC with LegacyPlatform |
Returns: