Skip to main content

List

Retrieves the list of SQL Server clusters that belong to the specified folder.

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);
})();

ListClustersRequest

folderId : string

ID of the folder to list SQL Server 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:

  1. A field name to filter by. Currently you can only use filtering with the Cluster.name field.
  2. A conditional operator. Can be either = or != for single values, IN or NOT IN for lists of values.
  3. A value. Must be 1-63 characters long and match the regular expression [a-zA-Z0-9_-]+.

Example of a filter expression: name NOT IN 'test,beta'.

ListClustersResponse

clusters : Cluster

List of SQL Server clusters.

nextPageToken : string

Token that 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 SQL Server cluster.

For more information, see the Concepts section of the documentation.

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

    State of the cluster is unknown ([Host.health][9] of all hosts in the cluster is UNKNOWN).

  • ALIVE

    Cluster is alive and works well ([Host.health][10] of all hosts in the cluster is ALIVE).

  • DEAD

    Cluster is inoperable ([Host.health][11] of all hosts in the cluster is DEAD).

  • DEGRADED

    Cluster is in degraded state ([Host.health][12] of at least one of the hosts in the cluster is not ALIVE).

Status
  • STATUS_UNKNOWN

    Cluster state is unknown.

  • CREATING

    Cluster is being created.

  • RUNNING

    Cluster is running normally.

  • ERROR

    Cluster encountered a problem and cannot operate.

  • UPDATING

    Cluster is being updated.

  • STOPPING

    Cluster is stopping.

  • STOPPED

    Cluster stopped.

  • STARTING

    Cluster is starting.

id : string

ID of the SQL Server cluster.

This ID is assigned by Managed Service for SQL Server at the moment of creation.

folderId : string

ID of the folder the SQL Server cluster belongs to.

createdAt : google.protobuf.Timestamp

Time when SQL Server cluster was created.

name : string

Name of the SQL Server cluster.

The name must be unique within the folder, comply with RFC 1035 and be 1-63 characters long.

description : string

Description of the SQL Server cluster.

Must be 0-256 characters long.

labels : string

Custom labels for the SQL Server cluster as key:value pairs.

Maximum 64 per resource.

environment : Environment

Deployment environment of the SQL Server cluster.

monitoring : Monitoring

Description of monitoring systems relevant to the SQL Server cluster.

config : ClusterConfig

Configuration of the SQL Server cluster.

networkId : string

ID of the network that the cluster belongs to.

health : Health

Aggregated cluster health.

status : Status

Current state of the cluster.

securityGroupIds : string

User security groups.

deletionProtection : bool

Determines whether the cluster is protected from being deleted.

sqlcollation : string

SQL Server Collation.

hostGroupIds : string

Host groups hosting VMs of the cluster.

serviceAccountId : string

ID of the service account which is used for access to Object Storage.

Monitoring

name : string

Name of the monitoring system.

description : string

Description of the monitoring system.

Link to the monitoring system charts for the SQL Server cluster.

ClusterConfig

SecondaryConnections
  • SECONDARY_CONNECTIONS_UNSPECIFIED

  • SECONDARY_CONNECTIONS_OFF

    Connections to secondary replicas are prohibited

  • SECONDARY_CONNECTIONS_READ_ONLY

    Secondary replicas are read-only

version : string

Version of the SQL Server.

One of sqlserverConfig

Configuration of the SQL Server instances in the cluster.

  • sqlserverConfig_2016sp2std : config.SQLServerConfigSet2016sp2std

    Configuration of the SQL Server 2016sp2 standard edition instance.

  • sqlserverConfig_2016sp2ent : config.SQLServerConfigSet2016sp2ent

    Configuration of the SQL Server 2016sp2 enterprise edition instance.

  • sqlserverConfig_2017std : config.SQLServerConfigSet2017std

    Configuration of the SQL Server 2017 standard edition instance.

  • sqlserverConfig_2017ent : config.SQLServerConfigSet2017ent

    Configuration of the SQL Server 2017 enterprise edition instance.

  • sqlserverConfig_2019std : config.SQLServerConfigSet2019std

    Configuration of the SQL Server 2019 standard edition instance.

  • sqlserverConfig_2019ent : config.SQLServerConfigSet2019ent

    Configuration of the SQL Server 2019 enterprise edition instance.

resources : Resources

Resources allocated to SQL Server hosts.

backupWindowStart : google.type.TimeOfDay

Start time for the daily backup in UTC timezone.

access : Access

Database access policy.

secondaryConnections : SecondaryConnections

Secondary replicas connection mode

SQLServerConfigSet2016sp2std

effectiveConfig : SQLServerConfig2016sp2std

Effective settings for an SQL Server 2016 SP2 cluster (a combination of settings defined in user_config and default_config).

userConfig : SQLServerConfig2016sp2std

User-defined settings for an SQL Server 2016 SP2 cluster.

defaultConfig : SQLServerConfig2016sp2std

Default configuration for an SQL Server 2016 SP2 cluster.

SQLServerConfigSet2016sp2ent

effectiveConfig : SQLServerConfig2016sp2ent

Effective settings for an SQL Server 2016 SP2 cluster (a combination of settings defined in user_config and default_config).

userConfig : SQLServerConfig2016sp2ent

User-defined settings for an SQL Server 2016 SP2 cluster.

defaultConfig : SQLServerConfig2016sp2ent

Default configuration for an SQL Server 2016 SP2 cluster.

SQLServerConfigSet2017std

effectiveConfig : SQLServerConfig2017std

Effective settings for an SQL Server 2017 cluster (a combination of settings defined in user_config and default_config).

userConfig : SQLServerConfig2017std

User-defined settings for an SQL Server 2017 cluster.

defaultConfig : SQLServerConfig2017std

Default configuration for an SQL Server 2017 cluster.

SQLServerConfigSet2017ent

effectiveConfig : SQLServerConfig2017ent

Effective settings for an SQL Server 2017 cluster (a combination of settings defined in user_config and default_config).

userConfig : SQLServerConfig2017ent

User-defined settings for an SQL Server 2017 cluster.

defaultConfig : SQLServerConfig2017ent

Default configuration for an SQL Server 2017 cluster.

SQLServerConfigSet2019std

effectiveConfig : SQLServerConfig2019std

Effective settings for an SQL Server 2019 cluster (a combination of settings defined in user_config and default_config).

userConfig : SQLServerConfig2019std

User-defined settings for an SQL Server 2019 cluster.

defaultConfig : SQLServerConfig2019std

Default configuration for an SQL Server 2019 cluster.

SQLServerConfigSet2019ent

effectiveConfig : SQLServerConfig2019ent

Effective settings for an SQL Server 2019 cluster (a combination of settings defined in user_config and default_config).

userConfig : SQLServerConfig2019ent

User-defined settings for an SQL Server 2019 cluster.

defaultConfig : SQLServerConfig2019ent

Default configuration for an SQL Server 2019 cluster.

Resources

resourcePresetId : string

ID of the preset for computational resources available to a host (CPU, memory, etc.).

All available presets are listed in the documentation.

diskSize : int64

Volume of the storage available to a host.

diskTypeId : string

Type of the storage environment for the host.

Possible values:

  • network-hdd - network HDD drive;
  • network-ssd - network SSD drive;
  • local-ssd - local SSD storage.

Access

dataLens : bool

Allows access for DataLens.

webSql : bool

Allows access for Web SQL.

SQLServerConfig2016sp2std

SQL Server 2016 SP2 Standard edition supported configuration options are listed here.

Detailed description for each set of options is available in SQL Server documentation.

Any options that are not listed here are not supported.

maxDegreeOfParallelism : google.protobuf.Int64Value

Limits the number of processors to use in parallel plan execution per task.

See in-depth description in SQL Server documentation.

costThresholdForParallelism : google.protobuf.Int64Value

Specifies the threshold at which SQL Server creates and runs parallel plans for queries.

SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option.

See in-depth description in SQL Server documentation.

auditLevel : google.protobuf.Int64Value

Describes how to configure login auditing to monitor SQL Server Database Engine login activity.

Possible values:

  • 0 - do not log login attempts;
  • 1 - log only failed login attempts;
  • 2 - log only successful login attempts (not recommended);
  • 3 - log all login attempts (not recommended).

See in-depth description in SQL Server documentation.

fillFactorPercent : google.protobuf.Int64Value

Manages the fill factor server configuration option.

When an index is created or rebuilt, the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth.

Values 0 and 100 mean full page usage (no space reserved).

See in-depth description in SQL Server documentation.

optimizeForAdHocWorkloads : google.protobuf.BoolValue

Determines whether plans should be cached only after second execution.

Allows to avoid SQL cache bloat because of single-use plans.

See in-depth description in SQL Server documentation.

SQLServerConfig2016sp2ent

SQL Server 2016 SP2 Enterprise edition supported configuration options are listed here.

Detailed description for each set of options is available in SQL Server documentation.

Any options that are not listed here are not supported.

maxDegreeOfParallelism : google.protobuf.Int64Value

Limits the number of processors to use in parallel plan execution per task.

See in-depth description in SQL Server documentation.

costThresholdForParallelism : google.protobuf.Int64Value

Specifies the threshold at which SQL Server creates and runs parallel plans for queries.

SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option.

See in-depth description in SQL Server documentation.

auditLevel : google.protobuf.Int64Value

Describes how to configure login auditing to monitor SQL Server Database Engine login activity.

Possible values:

  • 0 - do not log login attempts;
  • 1 - log only failed login attempts;
  • 2 - log only successful login attempts (not recommended);
  • 3 - log all login attempts (not recommended).

See in-depth description in SQL Server documentation.

fillFactorPercent : google.protobuf.Int64Value

Manages the fill factor server configuration option. When an index is created or rebuilt, the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth.

Values 0 and 100 mean full page usage (no space reserved).

See in-depth description in SQL Server documentation.

optimizeForAdHocWorkloads : google.protobuf.BoolValue

Determines whether plans should be cached only after second execution.

Allows to avoid SQL cache bloat because of single-use plans.

See in-depth description in SQL Server documentation.

SQLServerConfig2017std

SQL Server 2017 Standard edition supported configuration options are listed here.

Detailed description for each set of options is available in SQL Server documentation.

Any options that are not listed here are not supported.

maxDegreeOfParallelism : google.protobuf.Int64Value

Limits the number of processors to use in parallel plan execution per task.

See in-depth description in SQL Server documentation.

costThresholdForParallelism : google.protobuf.Int64Value

Specifies the threshold at which SQL Server creates and runs parallel plans for queries.

SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option.

See in-depth description in SQL Server documentation.

auditLevel : google.protobuf.Int64Value

Describes how to configure login auditing to monitor SQL Server Database Engine login activity.

Possible values:

  • 0 - do not log login attempts;
  • 1 - log only failed login attempts;
  • 2 - log only successful login attempts (not recommended);
  • 3 - log all login attempts (not recommended).

See in-depth description in SQL Server documentation.

fillFactorPercent : google.protobuf.Int64Value

Manages the fill factor server configuration option.

When an index is created or rebuilt, the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth.

Values 0 and 100 mean full page usage (no space reserved).

See in-depth description in SQL Server documentation.

optimizeForAdHocWorkloads : google.protobuf.BoolValue

Determines whether plans should be cached only after second execution.

Allows to avoid SQL cache bloat because of single-use plans.

See in-depth description in SQL Server documentation.

SQLServerConfig2017ent

SQL Server 2017 Enterprise edition supported configuration options are listed here.

Detailed description for each set of options is available in SQL Server documentation.

Any options that are not listed here are not supported.

maxDegreeOfParallelism : google.protobuf.Int64Value

Limits the number of processors to use in parallel plan execution per task.

See in-depth description in SQL Server documentation.

costThresholdForParallelism : google.protobuf.Int64Value

Specifies the threshold at which SQL Server creates and runs parallel plans for queries.

SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option.

See in-depth description in SQL Server documentation.

auditLevel : google.protobuf.Int64Value

Describes how to configure login auditing to monitor SQL Server Database Engine login activity.

Possible values:

  • 0 - do not log login attempts;
  • 1 - log only failed login attempts;
  • 2 - log only successful login attempts (not recommended);
  • 3 - log all login attempts (not recommended).

See in-depth description in SQL Server documentation.

fillFactorPercent : google.protobuf.Int64Value

Manages the fill factor server configuration option. When an index is created or rebuilt, the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth.

Values 0 and 100 mean full page usage (no space reserved).

See in-depth description in SQL Server documentation.

optimizeForAdHocWorkloads : google.protobuf.BoolValue

Determines whether plans should be cached only after second execution.

Allows to avoid SQL cache bloat because of single-use plans.

See in-depth description in SQL Server documentation.

SQLServerConfig2019std

SQL Server 2019 Standard edition supported configuration options are listed here.

Detailed description for each set of options is available in SQL Server documentation.

Any options that are not listed here are not supported.

maxDegreeOfParallelism : google.protobuf.Int64Value

Limits the number of processors to use in parallel plan execution per task.

See in-depth description in SQL Server documentation.

costThresholdForParallelism : google.protobuf.Int64Value

Specifies the threshold at which SQL Server creates and runs parallel plans for queries.

SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option.

See in-depth description in SQL Server documentation.

auditLevel : google.protobuf.Int64Value

Describes how to configure login auditing to monitor SQL Server Database Engine login activity.

Possible values:

  • 0 - do not log login attempts;
  • 1 - log only failed login attempts;
  • 2 - log only successful login attempts (not recommended);
  • 3 - log all login attempts (not recommended).

See in-depth description in SQL Server documentation.

fillFactorPercent : google.protobuf.Int64Value

Manages the fill factor server configuration option.

When an index is created or rebuilt, the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth.

Values 0 and 100 mean full page usage (no space reserved).

See in-depth description in SQL Server documentation.

optimizeForAdHocWorkloads : google.protobuf.BoolValue

Determines whether plans should be cached only after second execution.

Allows to avoid SQL cache bloat because of single-use plans.

See in-depth description in SQL Server documentation.

SQLServerConfig2019ent

SQL Server 2019 Enterprise edition supported configuration options are listed here.

Detailed description for each set of options is available in SQL Server documentation.

Any options that are not listed here are not supported.

maxDegreeOfParallelism : google.protobuf.Int64Value

Limits the number of processors to use in parallel plan execution per task.

See in-depth description in SQL Server documentation.

costThresholdForParallelism : google.protobuf.Int64Value

Specifies the threshold at which SQL Server creates and runs parallel plans for queries.

SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option.

See in-depth description in SQL Server documentation.

auditLevel : google.protobuf.Int64Value

Describes how to configure login auditing to monitor SQL Server Database Engine login activity.

Possible values:

  • 0 - do not log login attempts;
  • 1 - log only failed login attempts;
  • 2 - log only successful login attempts (not recommended);
  • 3 - log all login attempts (not recommended).

See in-depth description in SQL Server documentation.

fillFactorPercent : google.protobuf.Int64Value

Manages the fill factor server configuration option. When an index is created or rebuilt, the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth.

Values 0 and 100 mean full page usage (no space reserved).

See in-depth description in SQL Server documentation.

optimizeForAdHocWorkloads : google.protobuf.BoolValue

Determines whether plans should be cached only after second execution.

Allows to avoid SQL cache bloat because of single-use plans.

See in-depth description in SQL Server documentation.