Skip to main content

domains

Creates, updates, deletes, gets or lists a domains resource.

Overview

Namedomains
TypeResource
Idaws.opensearch.domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aiml_optionsobjectContainer for parameters required to enable all machine learning features.
arnstringThe Amazon Resource Name (ARN) of the domain. See Identifiers for IAM Entities in Using Amazon Web Services Identity and Access Management for more information. (pattern: <code>.*</code>)
access_policiesstringAccess policy rules for an Amazon OpenSearch Service domain endpoint. For more information, see Configuring access policies. The maximum size of a policy document is 100 KB. (pattern: <code>.*</code>)
advanced_optionsobjectKey-value pairs that specify advanced configuration options.
advanced_security_optionsobjectSettings for fine-grained access control.
auto_tune_optionsobjectAuto-Tune settings for the domain.
automated_snapshot_pause_optionsobjectThe current status of the domain's automated snapshot pause options.
change_progress_detailsobjectInformation about a configuration change happening on the domain.
cluster_configobjectContainer for the cluster configuration of an OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains.
cognito_optionsobjectContainer for the parameters required to enable Cognito authentication for an OpenSearch Service domain. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.
createdbooleanCreation status of an OpenSearch Service domain. True if domain creation is complete. False if domain creation is still in progress.
deletedbooleanDeletion status of an OpenSearch Service domain. True if domain deletion is complete. False if domain deletion is still in progress. Once 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 a custom endpoint for an OpenSearch Service domain.
domain_endpoint_v2_hosted_zone_idstringThe dual stack hosted zone ID for the domain.
domain_idstringUnique identifier for the domain.
domain_namestringThe name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region. (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_optionsobjectContainer for the parameters required to enable EBS-based storage for an OpenSearch Service domain.
encryption_at_rest_optionsobjectSpecifies whether the domain should encrypt data at rest, and if so, the Key Management Service (KMS) key to use. Can only be used when creating a new domain or enabling encryption at rest for the first time on an existing domain. You can't modify this parameter after it's already been specified.
endpointstringDomain-specific endpoint used to submit index, search, and data upload requests to the domain.
endpoint_v2stringIf IPAddressType to set to dualstack, a version 2 domain endpoint is provisioned. This endpoint functions like a normal endpoint, except that it works with both IPv4 and IPv6 IP addresses. Normal endpoints work only with IPv4 IP addresses.
endpointsobjectThe key-value pair that exists if the OpenSearch Service domain uses VPC endpoints. For example: IPv4 IP addresses - 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com' Dual stack IP addresses - 'vpcv2':'vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.aos.us-east-1.on.aws'
engine_modestringThe engine mode for the domain. Valid values are GENERAL (the standard OpenSearch engine) and OPTIMIZED. 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 is available only for the OBSERVABILITY use cases. The engine mode can't be changed after the domain is created. (GENERAL, OPTIMIZED)
engine_versionstringVersion of OpenSearch or Elasticsearch that the domain is running, in the format Elasticsearch_X.Y or OpenSearch_X.Y. (pattern: <code>^Elasticsearch_[0-9]{1}.[0-9]{1,2}$|^OpenSearch_[0-9]{1,2}.[0-9]{1,2}$</code>)
ip_address_typestringThe type of IP addresses supported by the endpoint for the domain. (ipv4, dualstack)
identity_center_optionsobjectConfiguration options for controlling IAM Identity Center integration within a domain.
log_publishing_optionsobjectLog publishing options for the domain.
modifying_propertiesarrayInformation about the domain properties that are currently being modified.
node_to_node_encryption_optionsobjectEnables or disables node-to-node encryption. For more information, see Node-to-node encryption for Amazon OpenSearch Service.
off_peak_window_optionsobjectOptions for a domain's off-peak window, during which OpenSearch Service can perform mandatory configuration changes on the domain.
processingbooleanThe status of the domain configuration. True if OpenSearch Service is processing configuration changes. False if the configuration is active.
service_software_optionsobjectThe current status of the domain's service software.
snapshot_optionsobjectThe time, in UTC format, when OpenSearch Service takes a daily automated snapshot of the specified domain. Default is 0 hours.
software_update_optionsobjectOptions for configuring service software updates for a domain.
upgrade_processingbooleanThe status of a domain version upgrade to a new version of OpenSearch or Elasticsearch. True if OpenSearch Service is in the process of 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 VPC configuration for the domain.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_domainselectdomain_name, regionDescribes the domain configuration for the specified Amazon OpenSearch Service domain, including the domain ID, domain service endpoint, and domain ARN.
describe_domainsselectregionReturns domain configuration information about the specified Amazon OpenSearch Service domains.
create_domaininsertregion, DomainNameCreates an Amazon OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains.
delete_domaindeletedomain_name, regionDeletes an Amazon OpenSearch Service domain and all of its data. You can't recover a domain after you delete it.
cancel_service_software_updateexecregion, DomainNameCancels a scheduled service software update for an Amazon OpenSearch Service domain. You can only perform this operation before the AutomatedUpdateDate and when the domain's UpdateStatus is PENDING_UPDATE. For more information, see Service software updates in Amazon OpenSearch Service.
start_domain_maintenanceexecdomain_name, region, ActionStarts the node maintenance process on the data node. These processes can include a node reboot, an Opensearch or Elasticsearch process restart, or a Dashboard or Kibana restart.
rollback_service_software_updateexecregion, DomainNameRolls back a service software update for a domain to the previous version. For more information, see Service software updates in Amazon OpenSearch Service.
start_service_software_updateexecregion, DomainNameSchedules a service software update for an Amazon OpenSearch Service domain. For more information, see Service software updates in Amazon OpenSearch Service.
upgrade_domainexecregion, DomainName, TargetVersionAllows you to either upgrade your Amazon OpenSearch Service domain or perform an upgrade eligibility check to a compatible version of OpenSearch or Elasticsearch.

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 domain.
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the domain configuration for the specified Amazon OpenSearch Service domain, including the domain ID, domain service endpoint, and domain ARN.

SELECT
aiml_options,
arn,
access_policies,
advanced_options,
advanced_security_options,
auto_tune_options,
automated_snapshot_pause_options,
change_progress_details,
cluster_config,
cognito_options,
created,
deleted,
deployment_strategy_options,
domain_endpoint_options,
domain_endpoint_v2_hosted_zone_id,
domain_id,
domain_name,
domain_processing_status,
ebs_options,
encryption_at_rest_options,
endpoint,
endpoint_v2,
endpoints,
engine_mode,
engine_version,
ip_address_type,
identity_center_options,
log_publishing_options,
modifying_properties,
node_to_node_encryption_options,
off_peak_window_options,
processing,
service_software_options,
snapshot_options,
software_update_options,
upgrade_processing,
use_case,
vpc_options
FROM aws.opensearch.domains
WHERE domain_name = '{{ domain_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains.

INSERT INTO aws.opensearch.domains (
DomainName,
EngineVersion,
ClusterConfig,
EBSOptions,
AccessPolicies,
IPAddressType,
SnapshotOptions,
VPCOptions,
CognitoOptions,
EncryptionAtRestOptions,
NodeToNodeEncryptionOptions,
AdvancedOptions,
LogPublishingOptions,
DomainEndpointOptions,
AdvancedSecurityOptions,
IdentityCenterOptions,
TagList,
AutoTuneOptions,
OffPeakWindowOptions,
SoftwareUpdateOptions,
AIMLOptions,
DeploymentStrategyOptions,
AutomatedSnapshotPauseOptions,
UseCase,
EngineMode,
region
)
SELECT
'{{ DomainName }}' /* required */,
'{{ EngineVersion }}',
'{{ ClusterConfig }}',
'{{ EBSOptions }}',
'{{ AccessPolicies }}',
'{{ IPAddressType }}',
'{{ SnapshotOptions }}',
'{{ VPCOptions }}',
'{{ CognitoOptions }}',
'{{ EncryptionAtRestOptions }}',
'{{ NodeToNodeEncryptionOptions }}',
'{{ AdvancedOptions }}',
'{{ LogPublishingOptions }}',
'{{ DomainEndpointOptions }}',
'{{ AdvancedSecurityOptions }}',
'{{ IdentityCenterOptions }}',
'{{ TagList }}',
'{{ AutoTuneOptions }}',
'{{ OffPeakWindowOptions }}',
'{{ SoftwareUpdateOptions }}',
'{{ AIMLOptions }}',
'{{ DeploymentStrategyOptions }}',
'{{ AutomatedSnapshotPauseOptions }}',
'{{ UseCase }}',
'{{ EngineMode }}',
'{{ region }}'
RETURNING
domain_status
;

DELETE examples

Deletes an Amazon OpenSearch Service domain and all of its data. You can't recover a domain after you delete it.

DELETE FROM aws.opensearch.domains
WHERE domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Cancels a scheduled service software update for an Amazon OpenSearch Service domain. You can only perform this operation before the AutomatedUpdateDate and when the domain's UpdateStatus is PENDING_UPDATE. For more information, see Service software updates in Amazon OpenSearch Service.

EXEC aws.opensearch.domains.cancel_service_software_update
@region='{{ region }}' --required
@@json=
'{
"DomainName": "{{ DomainName }}"
}'
;