2.8.0 • Published 4 months ago

@yandex-cloud/nodejs-sdk v2.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Yandex.Cloud SDK (nodejs)

npm License

Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.

Requirements

  • nodejs >= 12

Installation

npm install @yandex-cloud/nodejs-sdk

Getting started

There are three options for authorization your requests:

OAuth Token

import { Session, cloudApi, serviceClients } from '@yandex-cloud/nodejs-sdk';

const { resourcemanager: { cloud_service: { ListCloudsRequest } } } = cloudApi;

// Initialize SDK with your token
const session = new Session({ oauthToken: 'YOUR_TOKEN' });

// Create service client
const cloudService = session.client(serviceClients.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudService.list(ListCloudsRequest.fromPartial({
    pageSize: 100,
}));

Metadata Service

Don't forget to assign Service Account for your Instance or Function.

import { Session, cloudApi, serviceClients } from '@yandex-cloud/nodejs-sdk';

const { resourcemanager: { cloud_service: { ListCloudsRequest } } } = cloudApi;

// Initialize SDK with your token
const session = new Session();

// Create service client
const cloudService = session.client(serviceClients.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudService.list(ListCloudsRequest.fromPartial({
    pageSize: 100,
}));

IAM Token

import { Session, cloudApi, serviceClients } from '@yandex-cloud/nodejs-sdk';

const { resourcemanager: { cloud_service: { ListCloudsRequest } } } = cloudApi;

// Initialize SDK with your token
const session = new Session({ iamToken: 'YOUR_TOKEN' });

// Create service client
const cloudService = session.client(serviceClients.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudService.list(ListCloudsRequest.fromPartial({
    pageSize: 100,
}));

Check examples directory for more examples.

To run example scripts, you should execute the following commands:

cd examples
npm i
YC_OAUTH_TOKEN=... YC_FOLDER_ID=... npm run start path/to/example.ts

Services

  • AI Translate;
  • AI Vision.
  • Application Load Balancer
  • Billing
  • Cloud CDN
  • Certificate Manager
  • Compute Cloud
  • Container Registry
  • Data Proc
  • DataSphere
  • Data Transfer
  • DNS
  • Identity and Access Management (IAM)
  • IoT Core
  • Managed Service for Kubernetes
  • Key Management Service (KMS)
  • Load Balancer
  • Lockbox
  • Logging
  • Managed DataBase
    • ClickHouse
    • ElasticSearch
    • Greenplum
    • Kafka
    • MongoDB
    • MySQL
    • PostgreSQL
    • Redis
    • MS SQL Server
  • Organization Manager
  • Resource Manager
  • Serverless
    • Functions
    • API Gateway
    • Containers
    • Triggers
    • MDB Proxy
  • Virtual Private Cloud (VPC)
  • Yandex Database (YDB)

If you need generated client for other Yandex.Cloud services, just open an issue.

3.0.0-alpha.14

4 months ago

2.8.0

4 months ago

3.0.0-alpha.13

4 months ago

3.0.0-alpha.9

5 months ago

3.0.0-alpha.10

5 months ago

3.0.0-alpha.12

4 months ago

3.0.0-alpha.11

4 months ago

3.0.0-alpha.8

5 months ago

3.0.0-alpha.7

5 months ago

3.0.0-alpha.6

7 months ago

3.0.0-alpha.5

7 months ago

3.0.0-alpha.4

7 months ago

3.0.0-alpha.3

7 months ago

3.0.0-alpha.2

8 months ago

2.7.7

1 year ago

2.7.6

1 year ago

2.7.5

1 year ago

2.7.4

1 year ago

2.7.3

1 year ago

2.7.2

1 year ago

2.7.1

1 year ago

2.7.0

1 year ago

2.6.2

1 year ago

2.6.1

1 year ago

2.5.0

2 years ago

2.5.2

2 years ago

2.6.0

2 years ago

2.5.1

2 years ago

2.4.5

2 years ago

2.4.7

2 years ago

2.4.6

2 years ago

2.4.9

2 years ago

2.4.8

2 years ago

2.4.4

2 years ago

2.4.3

2 years ago

3.0.0-alpha.1

2 years ago

2.4.2

2 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.3.0-beta.1

3 years ago

2.2.0

3 years ago

2.1.1

3 years ago

2.4.1

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.2.2

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.0.0-beta.3

3 years ago

2.0.0-beta.2

3 years ago

2.0.0-beta.1

3 years ago

2.0.0-alpha.7

3 years ago

2.0.0-alpha.6

3 years ago