Skip to main content

domains

Creates, updates, deletes or gets a domain resource or lists domains in a region

Overview​

Namedomains
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idawscc.opensearchservice.domains

Fields​

NameDatatypeDescription
â–¶cluster_configobject
domain_namestring
access_policiesobject
ip_address_typestring
engine_versionstring
advanced_optionsobject
log_publishing_optionsobject
â–¶snapshot_optionsobject
â–¶vpc_optionsobject
â–¶node_to_node_encryption_optionsobject
â–¶domain_endpoint_optionsobject
â–¶cognito_optionsobject
â–¶advanced_security_optionsobject
domain_endpointstring
domain_endpoint_v2string
domain_endpointsobject
â–¶ebs_optionsobject
idstring
arnstring
domain_arnstring
â–¶encryption_at_rest_optionsobject
â–¶tagsarrayAn arbitrary set of tags (key-value pairs) for this Domain.
â–¶service_software_optionsobject
â–¶off_peak_window_optionsobject
â–¶software_update_optionsobject
skip_shard_migration_waitboolean
â–¶identity_center_optionsobjectOptions for configuring Identity Center
regionstringAWS region.

For more information, see AWS::OpenSearchService::Domain.

Methods​

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEIdentifier, region
update_resourceUPDATEIdentifier, PatchDocument, region
get_resourceSELECTIdentifier, 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,
skip_shard_migration_wait,
identity_center_options
FROM awscc.opensearchservice.domains
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}';

INSERT example​

Use the following StackQL query and manifest file to create a new domain resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.opensearchservice.domains (
ClusterConfig,
DomainName,
AccessPolicies,
IPAddressType,
EngineVersion,
AdvancedOptions,
LogPublishingOptions,
SnapshotOptions,
VPCOptions,
NodeToNodeEncryptionOptions,
DomainEndpointOptions,
CognitoOptions,
AdvancedSecurityOptions,
EBSOptions,
EncryptionAtRestOptions,
Tags,
OffPeakWindowOptions,
SoftwareUpdateOptions,
SkipShardMigrationWait,
IdentityCenterOptions,
region
)
SELECT
'{{ 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 }}',
'{{ ebs_options }}',
'{{ encryption_at_rest_options }}',
'{{ tags }}',
'{{ off_peak_window_options }}',
'{{ software_update_options }}',
'{{ skip_shard_migration_wait }}',
'{{ identity_center_options }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example​

Use the following StackQL query and manifest file to update a domain resource, using stack-deploy.

/*+ update */
UPDATE awscc.opensearchservice.domains
SET PatchDocument = string('{{ {
"ClusterConfig": cluster_config,
"AccessPolicies": access_policies,
"IPAddressType": ip_address_type,
"EngineVersion": engine_version,
"AdvancedOptions": advanced_options,
"LogPublishingOptions": log_publishing_options,
"SnapshotOptions": snapshot_options,
"VPCOptions": vpc_options,
"NodeToNodeEncryptionOptions": node_to_node_encryption_options,
"DomainEndpointOptions": domain_endpoint_options,
"CognitoOptions": cognito_options,
"EBSOptions": ebs_options,
"EncryptionAtRestOptions": encryption_at_rest_options,
"Tags": tags,
"OffPeakWindowOptions": off_peak_window_options,
"SoftwareUpdateOptions": software_update_options,
"SkipShardMigrationWait": skip_shard_migration_wait
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example​

/*+ delete */
DELETE FROM awscc.opensearchservice.domains
WHERE
Identifier = '{{ domain_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters​

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions​

To operate on the domains resource, the following permissions are required:

es:CreateDomain,
es:DescribeDomain,
es:AddTags,
es:ListTags,
es:DescribeDomainChangeProgress