domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | aws.opensearch.domains |
Fields
The following fields are returned by SELECT queries:
- describe_domain
- describe_domains
| Name | Datatype | Description |
|---|---|---|
aiml_options | object | Container for parameters required to enable all machine learning features. |
arn | string | The 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_policies | string | Access 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_options | object | Key-value pairs that specify advanced configuration options. |
advanced_security_options | object | Settings for fine-grained access control. |
auto_tune_options | object | Auto-Tune settings for the domain. |
automated_snapshot_pause_options | object | The current status of the domain's automated snapshot pause options. |
change_progress_details | object | Information about a configuration change happening on the domain. |
cluster_config | object | Container for the cluster configuration of an OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains. |
cognito_options | object | Container for the parameters required to enable Cognito authentication for an OpenSearch Service domain. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards. |
created | boolean | Creation status of an OpenSearch Service domain. True if domain creation is complete. False if domain creation is still in progress. |
deleted | boolean | Deletion 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_options | object | Specifies the deployment strategy options for the domain. |
domain_endpoint_options | object | Options to configure a custom endpoint for an OpenSearch Service domain. |
domain_endpoint_v2_hosted_zone_id | string | The dual stack hosted zone ID for the domain. |
domain_id | string | Unique identifier for the domain. |
domain_name | string | The 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_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 | Container for the parameters required to enable EBS-based storage for an OpenSearch Service domain. |
encryption_at_rest_options | object | Specifies 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. |
endpoint | string | Domain-specific endpoint used to submit index, search, and data upload requests to the domain. |
endpoint_v2 | string | If 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. |
endpoints | object | The 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_mode | string | The 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_version | string | Version 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_type | string | The type of IP addresses supported by the endpoint for the domain. (ipv4, dualstack) |
identity_center_options | object | Configuration options for controlling IAM Identity Center integration within a domain. |
log_publishing_options | object | Log publishing options for the domain. |
modifying_properties | array | Information about the domain properties that are currently being modified. |
node_to_node_encryption_options | object | Enables or disables node-to-node encryption. For more information, see Node-to-node encryption for Amazon OpenSearch Service. |
off_peak_window_options | object | Options for a domain's off-peak window, during which OpenSearch Service can perform mandatory configuration changes on the domain. |
processing | boolean | The status of the domain configuration. True if OpenSearch Service is processing configuration changes. False if the configuration is active. |
service_software_options | object | The current status of the domain's service software. |
snapshot_options | object | The time, in UTC format, when OpenSearch Service takes a daily automated snapshot of the specified domain. Default is 0 hours. |
software_update_options | object | Options for configuring service software updates for a domain. |
upgrade_processing | boolean | The 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_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 VPC configuration for the domain. |
| Name | Datatype | Description |
|---|---|---|
domain_status_list | array | The status of the requested domains. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_domain | select | domain_name, region | Describes the domain configuration for the specified Amazon OpenSearch Service domain, including the domain ID, domain service endpoint, and domain ARN. | |
describe_domains | select | region | Returns domain configuration information about the specified Amazon OpenSearch Service domains. | |
create_domain | insert | region, DomainName | Creates an Amazon OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains. | |
delete_domain | delete | domain_name, region | Deletes an Amazon OpenSearch Service domain and all of its data. You can't recover a domain after you delete it. | |
cancel_service_software_update | exec | region, DomainName | 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. | |
start_domain_maintenance | exec | domain_name, region, Action | Starts 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_update | exec | region, DomainName | Rolls 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_update | exec | region, DomainName | Schedules a service software update for an Amazon OpenSearch Service domain. For more information, see Service software updates in Amazon OpenSearch Service. | |
upgrade_domain | exec | region, DomainName, TargetVersion | Allows 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.
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The name of the domain. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_domain
- describe_domains
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
;
Returns domain configuration information about the specified Amazon OpenSearch Service domains.
SELECT
domain_status_list
FROM aws.opensearch.domains
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_domain
- Manifest
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
;
# Description fields are for documentation purposes
- name: domains
props:
- name: region
value: "{{ region }}"
description: Required parameter for the domains resource.
- name: DomainName
value: "{{ DomainName }}"
description: |
The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.
- name: EngineVersion
value: "{{ EngineVersion }}"
- name: ClusterConfig
description: |
Container for the cluster configuration of an OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains.
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 }}
MultiAZWithStandbyEnabled: {{ MultiAZWithStandbyEnabled }}
NodeOptions:
- NodeType: "{{ NodeType }}"
NodeConfig:
Enabled: {{ Enabled }}
Type: "{{ Type }}"
Count: {{ Count }}
- name: EBSOptions
description: |
Container for the parameters required to enable EBS-based storage for an OpenSearch Service domain.
value:
EBSEnabled: {{ EBSEnabled }}
VolumeType: "{{ VolumeType }}"
VolumeSize: {{ VolumeSize }}
Iops: {{ Iops }}
Throughput: {{ Throughput }}
- name: AccessPolicies
value: "{{ AccessPolicies }}"
description: |
Access 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.
- name: IPAddressType
value: "{{ IPAddressType }}"
valid_values: ['ipv4', 'dualstack']
- name: SnapshotOptions
description: |
The time, in UTC format, when OpenSearch Service takes a daily automated snapshot of the specified domain. Default is 0 hours.
value:
AutomatedSnapshotStartHour: {{ AutomatedSnapshotStartHour }}
- name: VPCOptions
description: |
Options to specify the subnets and security groups for an Amazon OpenSearch Service VPC endpoint. For more information, see Launching your Amazon OpenSearch Service domains using a VPC.
value:
SubnetIds:
- "{{ SubnetIds }}"
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
EgressEnabled: {{ EgressEnabled }}
- name: CognitoOptions
description: |
Container for the parameters required to enable Cognito authentication for an OpenSearch Service domain. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.
value:
Enabled: {{ Enabled }}
UserPoolId: "{{ UserPoolId }}"
IdentityPoolId: "{{ IdentityPoolId }}"
RoleArn: "{{ RoleArn }}"
- name: EncryptionAtRestOptions
description: |
Specifies 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.
value:
Enabled: {{ Enabled }}
KmsKeyId: "{{ KmsKeyId }}"
- name: NodeToNodeEncryptionOptions
description: |
Enables or disables node-to-node encryption. For more information, see Node-to-node encryption for Amazon OpenSearch Service.
value:
Enabled: {{ Enabled }}
- name: AdvancedOptions
value: "{{ AdvancedOptions }}"
description: |
Exposes native OpenSearch configuration values from opensearch.yml. The following advanced options are available: Allows references to indexes in an HTTP request body. Must be false when configuring access to individual sub-resources. Default is true. Specifies the percentage of heap space allocated to field data. Default is unbounded. For more information, see Advanced cluster parameters.
- name: LogPublishingOptions
value: "{{ LogPublishingOptions }}"
- name: DomainEndpointOptions
description: |
Options to configure a custom endpoint for an OpenSearch Service domain.
value:
EnforceHTTPS: {{ EnforceHTTPS }}
TLSSecurityPolicy: "{{ TLSSecurityPolicy }}"
CustomEndpointEnabled: {{ CustomEndpointEnabled }}
CustomEndpoint: "{{ CustomEndpoint }}"
CustomEndpointCertificateArn: "{{ CustomEndpointCertificateArn }}"
- name: AdvancedSecurityOptions
description: |
Options for enabling and configuring fine-grained access control. For more information, see Fine-grained access control in Amazon OpenSearch Service.
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 }}
JWTOptions:
Enabled: {{ Enabled }}
SubjectKey: "{{ SubjectKey }}"
RolesKey: "{{ RolesKey }}"
JwksUrl: "{{ JwksUrl }}"
PublicKey: "{{ PublicKey }}"
IAMFederationOptions:
Enabled: {{ Enabled }}
SubjectKey: "{{ SubjectKey }}"
RolesKey: "{{ RolesKey }}"
AnonymousAuthEnabled: {{ AnonymousAuthEnabled }}
- name: IdentityCenterOptions
description: |
Configuration settings for enabling and managing IAM Identity Center.
value:
EnabledAPIAccess: {{ EnabledAPIAccess }}
IdentityCenterInstanceARN: "{{ IdentityCenterInstanceARN }}"
IdentityCenterInstanceRegion: "{{ IdentityCenterInstanceRegion }}"
SubjectKey: "{{ SubjectKey }}"
RolesKey: "{{ RolesKey }}"
- name: TagList
description: |
A list of tags attached to a domain.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: AutoTuneOptions
description: |
Options for configuring Auto-Tune. For more information, see Auto-Tune for Amazon OpenSearch Service
value:
DesiredState: "{{ DesiredState }}"
MaintenanceSchedules:
- StartAt: "{{ StartAt }}"
Duration:
Value: {{ Value }}
Unit: "{{ Unit }}"
CronExpressionForRecurrence: "{{ CronExpressionForRecurrence }}"
UseOffPeakWindow: {{ UseOffPeakWindow }}
- name: OffPeakWindowOptions
description: |
Options for a domain's off-peak window, during which OpenSearch Service can perform mandatory configuration changes on the domain.
value:
Enabled: {{ Enabled }}
OffPeakWindow:
WindowStartTime:
Hours: {{ Hours }}
Minutes: {{ Minutes }}
- name: SoftwareUpdateOptions
description: |
Options for configuring service software updates for a domain.
value:
AutoSoftwareUpdateEnabled: {{ AutoSoftwareUpdateEnabled }}
UseLatestServiceSoftwareForBlueGreen: {{ UseLatestServiceSoftwareForBlueGreen }}
- name: AIMLOptions
description: |
Container for parameters required to enable all machine learning features.
value:
NaturalLanguageQueryGenerationOptions:
DesiredState: "{{ DesiredState }}"
S3VectorsEngine:
Enabled: {{ Enabled }}
ServerlessVectorAcceleration:
Enabled: {{ Enabled }}
- 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 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.
valid_values: ['GENERAL', 'OPTIMIZED']
DELETE examples
- delete_domain
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
- cancel_service_software_update
- start_domain_maintenance
- rollback_service_software_update
- start_service_software_update
- upgrade_domain
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 }}"
}'
;
Starts 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.
EXEC aws.opensearch.domains.start_domain_maintenance
@domain_name='{{ domain_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Action": "{{ Action }}",
"NodeId": "{{ NodeId }}"
}'
;
Rolls back a service software update for a domain to the previous version. For more information, see Service software updates in Amazon OpenSearch Service.
EXEC aws.opensearch.domains.rollback_service_software_update
@region='{{ region }}' --required
@@json=
'{
"DomainName": "{{ DomainName }}"
}'
;
Schedules a service software update for an Amazon OpenSearch Service domain. For more information, see Service software updates in Amazon OpenSearch Service.
EXEC aws.opensearch.domains.start_service_software_update
@region='{{ region }}' --required
@@json=
'{
"DomainName": "{{ DomainName }}",
"ScheduleAt": "{{ ScheduleAt }}",
"DesiredStartTime": {{ DesiredStartTime }}
}'
;
Allows you to either upgrade your Amazon OpenSearch Service domain or perform an upgrade eligibility check to a compatible version of OpenSearch or Elasticsearch.
EXEC aws.opensearch.domains.upgrade_domain
@region='{{ region }}' --required
@@json=
'{
"DomainName": "{{ DomainName }}",
"TargetVersion": "{{ TargetVersion }}",
"PerformCheckOnly": {{ PerformCheckOnly }},
"AdvancedOptions": "{{ AdvancedOptions }}"
}'
;