🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-elasticsearch-service

Package Overview
Dependencies
Maintainers
2
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-elasticsearch-service

AWS SDK for JavaScript Elasticsearch Service Client for Node.js, Browser and React Native

3.806.0
latest
Source
npm
Version published
Weekly downloads
171K
6.06%
Maintainers
2
Weekly downloads
 
Created

What is @aws-sdk/client-elasticsearch-service?

The @aws-sdk/client-elasticsearch-service package is part of the AWS SDK for JavaScript. It allows developers to interact with the Amazon Elasticsearch Service, enabling them to create, configure, and manage Elasticsearch domains, as well as perform various operations related to Elasticsearch clusters.

What are @aws-sdk/client-elasticsearch-service's main functionalities?

Create Elasticsearch Domain

This feature allows you to create a new Elasticsearch domain with specified configurations such as domain name, Elasticsearch version, and cluster configuration.

const { ElasticsearchServiceClient, CreateElasticsearchDomainCommand } = require('@aws-sdk/client-elasticsearch-service');

const client = new ElasticsearchServiceClient({ region: 'us-west-2' });

const params = {
  DomainName: 'my-domain',
  ElasticsearchVersion: '7.10',
  ElasticsearchClusterConfig: {
    InstanceType: 'm5.large.elasticsearch',
    InstanceCount: 2
  }
};

const run = async () => {
  try {
    const data = await client.send(new CreateElasticsearchDomainCommand(params));
    console.log('Domain created:', data);
  } catch (err) {
    console.error('Error creating domain:', err);
  }
};

run();

List Elasticsearch Domains

This feature allows you to list all the Elasticsearch domains in your account.

const { ElasticsearchServiceClient, ListDomainNamesCommand } = require('@aws-sdk/client-elasticsearch-service');

const client = new ElasticsearchServiceClient({ region: 'us-west-2' });

const run = async () => {
  try {
    const data = await client.send(new ListDomainNamesCommand({}));
    console.log('Domains:', data.DomainNames);
  } catch (err) {
    console.error('Error listing domains:', err);
  }
};

run();

Delete Elasticsearch Domain

This feature allows you to delete an existing Elasticsearch domain by specifying its domain name.

const { ElasticsearchServiceClient, DeleteElasticsearchDomainCommand } = require('@aws-sdk/client-elasticsearch-service');

const client = new ElasticsearchServiceClient({ region: 'us-west-2' });

const params = {
  DomainName: 'my-domain'
};

const run = async () => {
  try {
    const data = await client.send(new DeleteElasticsearchDomainCommand(params));
    console.log('Domain deleted:', data);
  } catch (err) {
    console.error('Error deleting domain:', err);
  }
};

run();

Other packages similar to @aws-sdk/client-elasticsearch-service

FAQs

Package last updated on 08 May 2025

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