elasticsearch_domains
Creates, updates, deletes, gets or lists an elasticsearch_domains resource.
Overview
| Name | elasticsearch_domains |
| Type | Resource |
| Id | aws.es.elasticsearch_domains |
Fields
The following fields are returned by SELECT queries:
- describe_elasticsearch_domain
- describe_elasticsearch_domains
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the Elasticsearch domain. See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information. |
access_policies | string | Access 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_options | object | Specifies the status of the AdvancedOptions |
advanced_security_options | object | The current status of the Elasticsearch domain's advanced security options. |
auto_tune_options | object | The current status of the Elasticsearch domain's Auto-Tune options. |
automated_snapshot_pause_options | object | The current status of the Elasticsearch domain's automated snapshot pause options. |
change_progress_details | object | Specifies change details of the domain configuration change. |
cognito_options | object | Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see Amazon Cognito Authentication for Kibana. |
created | boolean | The domain creation status. True if the creation of an Elasticsearch domain is complete. False if domain creation is still in progress. |
deleted | boolean | The 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_options | object | Specifies the deployment strategy options for the domain. |
domain_endpoint_options | object | Options to configure endpoint for the Elasticsearch domain. |
domain_id | string | The unique identifier for the specified Elasticsearch domain. |
domain_name | string | The 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_status | string | The status of any changes that are currently in progress for the domain. (Creating, Active, Modifying, UpgradingEngineVersion, UpdatingServiceSoftware, Isolated, Deleting) |
ebs_options | object | Options to enable, disable, and specify the properties of EBS storage volumes. For more information, see Configuring EBS-based Storage. |
elasticsearch_cluster_config | object | Specifies the configuration for the domain cluster, such as the type and number of instances. |
elasticsearch_version | string | (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_options | object | Specifies the Encryption At Rest Options. |
endpoint | string | The Elasticsearch domain endpoint that you use to submit index and search requests. |
endpoints | object | Map 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_mode | string | The 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_options | object | Log publishing options for the given domain. |
modifying_properties | array | Information about the domain properties that are currently being modified. |
node_to_node_encryption_options | object | Specifies the node-to-node encryption options. |
processing | boolean | The status of the Elasticsearch domain configuration. True if Amazon Elasticsearch Service is processing configuration changes. False if the configuration is active. |
service_software_options | object | The current status of the Elasticsearch domain's service software. |
snapshot_options | object | Specifies the time, in UTC format, when the service takes a daily automated snapshot of the specified Elasticsearch domain. Default value is 0 hours. |
upgrade_processing | boolean | The status of an Elasticsearch domain version upgrade. True if Amazon Elasticsearch Service is undergoing a version upgrade. False if the configuration is active. |
use_case | string | The 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_options | object | The VPCOptions for the specified domain. For more information, see VPC Endpoints for Amazon Elasticsearch Service Domains. |
| Name | Datatype | Description |
|---|---|---|
domain_status_list | array | The status of the domains requested in the DescribeElasticsearchDomains request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_elasticsearch_domain | select | domain_name, region | Returns domain configuration information about the specified Elasticsearch domain, including the domain ID, domain endpoint, and domain ARN. | |
describe_elasticsearch_domains | select | region | Returns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN. | |
create_elasticsearch_domain | insert | region, DomainName | Creates a new Elasticsearch domain. For more information, see Creating Elasticsearch Domains in the Amazon Elasticsearch Service Developer Guide. | |
delete_elasticsearch_domain | delete | domain_name, region | Permanently 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.
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The name of the Elasticsearch domain that you want to permanently delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_elasticsearch_domain
- describe_elasticsearch_domains
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
;
Returns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN.
SELECT
domain_status_list
FROM aws.es.elasticsearch_domains
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_elasticsearch_domain
- Manifest
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
;
# Description fields are for documentation purposes
- name: elasticsearch_domains
props:
- name: region
value: "{{ region }}"
description: Required parameter for the elasticsearch_domains resource.
- name: DomainName
value: "{{ DomainName }}"
description: |
The 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).
- name: ElasticsearchVersion
value: "{{ ElasticsearchVersion }}"
- name: ElasticsearchClusterConfig
description: |
Specifies the configuration for the domain cluster, such as the type and number of instances.
value:
InstanceType: "{{ InstanceType }}"
InstanceCount: {{ InstanceCount }}
DedicatedMasterEnabled: {{ DedicatedMasterEnabled }}
ZoneAwarenessEnabled: {{ ZoneAwarenessEnabled }}
ZoneAwarenessConfig:
AvailabilityZoneCount: {{ AvailabilityZoneCount }}
DedicatedMasterType: "{{ DedicatedMasterType }}"
DedicatedMasterCount: {{ DedicatedMasterCount }}
WarmEnabled: {{ WarmEnabled }}
WarmType: "{{ WarmType }}"
WarmCount: {{ WarmCount }}
ColdStorageOptions:
Enabled: {{ Enabled }}
- name: EBSOptions
description: |
Options to enable, disable, and specify the properties of EBS storage volumes. For more information, see Configuring EBS-based Storage.
value:
EBSEnabled: {{ EBSEnabled }}
VolumeType: "{{ VolumeType }}"
VolumeSize: {{ VolumeSize }}
Iops: {{ Iops }}
Throughput: {{ Throughput }}
- name: AccessPolicies
value: "{{ AccessPolicies }}"
description: |
Access 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.
- name: SnapshotOptions
description: |
Specifies the time, in UTC format, when the service takes a daily automated snapshot of the specified Elasticsearch domain. Default value is 0 hours.
value:
AutomatedSnapshotStartHour: {{ AutomatedSnapshotStartHour }}
- name: VPCOptions
description: |
Options to specify the subnets and security groups for VPC endpoint. For more information, see VPC Endpoints for Amazon Elasticsearch Service Domains.
value:
SubnetIds:
- "{{ SubnetIds }}"
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
- name: CognitoOptions
description: |
Options to specify the Cognito user and identity pools for Kibana authentication. For more information, see Amazon Cognito Authentication for Kibana.
value:
Enabled: {{ Enabled }}
UserPoolId: "{{ UserPoolId }}"
IdentityPoolId: "{{ IdentityPoolId }}"
RoleArn: "{{ RoleArn }}"
- name: EncryptionAtRestOptions
description: |
Specifies the Encryption At Rest Options.
value:
Enabled: {{ Enabled }}
KmsKeyId: "{{ KmsKeyId }}"
- name: NodeToNodeEncryptionOptions
description: |
Specifies the node-to-node encryption options.
value:
Enabled: {{ Enabled }}
- name: AdvancedOptions
value: "{{ AdvancedOptions }}"
description: |
Exposes select native Elasticsearch configuration values from elasticsearch.yml. Currently, the following advanced options are available: Option to allow references to indices in an HTTP request body. Must be false when configuring access to individual sub-resources. By default, the value is true. See Configuration Advanced Options for more information. Option to specify the percentage of heap space that is allocated to field data. By default, this setting is unbounded. For more information, see Configuring Advanced Options.
- name: LogPublishingOptions
value: "{{ LogPublishingOptions }}"
- name: DomainEndpointOptions
description: |
Options to configure endpoint for the Elasticsearch domain.
value:
EnforceHTTPS: {{ EnforceHTTPS }}
TLSSecurityPolicy: "{{ TLSSecurityPolicy }}"
CustomEndpointEnabled: {{ CustomEndpointEnabled }}
CustomEndpoint: "{{ CustomEndpoint }}"
CustomEndpointCertificateArn: "{{ CustomEndpointCertificateArn }}"
- name: AdvancedSecurityOptions
description: |
Specifies the advanced security configuration: whether advanced security is enabled, whether the internal database option is enabled, master username and password (if internal database is enabled), and master user ARN (if IAM is enabled).
value:
Enabled: {{ Enabled }}
InternalUserDatabaseEnabled: {{ InternalUserDatabaseEnabled }}
MasterUserOptions:
MasterUserARN: "{{ MasterUserARN }}"
MasterUserName: "{{ MasterUserName }}"
MasterUserPassword: "{{ MasterUserPassword }}"
SAMLOptions:
Enabled: {{ Enabled }}
Idp:
MetadataContent: "{{ MetadataContent }}"
EntityId: "{{ EntityId }}"
MasterUserName: "{{ MasterUserName }}"
MasterBackendRole: "{{ MasterBackendRole }}"
SubjectKey: "{{ SubjectKey }}"
RolesKey: "{{ RolesKey }}"
SessionTimeoutMinutes: {{ SessionTimeoutMinutes }}
AnonymousAuthEnabled: {{ AnonymousAuthEnabled }}
- name: AutoTuneOptions
description: |
Specifies the Auto-Tune options: the Auto-Tune desired state for the domain and list of maintenance schedules.
value:
DesiredState: "{{ DesiredState }}"
MaintenanceSchedules:
- StartAt: "{{ StartAt }}"
Duration:
Value: {{ Value }}
Unit: "{{ Unit }}"
CronExpressionForRecurrence: "{{ CronExpressionForRecurrence }}"
- name: TagList
description: |
A list of Tag
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: DeploymentStrategyOptions
description: |
Specifies the deployment strategy options for the domain.
value:
DeploymentStrategy: "{{ DeploymentStrategy }}"
- name: AutomatedSnapshotPauseOptions
description: |
Specifies the automated snapshot pause request options for the domain. Suspending snapshots reduces data protection. You cannot restore your domain to points in time when snapshots are suspended. Use this feature only for short-term operational needs such as migrations or maintenance windows. Maximum suspension duration: 3 days.
value:
Enabled: {{ Enabled }}
StartTime: "{{ StartTime }}"
EndTime: "{{ EndTime }}"
- name: UseCase
value: "{{ UseCase }}"
description: |
The 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.
valid_values: ['SEARCH', 'VECTOR', 'OBSERVABILITY', 'MIXED']
- name: EngineMode
value: "{{ EngineMode }}"
description: |
The 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.
valid_values: ['GENERAL', 'OPTIMIZED']
DELETE examples
- delete_elasticsearch_domain
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
;