collections
Creates, updates, deletes or gets a collection
resource or lists collections
in a region
Overview
Name | collections |
Type | Resource |
Description | The 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 |
Id | aws.rekognition.collections |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The ARN of the stream processor |
collection_id | string | The name of the collection |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | CollectionId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.rekognition.collections (
CollectionId,
region
)
SELECT
'{{ CollectionId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.rekognition.collections (
CollectionId,
Tags,
region
)
SELECT
'{{ CollectionId }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: collection
props:
- name: CollectionId
value: '{{ CollectionId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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