Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class ListDomainNamesCommandProtected

Returns the names of all Amazon OpenSearch Service domains owned by the current user in the active Region.

Example

Use a bare-bones client and the command you need to make an API call.

import { OpenSearchClient, ListDomainNamesCommand } from "@aws-sdk/client-opensearch"; // ES Modules import
// const { OpenSearchClient, ListDomainNamesCommand } = require("@aws-sdk/client-opensearch"); // CommonJS import
const client = new OpenSearchClient(config);
const input = { // ListDomainNamesRequest
EngineType: "OpenSearch" || "Elasticsearch",
};
const command = new ListDomainNamesCommand(input);
const response = await client.send(command);
// { // ListDomainNamesResponse
// DomainNames: [ // DomainInfoList
// { // DomainInfo
// DomainName: "STRING_VALUE",
// EngineType: "OpenSearch" || "Elasticsearch",
// },
// ],
// };

Param

ListDomainNamesCommandInput

Returns

ListDomainNamesCommandOutput

See

Throws

BaseException (client fault)

An error occurred while processing the request.

Throws

ValidationException (client fault)

An exception for accessing or deleting a resource that doesn't exist.

Throws

OpenSearchServiceException

Base exception class for all service exceptions from OpenSearch service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods