List
Retrieves the list of OpenSearch clusters that belong to the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListClustersRequest =
cloudApi.dataproc.cluster_service.ListClustersRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ClusterServiceClient);
const result = await client.list(
ListClustersRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.v1.cluster_service_pb2_grpc import ClusterServiceStub
from yandex.cloud.dataproc.v1.cluster_service_pb2 import ListClustersRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ClusterServiceStub)
response = service.List(
ListClustersRequest(
folder_id="folderId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListClustersRequest
folderId
: string
ID of the folder to list OpenSearch clusters in.
To get the folder ID, use a yandex.cloud.resourcemanager.v1.FolderService.List request.
pageSize
: int64
The maximum number of results per page to return.
If the number of available results is larger than page_size, the service returns a ListClustersResponse.next_page_token that can be used to get the next page of results in subsequent list requests.
pageToken
: string
Page token. To get the next page of results, set page_token to the ListClustersResponse.next_page_token returned by the previous list request.
filter
: string
A filter expression that filters resources listed in the response.
The expression must specify:
The field name. Currently you can only use filtering with the Cluster.name field.
An
=
operator.The value in double quotes (
"
). Must be 1-63 characters long and match the regular expression[a-zA-Z0-9_-]+
.
ListClustersResponse
clusters
: Cluster
List of OpenSearch clusters.
nextPageToken
: string
This token allows you to get the next page of results for list requests.
If the number of results is larger than ListClustersRequest.page_size, use the next_page_token as the value for the ListClustersRequest.page_token parameter in the next list request.
Each subsequent list request has its own next_page_token to continue paging through the results.
Cluster
An OpenSearch cluster resource.
Environment
ENVIRONMENT_UNSPECIFIED
PRODUCTION
Stable environment with a conservative update policy: only hotfixes are applied during regular maintenance.
PRESTABLE
Environment with more aggressive update policy: new versions are rolled out irrespective of backward compatibility.
Health
HEALTH_UNKNOWN
Health of the cluster is unknown ([Host.health][11] for every host in the cluster is UNKNOWN).
ALIVE
Cluster is working normally ([Host.health][12] for every host in the cluster is ALIVE).
DEAD
Cluster is inoperable ([Host.health][13] for every host in the cluster is DEAD).
DEGRADED
Cluster is working below capacity ([Host.health][14] for at least one host in the cluster is not ALIVE).
Status
Current state of the cluster.
STATUS_UNKNOWN
Cluster state is unknown.
CREATING
Cluster is being created.
RUNNING
Cluster is running normally.
ERROR
Cluster has encountered a problem and cannot operate.
UPDATING
Cluster is being updated.
STOPPING
Cluster is stopping.
STOPPED
Cluster has stopped.
STARTING
Cluster is starting.
id
: string
ID of the OpenSearch cluster. This ID is assigned by the platform at the moment of cluster creation.
folderId
: string
ID of the folder that the OpenSearch cluster belongs to.
createdAt
: google.protobuf.Timestamp
Time when the cluster was created.
name
: string
Name of the OpenSearch cluster. The name is unique within the folder. 1-63 characters long.
description
: string
Description of the OpenSearch cluster. 0-256 characters long.
labels
: string
Custom labels for the OpenSearch cluster as key:value
pairs.
Maximum 64 labels per resource.
environment
: Environment
Deployment environment of the OpenSearch cluster.
monitoring
: Monitoring
Description of monitoring systems relevant to the OpenSearch cluster.
config
: ClusterConfig
Configuration of the OpenSearch cluster.
networkId
: string
ID of the cloud network that the cluster belongs to.
health
: Health
Aggregated cluster health.
status
: Status
Current state of the cluster.
securityGroupIds
: string
User security groups.
serviceAccountId
: string
ID of the service account used to access Object Storage.
deletionProtection
: bool
Determines whether the cluster is protected from being deleted.
maintenanceWindow
: MaintenanceWindow
Cluster maintenance window. Should be defined by either one of the two options.
plannedOperation
: MaintenanceOperation
Maintenance operation planned at nearest maintenance_window.
Monitoring
Monitoring system metadata.
name
: string
Name of the monitoring system.
description
: string
Description of the monitoring system.
link
: string
Link to the monitoring system charts for the OpenSearch cluster.
ClusterConfig
The OpenSearch cluster configuration.
version
: string
Version of the OpenSearch server software.
opensearch
: OpenSearch
OpenSearch configuration.
dashboards
: Dashboards
Dashboards configuration.
access
: Access
Access policy for external services.
MaintenanceWindow
An OpenSearch cluster maintenance window. Should be defined by either one of the two options.
One of policy
anytime
: AnytimeMaintenanceWindowAn any-time maintenance window.
weeklyMaintenanceWindow
: WeeklyMaintenanceWindowA weekly maintenance window.
MaintenanceOperation
info
: string
The description of the operation.
delayedUntil
: google.protobuf.Timestamp
Delay time for the maintenance operation.
latestMaintenanceTime
: google.protobuf.Timestamp
Time of the last maintenance window.
nextMaintenanceWindowTime
: google.protobuf.Timestamp
Time of the next maintenance window.
OpenSearch
The OpenSearch host group type configuration.
GroupRole
GROUP_ROLE_UNSPECIFIED
DATA
MANAGER
NodeGroup
Configuration of the host group.
name
: string
Name of the group. Must be 1-63 characters long.
resources
: Resources
Resources allocated to the hosts.
hostsCount
: int64
Number of hosts in the group.
zoneIds
: string
IDs of the availability zones the hosts belong to.
subnetIds
: string
IDs of the subnets that the hosts belong to.
assignPublicIp
: bool
Determines whether a public IP is assigned to the hosts in the group.
roles
: GroupRole
Roles of the host group.
diskSizeAutoscaling
: DiskSizeAutoscaling
Disk size autoscaling settings
plugins
: string
Names of the cluster plugins.
nodeGroups
: NodeGroup
Host groups of the OpenSearch type.
One of config
opensearchConfigSet_2
: config.OpenSearchConfigSet2
keystoreSettings
: string
Keystore entries names.
Dashboards
The Dashboards host group type configuration.
NodeGroup
name
: string
Name of the group. 1-63 characters long.
resources
: Resources
Resources allocated to the hosts.
hostsCount
: int64
Number of hosts in the group.
zoneIds
: string
IDs of the availability zones the hosts belong to.
subnetIds
: string
IDs of the subnets that the hosts belong to.
assignPublicIp
: bool
Determines whether a public IP is assigned to the hosts in the group.
diskSizeAutoscaling
: DiskSizeAutoscaling
Disk size autoscaling settings
nodeGroups
: NodeGroup
Host groups of the Dashboards type.
Access
Access policy for external services.
dataTransfer
: bool
Determines whether the access to Data Transfer is allowed.
serverless
: bool
Determines whether the access to Serverless is allowed.
AnytimeMaintenanceWindow
An any-time maintenance window.
WeeklyMaintenanceWindow
A weekly maintenance window.
WeekDay
WEEK_DAY_UNSPECIFIED
MON
Monday
TUE
Tuesday
WED
Wednesday
THU
Thursday
FRI
Friday
SAT
Saturday
SUN
Sunday
day
: WeekDay
Day of the week.
hour
: int64
Hour of the day in the UTC timezone.
Resources
A list of computational resources allocated to a host.
resourcePresetId
: string
ID of the preset for computational resources allocated to a host.
diskSize
: int64
Volume of the storage used by the host, in bytes.
diskTypeId
: string
Type of the storage used by the host: network-hdd
, network-ssd
or local-ssd
.
DiskSizeAutoscaling
plannedUsageThreshold
: int64
Amount of used storage for automatic disk scaling in the maintenance window, 0 means disabled, in percent.
emergencyUsageThreshold
: int64
Amount of used storage for immediately automatic disk scaling, 0 means disabled, in percent.
diskSizeLimit
: int64
Limit on how large the storage for database instances can automatically grow, in bytes.
NodeGroup
Configuration of the host group.
name
: string
Name of the group. Must be 1-63 characters long.
resources
: Resources
Resources allocated to the hosts.
hostsCount
: int64
Number of hosts in the group.
zoneIds
: string
IDs of the availability zones the hosts belong to.
subnetIds
: string
IDs of the subnets that the hosts belong to.
assignPublicIp
: bool
Determines whether a public IP is assigned to the hosts in the group.
roles
: GroupRole
Roles of the host group.
diskSizeAutoscaling
: DiskSizeAutoscaling
Disk size autoscaling settings
OpenSearchConfigSet2
effectiveConfig
: OpenSearchConfig2
userConfig
: OpenSearchConfig2
defaultConfig
: OpenSearchConfig2
OpenSearchConfig2
maxClauseCount
: google.protobuf.Int64Value
the maximum number of allowed boolean clauses in a query
fielddataCacheSize
: string
the percentage or absolute value (10%, 512mb) of heap space that is allocated to fielddata