66Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.
77
88## Requirements
9- - nodejs >= 12
9+ - nodejs >= 22.15
1010
1111## Installation
1212` npm install @yandex-cloud/nodejs-sdk `
@@ -22,18 +22,17 @@ running in Yandex.Cloud)
2222### OAuth Token
2323
2424``` typescript
25- import { Session , cloudApi , serviceClients } from ' @yandex-cloud/nodejs-sdk' ;
26-
27- const { resourcemanager : { cloud_service : { ListCloudsRequest } } } = cloudApi ;
25+ import { Session } from ' @yandex-cloud/nodejs-sdk' ;
26+ import { cloudService } from ' @yandex-cloud/nodejs-sdk/resourcemanager-v1' ;
2827
2928// Initialize SDK with your token
3029const session = new Session ({ oauthToken: ' YOUR_TOKEN' });
3130
3231// Create service client
33- const cloudService = session .client (serviceClients .CloudServiceClient );
32+ const cloudServiceClient = session .client (cloudService .CloudServiceClient );
3433
3534// Issue request (returns Promise)
36- const response = await cloudService .list (ListCloudsRequest .fromPartial ({
35+ const response = await cloudServiceClient .list (cloudService . ListCloudsRequest .fromPartial ({
3736 pageSize: 100 ,
3837}));
3938```
@@ -43,37 +42,35 @@ const response = await cloudService.list(ListCloudsRequest.fromPartial({
4342Don't forget to assign Service Account for your Instance or Function.
4443
4544``` typescript
46- import { Session , cloudApi , serviceClients } from ' @yandex-cloud/nodejs-sdk' ;
47-
48- const { resourcemanager : { cloud_service : { ListCloudsRequest } } } = cloudApi ;
45+ import { Session } from ' @yandex-cloud/nodejs-sdk' ;
46+ import { cloudService } from ' @yandex-cloud/nodejs-sdk/resourcemanager-v1' ;
4947
5048// Initialize SDK with your token
5149const session = new Session ();
5250
5351// Create service client
54- const cloudService = session .client (serviceClients .CloudServiceClient );
52+ const cloudServiceClient = session .client (cloudService .CloudServiceClient );
5553
5654// Issue request (returns Promise)
57- const response = await cloudService .list (ListCloudsRequest .fromPartial ({
55+ const response = await cloudServiceClient .list (cloudService . ListCloudsRequest .fromPartial ({
5856 pageSize: 100 ,
5957}));
6058```
6159
6260### IAM Token
6361
6462``` typescript
65- import { Session , cloudApi , serviceClients } from ' @yandex-cloud/nodejs-sdk' ;
66-
67- const { resourcemanager : { cloud_service : { ListCloudsRequest } } } = cloudApi ;
63+ import { Session } from ' @yandex-cloud/nodejs-sdk' ;
64+ import { cloudService } from ' @yandex-cloud/nodejs-sdk/resourcemanager-v1' ;
6865
6966// Initialize SDK with your token
7067const session = new Session ({ iamToken: ' YOUR_TOKEN' });
7168
7269// Create service client
73- const cloudService = session .client (serviceClients .CloudServiceClient );
70+ const cloudServiceClient = session .client (cloudService .CloudServiceClient );
7471
7572// Issue request (returns Promise)
76- const response = await cloudService .list (ListCloudsRequest .fromPartial ({
73+ const response = await cloudServiceClient .list (cloudService . ListCloudsRequest .fromPartial ({
7774 pageSize: 100 ,
7875}));
7976```
8784YC_OAUTH_TOKEN=... YC_FOLDER_ID=... npm run start path/to/example.ts
8885```
8986
90- ## Services
91-
92- * AI Translate;
93- * AI Vision.
94- * Application Load Balancer
95- * Billing
96- * Cloud CDN
97- * Certificate Manager
98- * Compute Cloud
99- * Container Registry
100- * Data Proc
101- * DataSphere
102- * Data Transfer
103- * DNS
104- * Identity and Access Management (IAM)
105- * IoT Core
106- * Managed Service for Kubernetes
107- * Key Management Service (KMS)
108- * Load Balancer
109- * Lockbox
110- * Logging
111- * Managed DataBase
112- * ClickHouse
113- * ElasticSearch
114- * Greenplum
115- * Kafka
116- * MongoDB
117- * MySQL
118- * PostgreSQL
119- * Redis
120- * MS SQL Server
121- * Organization Manager
122- * Resource Manager
123- * Serverless
124- * Functions
125- * API Gateway
126- * Containers
127- * Triggers
128- * MDB Proxy
129- * Virtual Private Cloud (VPC)
130- * Yandex Database (YDB)
131-
132- If you need generated client for other Yandex.Cloud services, just open an issue.
87+ P.S If you need generated client for other Yandex.Cloud services, just open an issue.
0 commit comments