

# Amazon OpenSearch Service system tables schema and example queries

## Table schemas
<a name="opensearch-system-tables-schemas"></a>

### domains
<a name="opensearch-system-tables-domains"></a>

Full name: `"s3tablescatalog/aws-catalog"."opensearch"."domains"`. Partitioned by `bucket(32, id)`.

The `domains` system table contains one row for each domain in your account and Region.

The following table describes the columns of the domains table.


| Column | Type | Required | Description | 
| --- | --- | --- | --- | 
| id | string | Yes | Unique identifier of the asset. | 
| ingestion\_time | timestamptz | Yes | Time this asset record was ingested into the system table, in UTC. | 
| update\_time | timestamptz | No | Time the asset was last updated in the AWS Glue Data Catalog, in UTC. | 
| schema\_version | string | Yes | Identifier of this system table's column layout. Changes when a column is added, removed, renamed, or retyped. | 
| created\_time | timestamptz | No | Time the resource was created, in UTC. | 
| name | string | No | The user-provided business name for the asset. | 
| description | string | No | The user-provided business description for the asset. | 
| resource\_name | string | Yes | The resource's technical name. | 
| resource\_description | string | No | The resource's technical description. | 
| application\_logs\_enabled\_enum | string | No | Whether the log type is published. Values: Enabled, Disabled. | 
| application\_logs\_log\_group\_arn | string | No | The ARN of the CloudWatch Logs log group that the logs are published to. | 
| audit\_logs\_enabled\_enum | string | No | Whether the log type is published. Values: Enabled, Disabled. | 
| audit\_logs\_log\_group\_arn | string | No | The ARN of the CloudWatch Logs log group that the logs are published to. | 
| auto\_software\_update\_enum | string | No | Whether automatic service software updates are enabled. Values: Enabled, Disabled. | 
| auto\_tune\_state\_enum | string | No | The current state of Auto-Tune on the domain. Values: Enabled, Disabled, EnableInProgress, DisableInProgress, DisabledAndRollbackScheduled, DisabledAndRollbackInProgress, DisabledAndRollbackComplete, DisabledAndRollbackError, Error. | 
| auto\_tune\_use\_off\_peak\_window\_enum | string | No | Whether Auto-Tune deploys changes during the off-peak window. Values: Enabled, Disabled. | 
| availability\_zone\_count | int | No | The number of Availability Zones the domain uses. 1 when zone awareness is disabled. | 
| cluster\_manager\_enabled\_enum | string | No | Whether dedicated cluster manager nodes are enabled. Values: Enabled, Disabled. | 
| cluster\_manager\_instance\_count | int | No | The number of dedicated cluster manager nodes. Present only when dedicated cluster manager nodes are enabled. | 
| cluster\_manager\_instance\_type | string | No | The instance type of the dedicated cluster manager nodes. Present only when dedicated cluster manager nodes are enabled. | 
| cognito\_authentication\_enum | string | No | Whether Amazon Cognito authentication for OpenSearch Dashboards is enabled. Values: Enabled, Disabled. | 
| cold\_storage\_enum | string | No | Whether cold storage is enabled. Values: Enabled, Disabled. | 
| coordinator\_node\_enabled\_enum | string | No | Whether coordinator nodes are enabled. Values: Enabled, Disabled. | 
| coordinator\_node\_instance\_count | int | No | The number of coordinator nodes. | 
| coordinator\_node\_instance\_type | string | No | The instance type of the coordinator nodes. | 
| custom\_endpoint | string | No | The fully qualified domain name of the custom endpoint. Present only when a custom endpoint is enabled. | 
| custom\_endpoint\_certificate\_arn | string | No | The ARN of the AWS Certificate Manager certificate for the custom endpoint. Present only when a custom endpoint is enabled. | 
| custom\_endpoint\_enabled\_enum | string | No | Whether a custom endpoint is enabled for the domain. Values: Enabled, Disabled. | 
| deployment\_strategy\_enum | string | No | The deployment strategy that the domain uses for configuration changes. Values: Default, CapacityOptimized. | 
| domain\_id | string | Yes | The unique identifier of the domain, in the form account-id/domain-name. | 
| ebs\_enabled\_enum | string | No | Whether EBS volumes are attached to the data nodes. Values: Enabled, Disabled. | 
| ebs\_iops | int | No | The baseline IOPS of each EBS volume. Present only for gp3 and io1 volumes. | 
| ebs\_throughput\_in\_mebibytes\_per\_second | int | No | The throughput of each EBS volume, in mebibytes per second. Present only for gp3 volumes. | 
| ebs\_volume\_size\_in\_gibibytes | int | No | The size of each EBS volume, in gibibytes. | 
| ebs\_volume\_type | string | No | The EBS volume type, for example gp3. | 
| encryption\_at\_rest\_enum | string | No | Whether encryption of data at rest is enabled. Values: Enabled, Disabled. | 
| endpoint | string | No | The public endpoint used to submit index, search, and data upload requests to the domain. Present only for domains with public network access. | 
| endpoint\_v2 | string | No | The dual-stack public endpoint of the domain. Present only for public domains with dual-stack IP addresses. | 
| enforce\_https\_enum | string | No | Whether the domain requires that all traffic arrives over HTTPS. Values: Enabled, Disabled. | 
| engine\_enum | string | No | The search engine that the domain runs. Values: OpenSearch, Elasticsearch. | 
| engine\_mode\_enum | string | No | The engine mode of the domain. Values: General, Optimized. | 
| engine\_version | string | No | The engine version that the domain runs, in the form OpenSearch\_X.Y or Elasticsearch\_X.Y. | 
| fine\_grained\_access\_control\_enum | string | No | Whether fine-grained access control is enabled. Values: Enabled, Disabled. | 
| iam\_federation\_enum | string | No | Whether IAM identity federation is enabled. Values: Enabled, Disabled. | 
| identity\_center\_api\_access\_enum | string | No | Whether IAM Identity Center API access is enabled. Values: Enabled, Disabled. | 
| identity\_center\_application\_arn | string | No | The ARN of the IAM Identity Center application integrated with the domain. | 
| identity\_center\_instance\_arn | string | No | The ARN of the IAM Identity Center instance integrated with the domain. | 
| index\_slow\_logs\_enabled\_enum | string | No | Whether the log type is published. Values: Enabled, Disabled. | 
| index\_slow\_logs\_log\_group\_arn | string | No | The ARN of the CloudWatch Logs log group that the logs are published to. | 
| instance\_count | int | No | The number of data nodes. | 
| instance\_type | string | No | The instance type of the data nodes. | 
| internal\_user\_database\_enum | string | No | Whether the fine-grained access control internal user database is enabled. Values: Enabled, Disabled. | 
| ip\_address\_type\_enum | string | No | The type of IP addresses that the domain endpoints support. Values: Ipv4, Dualstack. | 
| jwt\_authentication\_enum | string | No | Whether JWT authentication is enabled. Values: Enabled, Disabled. | 
| kms\_key\_arn | string | No | The ARN of the AWS KMS key used to encrypt data at rest. Present only when encryption at rest is enabled. Deprecated: use kms\_key\_id. | 
| multi\_az\_with\_standby\_enum | string | No | Whether the domain is deployed across multiple Availability Zones with a standby zone. Values: Enabled, Disabled. | 
| natural\_language\_query\_generation\_enum | string | No | Whether natural language query generation is enabled. Values: Enabled, Disabled. | 
| network\_access\_enum | string | No | Whether the domain is reachable from the public internet or only from within a VPC. Values: Public, Vpc. | 
| node\_to\_node\_encryption\_enabled\_enum | string | No | Whether node-to-node encryption is enabled. Values: Enabled, Disabled. | 
| off\_peak\_window\_enabled\_enum | string | No | Whether the off-peak window is enabled. Values: Enabled, Disabled. | 
| off\_peak\_window\_start\_hour\_utc | int | No | The hour, in UTC, at which the off-peak window starts. | 
| off\_peak\_window\_start\_minute\_utc | int | No | The minute, in UTC, at which the off-peak window starts. | 
| s3\_vectors\_engine\_enum | string | No | Whether the S3 vectors engine is enabled. Values: Enabled, Disabled. | 
| saml\_authentication\_enum | string | No | Whether SAML authentication for OpenSearch Dashboards is enabled. Values: Enabled, Disabled. | 
| search\_slow\_logs\_enabled\_enum | string | No | Whether the log type is published. Values: Enabled, Disabled. | 
| search\_slow\_logs\_log\_group\_arn | string | No | The ARN of the CloudWatch Logs log group that the logs are published to. | 
| serverless\_vector\_acceleration\_enum | string | No | Whether serverless vector acceleration is enabled. Values: Enabled, Disabled. | 
| service\_software\_version | string | No | The service software version that the domain runs. | 
| status\_enum | string | No | The current lifecycle status of the domain. Values: Creating, Active, Modifying, UpgradingEngineVersion, UpdatingServiceSoftware, Isolated. | 
| tls\_security\_policy | string | No | The TLS security policy applied to the HTTPS endpoint of the domain. | 
| use\_case\_enum | string | No | The primary use case of the domain. Values: Search, Vector, Observability, Mixed. | 
| use\_latest\_service\_software\_for\_blue\_green\_enum | string | No | Whether blue/green deployments use the latest available service software. Values: Enabled, Disabled. | 
| vpc\_endpoint | string | No | The VPC endpoint used to submit index, search, and data upload requests to the domain. Present only for domains with VPC network access. | 
| vpc\_endpoint\_v2 | string | No | The dual-stack VPC endpoint of the domain. Present only for VPC domains with dual-stack IP addresses. | 
| warm\_instance\_count | int | No | The number of UltraWarm nodes. Present only when UltraWarm storage is enabled. | 
| warm\_instance\_type | string | No | The instance type of the UltraWarm nodes. Present only when UltraWarm storage is enabled. | 
| warm\_storage\_enum | string | No | Whether UltraWarm storage is enabled. Values: Enabled, Disabled. | 
| zone\_awareness\_enum | string | No | Whether the domain spreads its nodes across multiple Availability Zones. Values: Enabled, Disabled. | 
| kms\_key\_id | string | No | The identifier of the AWS KMS key that encrypts the resource at rest, as the source service reports it: a key ID, key ARN, alias name or alias ARN. | 

### collections
<a name="opensearch-system-tables-collections"></a>

Full name: `"s3tablescatalog/aws-catalog"."opensearch"."collections"`. Partitioned by `bucket(32, id)`.

The `collections` system table contains one row for each Serverless collection in your account and Region.

The following table describes the columns of the collections table.


| Column | Type | Required | Description | 
| --- | --- | --- | --- | 
| id | string | Yes | Unique identifier of the asset. | 
| ingestion\_time | timestamptz | Yes | Time this asset record was ingested into the system table, in UTC. | 
| update\_time | timestamptz | No | Time the asset was last updated in the AWS Glue Data Catalog, in UTC. | 
| schema\_version | string | Yes | Identifier of this system table's column layout. Changes when a column is added, removed, renamed, or retyped. | 
| created\_time | timestamptz | No | Time the resource was created, in UTC. | 
| name | string | No | The user-provided business name for the asset. | 
| description | string | No | The user-provided business description for the asset. | 
| resource\_name | string | Yes | The resource's technical name. | 
| resource\_description | string | No | The resource's technical description. | 
| collection\_endpoint | string | No | The HTTPS endpoint used to submit search and index requests to the collection. | 
| collection\_group\_name | string | No | The name of the collection group that contains this collection. Populated only for collections that belong to a collection group. | 
| collection\_id | string | Yes | The unique identifier of the OpenSearch Serverless collection. | 
| collection\_type\_enum | string | No | The collection type, which determines the supported workload and query capabilities. Values: SEARCH, VECTORSEARCH, TIMESERIES. | 
| deletion\_protection\_enum | string | No | Whether deletion protection is enabled for the collection. Values: ENABLED, DISABLED. | 
| fips\_collection\_endpoint | string | No | The FIPS 140-3 compliant HTTPS endpoint used to submit search and index requests to the collection. Populated only for collections that expose a FIPS endpoint. | 
| generation\_enum | string | No | The generation of the collection. Values: CLASSIC, NEXTGEN. | 
| kms\_key\_arn | string | No | The ARN of the AWS KMS key used to encrypt the collection. Deprecated: use kms\_key\_id. | 
| serverless\_vector\_acceleration\_enum | string | No | Whether serverless vector acceleration is enabled for the collection. Values: ENABLED, DISABLED, ALLOWED. | 
| standby\_replicas\_enum | string | No | Whether the collection is deployed with redundant standby replicas for high availability. Values: ENABLED, DISABLED. | 
| status\_enum | string | No | The current lifecycle status of the collection. Values: CREATING, UPDATING, DELETING, ACTIVE, FAILED, UPDATE\_FAILED. | 
| kms\_key\_id | string | No | The identifier of the AWS KMS key that encrypts the resource at rest, as the source service reports it: a key ID, key ARN, alias name or alias ARN. | 

### indexes
<a name="opensearch-system-tables-indexes"></a>

Full name: `"s3tablescatalog/aws-catalog"."opensearch"."indexes"`. Partitioned by `bucket(32, id)`.

The `indexes` system table contains one row for each index in your account and Region.

The following table describes the columns of the indexes table.


| Column | Type | Required | Description | 
| --- | --- | --- | --- | 
| id | string | Yes | Unique identifier of the asset. | 
| ingestion\_time | timestamptz | Yes | Time this asset record was ingested into the system table, in UTC. | 
| update\_time | timestamptz | No | Time the asset was last updated in the AWS Glue Data Catalog, in UTC. | 
| schema\_version | string | Yes | Identifier of this system table's column layout. Changes when a column is added, removed, renamed, or retyped. | 
| created\_time | timestamptz | No | Time the resource was created, in UTC. | 
| name | string | No | The user-provided business name for the asset. | 
| description | string | No | The user-provided business description for the asset. | 
| resource\_name | string | Yes | The resource's technical name. | 
| resource\_description | string | No | The resource's technical description. | 
| belongs\_to | string | No | Fully qualified identifier of the container asset this asset is a member of. | 
| settings | map<string,string> | No | The complete set of index setting key-value pairs as returned by GET /{index}. Keys use OpenSearch dotted format (for example, index.number\_of\_shards, index.refresh\_interval). | 

## Example queries
<a name="opensearch-system-tables-example-queries"></a>

### Domains by encryption at rest and audit logging
<a name="opensearch-system-tables-query-domains"></a>

```sql
SELECT encryption_at_rest_enum, audit_logs_enabled_enum, count(*) AS domains
FROM "s3tablescatalog/aws-catalog"."opensearch"."domains"
GROUP BY 1, 2;
```

### Collections by type and deletion protection
<a name="opensearch-system-tables-query-collections"></a>

```sql
SELECT collection_type_enum, deletion_protection_enum, standby_replicas_enum,
       count(*) AS collections
FROM "s3tablescatalog/aws-catalog"."opensearch"."collections"
GROUP BY 1, 2, 3;
```