Skip to main content

collections

Creates, updates, deletes or gets a collection resource or lists collections in a region

Overview

Namecollections
TypeResource
DescriptionThe AWS::Rekognition::Collection type creates an Amazon Rekognition Collection. A collection is a logical grouping of information about detected faces which can later be referenced for searches on the group
Idaws.rekognition.collections

Fields

NameDatatypeDescription
arnstringThe ARN of the stream processor
collection_idstringThe name of the collection
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTCollectionId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all collections in a region.

SELECT
region,
arn,
collection_id,
tags
FROM aws.rekognition.collections
WHERE region = 'us-east-1';

Gets all properties from an individual collection.

SELECT
region,
arn,
collection_id,
tags
FROM aws.rekognition.collections
WHERE region = 'us-east-1' AND data__Identifier = '<CollectionId>';

INSERT example

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

/*+ create */
INSERT INTO aws.rekognition.collections (
CollectionId,
region
)
SELECT
'{{ CollectionId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.rekognition.collections
WHERE data__Identifier = '<CollectionId>'
AND region = 'us-east-1';

Permissions

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

Create

rekognition:CreateCollection,
rekognition:DescribeCollection,
rekognition:ListTagsForResource,
rekognition:TagResource

Read

rekognition:DescribeCollection,
rekognition:ListTagsForResource

Update

rekognition:TagResource,
rekognition:UntagResource,
rekognition:DescribeCollection,
rekognition:ListTagsForResource

Delete

rekognition:DeleteCollection

List

rekognition:ListCollections