Skip to main content

collection_groups

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

Overview

Namecollection_groups
TypeResource
Idaws.opensearchserverless.collection_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
collection_group_summariesarrayDetails about each collection group.
next_tokenstringWhen nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_collection_groupsselectregionReturns a list of collection groups. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
create_collection_groupinsertregion, name, standbyReplicasCreates a collection group within OpenSearch Serverless. Collection groups let you manage OpenSearch Compute Units (OCUs) at a group level, with multiple collections sharing the group's capacity limits. For more information, see Managing collection groups.
update_collection_groupupdateregion, idUpdates the description and capacity limits of a collection group.
delete_collection_groupdeleteregionDeletes a collection group. You can only delete empty collection groups that contain no collections. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
batch_get_collection_groupexecregionReturns attributes for one or more collection groups, including capacity limits and the number of collections in each group. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of collection groups. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

SELECT
collection_group_summaries,
next_token
FROM aws.opensearchserverless.collection_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a collection group within OpenSearch Serverless. Collection groups let you manage OpenSearch Compute Units (OCUs) at a group level, with multiple collections sharing the group's capacity limits. For more information, see Managing collection groups.

INSERT INTO aws.opensearchserverless.collection_groups (
name,
standbyReplicas,
description,
tags,
capacityLimits,
generation,
clientToken,
region
)
SELECT
'{{ name }}' /* required */,
'{{ standbyReplicas }}' /* required */,
'{{ description }}',
'{{ tags }}',
'{{ capacityLimits }}',
'{{ generation }}',
'{{ clientToken }}',
'{{ region }}'
RETURNING
create_collection_group_detail
;

UPDATE examples

Updates the description and capacity limits of a collection group.

UPDATE aws.opensearchserverless.collection_groups
SET
id = '{{ id }}',
description = '{{ description }}',
capacityLimits = '{{ capacityLimits }}',
clientToken = '{{ clientToken }}'
WHERE
region = '{{ region }}' --required
AND id = '{{ id }}' --required
RETURNING
update_collection_group_detail;

DELETE examples

Deletes a collection group. You can only delete empty collection groups that contain no collections. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

DELETE FROM aws.opensearchserverless.collection_groups
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Returns attributes for one or more collection groups, including capacity limits and the number of collections in each group. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

EXEC aws.opensearchserverless.collection_groups.batch_get_collection_group
@region='{{ region }}' --required
@@json=
'{
"ids": "{{ ids }}",
"names": "{{ names }}"
}'
;