domains
Creates, updates, deletes or gets a domain
resource or lists domains
in a region
Overview
Name | domains |
Type | Resource |
Description | An example resource schema demonstrating some basic constructs and validation rules. |
Id | aws.opensearchservice.domains |
Fields
Name | Datatype | Description |
---|---|---|
cluster_config | object | |
domain_name | string | |
access_policies | object | |
ip_address_type | string | |
engine_version | string | |
advanced_options | object | |
log_publishing_options | object | |
snapshot_options | object | |
vpc_options | object | |
node_to_node_encryption_options | object | |
domain_endpoint_options | object | |
cognito_options | object | |
advanced_security_options | object | |
domain_endpoint | string | |
domain_endpoint_v2 | string | |
domain_endpoints | object | |
ebs_options | object | |
id | string | |
arn | string | |
domain_arn | string | |
encryption_at_rest_options | object | |
tags | array | An arbitrary set of tags (key-value pairs) for this Domain. |
service_software_options | object | |
off_peak_window_options | object | |
software_update_options | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual domain
.
SELECT
region,
cluster_config,
domain_name,
access_policies,
ip_address_type,
engine_version,
advanced_options,
log_publishing_options,
snapshot_options,
vpc_options,
node_to_node_encryption_options,
domain_endpoint_options,
cognito_options,
advanced_security_options,
domain_endpoint,
domain_endpoint_v2,
domain_endpoints,
ebs_options,
id,
arn,
domain_arn,
encryption_at_rest_options,
tags,
service_software_options,
off_peak_window_options,
software_update_options
FROM aws.opensearchservice.domains
WHERE region = 'us-east-1' AND data__Identifier = '<DomainName>';
INSERT
example
Use the following StackQL query and manifest file to create a new domain
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.opensearchservice.domains (
ClusterConfig,
DomainName,
AccessPolicies,
IPAddressType,
EngineVersion,
AdvancedOptions,
LogPublishingOptions,
SnapshotOptions,
VPCOptions,
NodeToNodeEncryptionOptions,
DomainEndpointOptions,
CognitoOptions,
AdvancedSecurityOptions,
EBSOptions,
EncryptionAtRestOptions,
Tags,
OffPeakWindowOptions,
SoftwareUpdateOptions,
region
)
SELECT
'{{ ClusterConfig }}',
'{{ DomainName }}',
'{{ AccessPolicies }}',
'{{ IPAddressType }}',
'{{ EngineVersion }}',
'{{ AdvancedOptions }}',
'{{ LogPublishingOptions }}',
'{{ SnapshotOptions }}',
'{{ VPCOptions }}',
'{{ NodeToNodeEncryptionOptions }}',
'{{ DomainEndpointOptions }}',
'{{ CognitoOptions }}',
'{{ AdvancedSecurityOptions }}',
'{{ EBSOptions }}',
'{{ EncryptionAtRestOptions }}',
'{{ Tags }}',
'{{ OffPeakWindowOptions }}',
'{{ SoftwareUpdateOptions }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.opensearchservice.domains (
ClusterConfig,
DomainName,
AccessPolicies,
IPAddressType,
EngineVersion,
AdvancedOptions,
LogPublishingOptions,
SnapshotOptions,
VPCOptions,
NodeToNodeEncryptionOptions,
DomainEndpointOptions,
CognitoOptions,
AdvancedSecurityOptions,
EBSOptions,
EncryptionAtRestOptions,
Tags,
OffPeakWindowOptions,
SoftwareUpdateOptions,
region
)
SELECT
'{{ ClusterConfig }}',
'{{ DomainName }}',
'{{ AccessPolicies }}',
'{{ IPAddressType }}',
'{{ EngineVersion }}',
'{{ AdvancedOptions }}',
'{{ LogPublishingOptions }}',
'{{ SnapshotOptions }}',
'{{ VPCOptions }}',
'{{ NodeToNodeEncryptionOptions }}',
'{{ DomainEndpointOptions }}',
'{{ CognitoOptions }}',
'{{ AdvancedSecurityOptions }}',
'{{ EBSOptions }}',
'{{ EncryptionAtRestOptions }}',
'{{ Tags }}',
'{{ OffPeakWindowOptions }}',
'{{ SoftwareUpdateOptions }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: domain
props:
- name: ClusterConfig
value:
InstanceCount: '{{ InstanceCount }}'
WarmEnabled: '{{ WarmEnabled }}'
WarmCount: '{{ WarmCount }}'
DedicatedMasterEnabled: '{{ DedicatedMasterEnabled }}'
ZoneAwarenessConfig:
AvailabilityZoneCount: '{{ AvailabilityZoneCount }}'
DedicatedMasterCount: '{{ DedicatedMasterCount }}'
InstanceType: '{{ InstanceType }}'
WarmType: '{{ WarmType }}'
ZoneAwarenessEnabled: '{{ ZoneAwarenessEnabled }}'
DedicatedMasterType: '{{ DedicatedMasterType }}'
MultiAZWithStandbyEnabled: '{{ MultiAZWithStandbyEnabled }}'
ColdStorageOptions:
Enabled: '{{ Enabled }}'
- name: DomainName
value: '{{ DomainName }}'
- name: AccessPolicies
value: {}
- name: IPAddressType
value: '{{ IPAddressType }}'
- name: EngineVersion
value: '{{ EngineVersion }}'
- name: AdvancedOptions
value: {}
- name: LogPublishingOptions
value: {}
- name: SnapshotOptions
value:
AutomatedSnapshotStartHour: '{{ AutomatedSnapshotStartHour }}'
- name: VPCOptions
value:
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
SubnetIds:
- '{{ SubnetIds[0] }}'
- name: NodeToNodeEncryptionOptions
value:
Enabled: '{{ Enabled }}'
- name: DomainEndpointOptions
value:
CustomEndpointCertificateArn: '{{ CustomEndpointCertificateArn }}'
CustomEndpointEnabled: '{{ CustomEndpointEnabled }}'
EnforceHTTPS: '{{ EnforceHTTPS }}'
CustomEndpoint: '{{ CustomEndpoint }}'
TLSSecurityPolicy: '{{ TLSSecurityPolicy }}'
- name: CognitoOptions
value:
Enabled: '{{ Enabled }}'
IdentityPoolId: '{{ IdentityPoolId }}'
UserPoolId: '{{ UserPoolId }}'
RoleArn: '{{ RoleArn }}'
- name: AdvancedSecurityOptions
value:
Enabled: '{{ Enabled }}'
MasterUserOptions:
MasterUserPassword: '{{ MasterUserPassword }}'
MasterUserName: '{{ MasterUserName }}'
MasterUserARN: '{{ MasterUserARN }}'
InternalUserDatabaseEnabled: '{{ InternalUserDatabaseEnabled }}'
AnonymousAuthEnabled: '{{ AnonymousAuthEnabled }}'
SAMLOptions:
Enabled: '{{ Enabled }}'
Idp:
MetadataContent: '{{ MetadataContent }}'
EntityId: '{{ EntityId }}'
MasterUserName: '{{ MasterUserName }}'
MasterBackendRole: '{{ MasterBackendRole }}'
SubjectKey: '{{ SubjectKey }}'
RolesKey: '{{ RolesKey }}'
SessionTimeoutMinutes: '{{ SessionTimeoutMinutes }}'
AnonymousAuthDisableDate: '{{ AnonymousAuthDisableDate }}'
- name: EBSOptions
value:
EBSEnabled: '{{ EBSEnabled }}'
VolumeType: '{{ VolumeType }}'
Iops: '{{ Iops }}'
VolumeSize: '{{ VolumeSize }}'
Throughput: '{{ Throughput }}'
- name: EncryptionAtRestOptions
value:
KmsKeyId: '{{ KmsKeyId }}'
Enabled: '{{ Enabled }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: OffPeakWindowOptions
value:
Enabled: '{{ Enabled }}'
OffPeakWindow:
WindowStartTime:
Hours: '{{ Hours }}'
Minutes: '{{ Minutes }}'
- name: SoftwareUpdateOptions
value:
AutoSoftwareUpdateEnabled: '{{ AutoSoftwareUpdateEnabled }}'
DELETE
example
/*+ delete */
DELETE FROM aws.opensearchservice.domains
WHERE data__Identifier = '<DomainName>'
AND region = 'us-east-1';
Permissions
To operate on the domains
resource, the following permissions are required:
Create
es:CreateDomain,
es:DescribeDomain,
es:AddTags,
es:ListTags
Read
es:DescribeDomain,
es:ListTags
Update
es:UpdateDomain,
es:UpgradeDomain,
es:DescribeDomain,
es:AddTags,
es:RemoveTags,
es:ListTags,
es:DescribeDomainChangeProgress
Delete
es:DeleteDomain,
es:DescribeDomain