List
Returns the list of available extensions for the specified Elasticsearch cluster.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListExtensionsRequest =
cloudApi.mdb.elasticsearch_extension_service.ListExtensionsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ExtensionServiceClient);
const result = await client.list(
ListExtensionsRequest.fromPartial({
clusterId: "clusterId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.mdb.elasticsearch.v1.extension_service_pb2_grpc import ExtensionServiceStub
from yandex.cloud.mdb.elasticsearch.v1.extension_service_pb2 import ListExtensionsRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ExtensionServiceStub)
response = service.List(
ListExtensionsRequest(
cluster_id="clusterId",
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
ListExtensionsRequest
clusterId
: string
ID of the cluster to list extensions in.
pageSize
: int64
The maximum number of results per page to return.
If the number of available results is larger than page_size, the API returns a ListExtensionsResponse.next_page_token that can be used to get the next page of results in subsequent ExtensionService.List requests.
pageToken
: string
Page token that can be used to iterate through multiple pages of results.
To get the next page of results, set page_token to the ListExtensionsResponse.next_page_token returned by the previous ExtensionService.List request.
ListExtensionsResponse
extensions
: Extension
Requested list of extensions.
nextPageToken
: string
The token that can be used to get the next page of results.
If the number of results is larger than ListExtensionsRequest.page_size, use the next_page_token as the value for the ListExtensionsRequest.page_token in the subsequent ExtensionService.List request to iterate through multiple pages of results.
Each of the subsequent ExtensionService.List requests should use the next_page_token value returned in the previous request to continue paging through the results.
Extension
name
: string
Name of the extension.
id
: string
Unique ID of the extension.
clusterId
: string
ID of the Elasticsearch cluster the extension belongs to.
version
: int64
Version of the extension.
active
: bool
The flag shows whether the extension is active.