Skip to main content

domains

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

Overview

Namedomains
TypeResource
Idaws.cloudsearch.domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the search domain. See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
createdbooleanTrue if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
deletedbooleanTrue if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
doc_servicestringThe service endpoint for updating documents in a search domain.
domain_idstringAn internally generated unique identifier for a domain.
domain_namestringA string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).
limitsstring
processingbooleanTrue if processing is being done to activate the current domain configuration.
requires_index_documentsbooleanTrue if IndexDocuments needs to be called to activate the current domain configuration.
search_instance_countintegerThe number of search instances that are available to process search requests.
search_instance_typestringThe instance type that is being used to process search requests.
search_partition_countintegerThe number of partitions across which the search index is spread.
search_servicestringThe service endpoint for requesting search results from a search domain.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_domainsselectregionDomainNamesGets information about the search domains owned by this account. Can be limited to specific domains. Shows all domains by default. To get the number of searchable documents in a domain, use the console or submit a matchall request to your domain's search endpoint: q=matchall&q.parser=structured&size=0. For more information, see Getting Information about a Search Domain in the Amazon CloudSearch Developer Guide.
create_domaininsertDomainName, regionCreates a new search domain. For more information, see Creating a Search Domain in the Amazon CloudSearch Developer Guide.
delete_domaindeleteDomainName, regionPermanently deletes a search domain and all of its data. Once a domain has been deleted, it cannot be recovered. For more information, see Deleting a Search Domain in the Amazon CloudSearch Developer Guide.
define_analysis_schemeexecDomainName, AnalysisScheme, regionConfigures an analysis scheme that can be applied to a text or text-array field to define language-specific text processing options. For more information, see Configuring Analysis Schemes in the Amazon CloudSearch Developer Guide.
define_expressionexecDomainName, Expression, regionConfigures an Expression for the search domain. Used to create new expressions and modify existing ones. If the expression exists, the new configuration replaces the old one. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.
define_index_fieldexecDomainName, IndexField, regionConfigures an IndexField for the search domain. Used to create new fields and modify existing ones. You must specify the name of the domain you are configuring and an index field configuration. The index field configuration specifies a unique name, the index field type, and the options you want to configure for the field. The options you can specify depend on the IndexFieldType. If the field exists, the new configuration replaces the old one. For more information, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.
define_suggesterexecDomainName, Suggester, regionConfigures a suggester for a domain. A suggester enables you to display possible matches before users finish typing their queries. When you configure a suggester, you must specify the name of the text field you want to search for possible matches and a unique name for the suggester. For more information, see Getting Search Suggestions in the Amazon CloudSearch Developer Guide.
index_documentsexecDomainName, regionTells the search domain to start indexing its documents using the latest indexing options. This operation must be invoked to activate options whose OptionStatus is RequiresIndexDocuments.

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
AnalysisSchemeobject
DomainNamestring
Expressionobject
IndexFieldobjectThe index field and field options you want to configure.
Suggesterobject
regionstringAWS region (default: us-east-1)
DomainNamesarrayThe names of the domains you want to include in the response.

SELECT examples

Gets information about the search domains owned by this account. Can be limited to specific domains. Shows all domains by default. To get the number of searchable documents in a domain, use the console or submit a matchall request to your domain's search endpoint: q=matchall&q.parser=structured&size=0. For more information, see Getting Information about a Search Domain in the Amazon CloudSearch Developer Guide.

SELECT
arn,
created,
deleted,
doc_service,
domain_id,
domain_name,
limits,
processing,
requires_index_documents,
search_instance_count,
search_instance_type,
search_partition_count,
search_service
FROM aws.cloudsearch.domains
WHERE region = '{{ region }}' -- required
AND DomainNames = '{{ DomainNames }}'
;

INSERT examples

Creates a new search domain. For more information, see Creating a Search Domain in the Amazon CloudSearch Developer Guide.

INSERT INTO aws.cloudsearch.domains (
DomainName,
region
)
SELECT
'{{ DomainName }}',
'{{ region }}'
RETURNING
arn,
created,
deleted,
doc_service,
domain_id,
domain_name,
limits,
processing,
requires_index_documents,
search_instance_count,
search_instance_type,
search_partition_count,
search_service
;

DELETE examples

Permanently deletes a search domain and all of its data. Once a domain has been deleted, it cannot be recovered. For more information, see Deleting a Search Domain in the Amazon CloudSearch Developer Guide.

DELETE FROM aws.cloudsearch.domains
WHERE DomainName = '{{ DomainName }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Configures an analysis scheme that can be applied to a text or text-array field to define language-specific text processing options. For more information, see Configuring Analysis Schemes in the Amazon CloudSearch Developer Guide.

EXEC aws.cloudsearch.domains.define_analysis_scheme
@DomainName='{{ DomainName }}' --required,
@AnalysisScheme='{{ AnalysisScheme }}' --required,
@region='{{ region }}' --required
;