Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yandex-cloud/nodejs-sdk

Package Overview
Dependencies
Maintainers
6
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yandex-cloud/nodejs-sdk

Yandex.Cloud NodeJS SDK

  • 2.7.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
812
decreased by-21.47%
Maintainers
6
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 18 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc