Skip to main content

elasticsearch_domains

Creates, updates, deletes, gets or lists an elasticsearch_domains resource.

Overview

Nameelasticsearch_domains
TypeResource
Idaws.es.elasticsearch_domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the Elasticsearch domain. See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
access_policiesstringAccess policy rules for an Elasticsearch domain service endpoints. For more information, see Configuring Access Policies in the Amazon Elasticsearch Service Developer Guide. The maximum size of a policy document is 100 KB.
advanced_optionsobjectSpecifies the status of the AdvancedOptions
advanced_security_optionsobjectThe current status of the Elasticsearch domain's advanced security options.
auto_tune_optionsobjectThe current status of the Elasticsearch domain's Auto-Tune options.
automated_snapshot_pause_optionsobjectThe current status of the Elasticsearch domain's automated snapshot pause options.
change_progress_detailsobjectSpecifies change details of the domain configuration change.
cognito_optionsobjectOptions to specify the Cognito user and identity pools for Kibana authentication. For more information, see Amazon Cognito Authentication for Kibana.
createdbooleanThe domain creation status. True if the creation of an Elasticsearch domain is complete. False if domain creation is still in progress.
deletedbooleanThe domain deletion status. True if a delete request has been received for the domain but resource cleanup is still in progress. False if the domain has not been deleted. Once domain deletion is complete, the status of the domain is no longer returned.
deployment_strategy_optionsobjectSpecifies the deployment strategy options for the domain.
domain_endpoint_optionsobjectOptions to configure endpoint for the Elasticsearch domain.
domain_idstringThe unique identifier for the specified Elasticsearch domain.
domain_namestringThe name of an Elasticsearch domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). (pattern: <code>[a-z][a-z0-9-]+</code>)
domain_processing_statusstringThe status of any changes that are currently in progress for the domain. (Creating, Active, Modifying, UpgradingEngineVersion, UpdatingServiceSoftware, Isolated, Deleting)
ebs_optionsobjectOptions to enable, disable, and specify the properties of EBS storage volumes. For more information, see Configuring EBS-based Storage.
elasticsearch_cluster_configobjectSpecifies the configuration for the domain cluster, such as the type and number of instances.
elasticsearch_versionstring (pattern: <code>^[0-9]{1}.[0-9]{1,2}$|^OpenSearch_[0-9]{1,2}.[0-9]{1,2}$|^OS_[0-9]{1,2}.[0-9]{1,2}$</code>)
encryption_at_rest_optionsobjectSpecifies the Encryption At Rest Options.
endpointstringThe Elasticsearch domain endpoint that you use to submit index and search requests.
endpointsobjectMap containing the Elasticsearch domain endpoints used to submit index and search requests. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'.
engine_modestringThe engine mode for the domain. Valid values are GENERAL (the standard Elasticsearch/OpenSearch engine) and OPTIMIZED (the cost- and performance-optimized engine for observability and log-analytics workloads). If you don't specify an engine mode, GENERAL is used. OPTIMIZED requires OpenSearch 3.5 or later, OpenSearch Optimized instance types (OR1, OR2, OM2, or OI2) for the data tier, and encryption at rest, and is available only for the OBSERVABILITY and MIXED use cases. The engine mode can't be changed after the domain is created. (GENERAL, OPTIMIZED)
log_publishing_optionsobjectLog publishing options for the given domain.
modifying_propertiesarrayInformation about the domain properties that are currently being modified.
node_to_node_encryption_optionsobjectSpecifies the node-to-node encryption options.
processingbooleanThe status of the Elasticsearch domain configuration. True if Amazon Elasticsearch Service is processing configuration changes. False if the configuration is active.
service_software_optionsobjectThe current status of the Elasticsearch domain's service software.
snapshot_optionsobjectSpecifies the time, in UTC format, when the service takes a daily automated snapshot of the specified Elasticsearch domain. Default value is 0 hours.
upgrade_processingbooleanThe status of an Elasticsearch domain version upgrade. True if Amazon Elasticsearch Service is undergoing a version upgrade. False if the configuration is active.
use_casestringThe primary use case for the domain, which determines the default configuration and the engine modes that are available. Valid values are SEARCH (full-text search, e-commerce, content discovery, and hybrid and semantic search), VECTOR (k-NN and semantic search, and retrieval-augmented generation), OBSERVABILITY (logs, metrics, traces, and dashboards), and MIXED (a combination of search and analytics). If you don't specify a use case, MIXED is used. (SEARCH, VECTOR, OBSERVABILITY, MIXED)
vpc_optionsobjectThe VPCOptions for the specified domain. For more information, see VPC Endpoints for Amazon Elasticsearch Service Domains.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_elasticsearch_domainselectdomain_name, regionReturns domain configuration information about the specified Elasticsearch domain, including the domain ID, domain endpoint, and domain ARN.
describe_elasticsearch_domainsselectregionReturns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN.
create_elasticsearch_domaininsertregion, DomainNameCreates a new Elasticsearch domain. For more information, see Creating Elasticsearch Domains in the Amazon Elasticsearch Service Developer Guide.
delete_elasticsearch_domaindeletedomain_name, regionPermanently deletes the specified Elasticsearch domain and all of its data. Once a domain is deleted, it cannot be recovered.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_namestringThe name of the Elasticsearch domain that you want to permanently delete.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns domain configuration information about the specified Elasticsearch domain, including the domain ID, domain endpoint, and domain ARN.

SELECT
arn,
access_policies,
advanced_options,
advanced_security_options,
auto_tune_options,
automated_snapshot_pause_options,
change_progress_details,
cognito_options,
created,
deleted,
deployment_strategy_options,
domain_endpoint_options,
domain_id,
domain_name,
domain_processing_status,
ebs_options,
elasticsearch_cluster_config,
elasticsearch_version,
encryption_at_rest_options,
endpoint,
endpoints,
engine_mode,
log_publishing_options,
modifying_properties,
node_to_node_encryption_options,
processing,
service_software_options,
snapshot_options,
upgrade_processing,
use_case,
vpc_options
FROM aws.es.elasticsearch_domains
WHERE domain_name = '{{ domain_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new Elasticsearch domain. For more information, see Creating Elasticsearch Domains in the Amazon Elasticsearch Service Developer Guide.

INSERT INTO aws.es.elasticsearch_domains (
DomainName,
ElasticsearchVersion,
ElasticsearchClusterConfig,
EBSOptions,
AccessPolicies,
SnapshotOptions,
VPCOptions,
CognitoOptions,
EncryptionAtRestOptions,
NodeToNodeEncryptionOptions,
AdvancedOptions,
LogPublishingOptions,
DomainEndpointOptions,
AdvancedSecurityOptions,
AutoTuneOptions,
TagList,
DeploymentStrategyOptions,
AutomatedSnapshotPauseOptions,
UseCase,
EngineMode,
region
)
SELECT
'{{ DomainName }}' /* required */,
'{{ ElasticsearchVersion }}',
'{{ ElasticsearchClusterConfig }}',
'{{ EBSOptions }}',
'{{ AccessPolicies }}',
'{{ SnapshotOptions }}',
'{{ VPCOptions }}',
'{{ CognitoOptions }}',
'{{ EncryptionAtRestOptions }}',
'{{ NodeToNodeEncryptionOptions }}',
'{{ AdvancedOptions }}',
'{{ LogPublishingOptions }}',
'{{ DomainEndpointOptions }}',
'{{ AdvancedSecurityOptions }}',
'{{ AutoTuneOptions }}',
'{{ TagList }}',
'{{ DeploymentStrategyOptions }}',
'{{ AutomatedSnapshotPauseOptions }}',
'{{ UseCase }}',
'{{ EngineMode }}',
'{{ region }}'
RETURNING
domain_status
;

DELETE examples

Permanently deletes the specified Elasticsearch domain and all of its data. Once a domain is deleted, it cannot be recovered.

DELETE FROM aws.es.elasticsearch_domains
WHERE domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
;