collection_groups
Creates, updates, deletes, gets or lists a collection_groups resource.
Overview
| Name | collection_groups |
| Type | Resource |
| Id | aws.opensearchserverless.collection_groups |
Fields
The following fields are returned by SELECT queries:
- list_collection_groups
| Name | Datatype | Description |
|---|---|---|
collection_group_summaries | array | Details about each collection group. |
next_token | string | When 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_collection_groups | select | region | Returns a list of collection groups. For more information, see Creating and managing Amazon OpenSearch Serverless collections. | |
create_collection_group | insert | region, name, standbyReplicas | 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. | |
update_collection_group | update | region, id | Updates the description and capacity limits of a collection group. | |
delete_collection_group | delete | region | 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. | |
batch_get_collection_group | exec | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_collection_groups
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
- create_collection_group
- Manifest
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
;
# Description fields are for documentation purposes
- name: collection_groups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the collection_groups resource.
- name: name
value: "{{ name }}"
description: |
The name of the collection group.
- name: standbyReplicas
value: "{{ standbyReplicas }}"
description: |
Indicates whether standby replicas should be used for a collection group.
valid_values: ['ENABLED', 'DISABLED']
- name: description
value: "{{ description }}"
description: |
A description of the collection group.
- name: tags
description: |
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection group.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: capacityLimits
description: |
The capacity limits for the collection group, in OpenSearch Compute Units (OCUs). These limits control the maximum and minimum capacity for collections within the group.
value:
maxIndexingCapacityInOCU: {{ maxIndexingCapacityInOCU }}
maxSearchCapacityInOCU: {{ maxSearchCapacityInOCU }}
minIndexingCapacityInOCU: {{ minIndexingCapacityInOCU }}
minSearchCapacityInOCU: {{ minSearchCapacityInOCU }}
- name: generation
value: "{{ generation }}"
description: |
The generation of Amazon OpenSearch Serverless for the collection group. Valid values are CLASSIC and NEXTGEN.
valid_values: ['CLASSIC', 'NEXTGEN']
- name: clientToken
value: "{{ clientToken }}"
description: |
Unique, case-sensitive identifier to ensure idempotency of the request.
UPDATE examples
- update_collection_group
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
- delete_collection_group
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
- batch_get_collection_group
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 }}"
}'
;