OpenSearchServerlessClient

Use the Amazon OpenSearch Serverless API to create, configure, and manage OpenSearch Serverless collections and security policies.

OpenSearch Serverless is an on-demand, pre-provisioned serverless configuration for Amazon OpenSearch Service. OpenSearch Serverless removes the operational complexities of provisioning, configuring, and tuning your OpenSearch clusters. It enables you to easily search and analyze petabytes of data without having to worry about the underlying infrastructure and data management.

To learn more about OpenSearch Serverless, see What is Amazon OpenSearch Serverless? 

Installation

NPM
npm install @aws-sdk/client-opensearchserverless
Yarn
yarn add @aws-sdk/client-opensearchserverless
pnpm
pnpm add @aws-sdk/client-opensearchserverless

OpenSearchServerlessClient Operations

Command
Summary
BatchGetCollectionCommand

Returns attributes for one or more collections, including the collection endpoint and the OpenSearch Dashboards endpoint. For more information, see Creating and managing Amazon OpenSearch Serverless collections .

BatchGetEffectiveLifecyclePolicyCommand

Returns a list of successful and failed retrievals for the OpenSearch Serverless indexes. For more information, see Viewing data lifecycle policies .

BatchGetLifecyclePolicyCommand

Returns one or more configured OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies .

BatchGetVpcEndpointCommand

Returns attributes for one or more VPC endpoints associated with the current account. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint .

CreateAccessPolicyCommand

Creates a data access policy for OpenSearch Serverless. Access policies limit access to collections and the resources within them, and allow a user to access that data irrespective of the access mechanism or network source. For more information, see Data access control for Amazon OpenSearch Serverless .

CreateCollectionCommand

Creates a new OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections .

CreateLifecyclePolicyCommand

Creates a lifecyle policy to be applied to OpenSearch Serverless indexes. Lifecycle policies define the number of days or hours to retain the data on an OpenSearch Serverless index. For more information, see Creating data lifecycle policies .

CreateSecurityConfigCommand

Specifies a security configuration for OpenSearch Serverless. For more information, see SAML authentication for Amazon OpenSearch Serverless .

CreateSecurityPolicyCommand

Creates a security policy to be used by one or more OpenSearch Serverless collections. Security policies provide access to a collection and its OpenSearch Dashboards endpoint from public networks or specific VPC endpoints. They also allow you to secure a collection with a KMS encryption key. For more information, see Network access for Amazon OpenSearch Serverless  and Encryption at rest for Amazon OpenSearch Serverless .

CreateVpcEndpointCommand

Creates an OpenSearch Serverless-managed interface VPC endpoint. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint .

DeleteAccessPolicyCommand

Deletes an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless .

DeleteCollectionCommand

Deletes an OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections .

DeleteLifecyclePolicyCommand

Deletes an OpenSearch Serverless lifecycle policy. For more information, see Deleting data lifecycle policies .

DeleteSecurityConfigCommand

Deletes a security configuration for OpenSearch Serverless. For more information, see SAML authentication for Amazon OpenSearch Serverless .

DeleteSecurityPolicyCommand

Deletes an OpenSearch Serverless security policy.

DeleteVpcEndpointCommand

Deletes an OpenSearch Serverless-managed interface endpoint. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint .

GetAccessPolicyCommand

Returns an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless .

GetAccountSettingsCommand

Returns account-level settings related to OpenSearch Serverless.

GetPoliciesStatsCommand

Returns statistical information about your OpenSearch Serverless access policies, security configurations, and security policies.

GetSecurityConfigCommand

Returns information about an OpenSearch Serverless security configuration. For more information, see SAML authentication for Amazon OpenSearch Serverless .

GetSecurityPolicyCommand

Returns information about a configured OpenSearch Serverless security policy. For more information, see Network access for Amazon OpenSearch Serverless  and Encryption at rest for Amazon OpenSearch Serverless .

ListAccessPoliciesCommand

Returns information about a list of OpenSearch Serverless access policies.

ListCollectionsCommand

Lists all OpenSearch Serverless collections. For more information, see Creating and managing Amazon OpenSearch Serverless collections .

Make sure to include an empty request body {} if you don't include any collection filters in the request.

ListLifecyclePoliciesCommand

Returns a list of OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies .

ListSecurityConfigsCommand

Returns information about configured OpenSearch Serverless security configurations. For more information, see SAML authentication for Amazon OpenSearch Serverless .

ListSecurityPoliciesCommand

Returns information about configured OpenSearch Serverless security policies.

ListTagsForResourceCommand

Returns the tags for an OpenSearch Serverless resource. For more information, see Tagging Amazon OpenSearch Serverless collections .

ListVpcEndpointsCommand

Returns the OpenSearch Serverless-managed interface VPC endpoints associated with the current account. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint .

TagResourceCommand

Associates tags with an OpenSearch Serverless resource. For more information, see Tagging Amazon OpenSearch Serverless collections .

UntagResourceCommand

Removes a tag or set of tags from an OpenSearch Serverless resource. For more information, see Tagging Amazon OpenSearch Serverless collections .

UpdateAccessPolicyCommand

Updates an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless .

UpdateAccountSettingsCommand

Update the OpenSearch Serverless settings for the current Amazon Web Services account. For more information, see Managing capacity limits for Amazon OpenSearch Serverless .

UpdateCollectionCommand

Updates an OpenSearch Serverless collection.

UpdateLifecyclePolicyCommand

Updates an OpenSearch Serverless access policy. For more information, see Updating data lifecycle policies .

UpdateSecurityConfigCommand

Updates a security configuration for OpenSearch Serverless. For more information, see SAML authentication for Amazon OpenSearch Serverless .

UpdateSecurityPolicyCommand

Updates an OpenSearch Serverless security policy. For more information, see Network access for Amazon OpenSearch Serverless  and Encryption at rest for Amazon OpenSearch Serverless .

UpdateVpcEndpointCommand

Updates an OpenSearch Serverless-managed interface endpoint. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint .

OpenSearchServerlessClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: OpenSearchServerlessClientConfig