Skip to main content

indices

Creates, updates, deletes or gets an index resource or lists indices in a region

Overview

Nameindices
TypeResource
DescriptionAn OpenSearch Serverless index resource
Idawscc.opensearchserverless.indices

Fields

NameDatatypeDescription
collection_endpointstringThe endpoint for the collection.
index_namestringThe name of the OpenSearch Serverless index.
settingsobjectIndex settings
mappingsobjectIndex Mappings
uuidstringThe unique identifier for the index.
regionstringAWS region.

For more information, see AWS::OpenSearchServerless::Index.

Methods

NameAccessible byRequired Params
create_resourceINSERTCollectionEndpoint, IndexName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual index.

SELECT
region,
collection_endpoint,
index_name,
settings,
mappings,
uuid
FROM awscc.opensearchserverless.indices
WHERE region = 'us-east-1' AND data__Identifier = '<IndexName>|<CollectionEndpoint>';

INSERT example

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

/*+ create */
INSERT INTO awscc.opensearchserverless.indices (
CollectionEndpoint,
IndexName,
region
)
SELECT
'{{ CollectionEndpoint }}',
'{{ IndexName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.opensearchserverless.indices
WHERE data__Identifier = '<IndexName|CollectionEndpoint>'
AND region = 'us-east-1';

Permissions

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

Create

aoss:APIAccessAll

Read

aoss:APIAccessAll

Update

aoss:APIAccessAll

Delete

aoss:APIAccessAll

List

aoss:APIAccessAll