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 | awscc.rekognition.collections |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
collection_id | string | The name of the collection |
region | string | AWS region. |
For more information, see AWS::Rekognition::Collection.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | collections | INSERT | CollectionId, region |
delete_resource | collections | DELETE | Identifier, region |
update_resource | collections | UPDATE | Identifier, PatchDocument, region |
list_resources | collections_list_only | SELECT | region |
get_resource | collections | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual collection.
SELECT
region,
arn,
collection_id,
tags
FROM awscc.rekognition.collections
WHERE
region = 'us-east-1' AND
Identifier = '{{ collection_id }}';
Lists all collections in a region.
SELECT
region,
collection_id
FROM awscc.rekognition.collections_list_only
WHERE
region = 'us-east-1';
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 awscc.rekognition.collections (
CollectionId,
region
)
SELECT
'{{ collection_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.rekognition.collections (
CollectionId,
Tags,
region
)
SELECT
'{{ collection_id }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: collection
props:
- name: collection_id
value: '{{ collection_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a collection resource, using stack-deploy.
/*+ update */
UPDATE awscc.rekognition.collections
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ collection_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.rekognition.collections
WHERE
Identifier = '{{ collection_id }}' AND
region = 'us-east-1';
Permissions
To operate on the collections resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
rekognition:CreateCollection,
rekognition:DescribeCollection,
rekognition:ListTagsForResource,
rekognition:TagResource
rekognition:DescribeCollection,
rekognition:ListTagsForResource
rekognition:TagResource,
rekognition:UntagResource,
rekognition:DescribeCollection,
rekognition:ListTagsForResource
rekognition:DeleteCollection
rekognition:ListCollections