projects
Creates, updates, deletes, gets or lists a projects resource.
Overview
| Name | projects |
| Type | Resource |
| Id | aws.rekognition.projects |
Fields
The following fields are returned by SELECT queries:
- describe_projects
| Name | Datatype | Description |
|---|---|---|
auto_update | string | Indicates whether automatic retraining will be attempted for the versions of the project. Applies only to adapters. (ENABLED, DISABLED) |
creation_timestamp | string (date-time) | The Unix timestamp for the date and time that the project was created. |
datasets | array | Information about the training and test datasets in the project. |
feature | string | Specifies the project that is being customized. (CONTENT_MODERATION, CUSTOM_LABELS) |
project_arn | string | The Amazon Resource Name (ARN) of the project. (pattern: <code>(^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project/[a-zA-Z0-9_.-]{1,255}/[0-9]+$)</code>) |
status | string | The current status of the project. (CREATING, CREATED, DELETING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_projects | select | region | Gets information about your Rekognition projects. This operation requires permissions to perform the rekognition:DescribeProjects action. | |
create_project | insert | region, ProjectName | Creates a new Amazon Rekognition project. A project is a group of resources (datasets, model versions) that you use to create and manage a Amazon Rekognition Custom Labels Model or custom adapter. You can specify a feature to create the project with, if no feature is specified then Custom Labels is used by default. For adapters, you can also choose whether or not to have the project auto update by using the AutoUpdate argument. This operation requires permissions to perform the rekognition:CreateProject action. | |
delete_project | delete | region | Deletes a Amazon Rekognition project. To delete a project you must first delete all models or adapters associated with the project. To delete a model or adapter, see DeleteProjectVersion. DeleteProject is an asynchronous operation. To check if the project is deleted, call DescribeProjects. The project is deleted when the project no longer appears in the response. Be aware that deleting a given project will also delete any ProjectPolicies associated with that project. This operation requires permissions to perform the rekognition:DeleteProject action. | |
copy_project_version | exec | region, SourceProjectArn, SourceProjectVersionArn, DestinationProjectArn, VersionName, OutputConfig | This operation applies only to Amazon Rekognition Custom Labels. Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and destination projects can be in different AWS accounts but must be in the same AWS Region. You can't copy a model to another AWS service. To copy a model version to a different AWS account, you need to create a resource-based policy known as a project policy. You attach the project policy to the source project by calling PutProjectPolicy. The project policy gives permission to copy the model version from a trusting AWS account to a trusted account. For more information creating and attaching a project policy, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide. If you are copying a model version to a project in the same AWS account, you don't need to create a project policy. Copying project versions is supported only for Custom Labels models. To copy a model, the destination project, source project, and source model version must already exist. Copying a model version takes a while to complete. To get the current status, call DescribeProjectVersions and check the value of Status in the ProjectVersionDescription object. The copy operation has finished when the value of Status is COPYING_COMPLETED. This operation requires permissions to perform the rekognition:CopyProjectVersion action. | |
start_project_version | exec | region, ProjectVersionArn, MinInferenceUnits | This operation applies only to Amazon Rekognition Custom Labels. Starts the running of the version of a model. Starting a model takes a while to complete. To check the current state of the model, use DescribeProjectVersions. Once the model is running, you can detect custom labels in new images by calling DetectCustomLabels. You are charged for the amount of time that the model is running. To stop a running model, call StopProjectVersion. This operation requires permissions to perform the rekognition:StartProjectVersion action. | |
stop_project_version | exec | region, ProjectVersionArn | This operation applies only to Amazon Rekognition Custom Labels. Stops a running model. The operation might take a while to complete. To check the current status, call DescribeProjectVersions. Only applies to Custom Labels projects. This operation requires permissions to perform the rekognition:StopProjectVersion action. |
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
- describe_projects
Gets information about your Rekognition projects. This operation requires permissions to perform the rekognition:DescribeProjects action.
SELECT
auto_update,
creation_timestamp,
datasets,
feature,
project_arn,
status
FROM aws.rekognition.projects
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_project
- Manifest
Creates a new Amazon Rekognition project. A project is a group of resources (datasets, model versions) that you use to create and manage a Amazon Rekognition Custom Labels Model or custom adapter. You can specify a feature to create the project with, if no feature is specified then Custom Labels is used by default. For adapters, you can also choose whether or not to have the project auto update by using the AutoUpdate argument. This operation requires permissions to perform the rekognition:CreateProject action.
INSERT INTO aws.rekognition.projects (
ProjectName,
Feature,
AutoUpdate,
Tags,
region
)
SELECT
'{{ ProjectName }}' /* required */,
'{{ Feature }}',
'{{ AutoUpdate }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
project_arn
;
# Description fields are for documentation purposes
- name: projects
props:
- name: region
value: "{{ region }}"
description: Required parameter for the projects resource.
- name: ProjectName
value: "{{ ProjectName }}"
description: |
The name of the project to create.
- name: Feature
value: "{{ Feature }}"
description: |
Specifies feature that is being customized. If no value is provided CUSTOM_LABELS is used as a default.
valid_values: ['CONTENT_MODERATION', 'CUSTOM_LABELS']
- name: AutoUpdate
value: "{{ AutoUpdate }}"
description: |
Specifies whether automatic retraining should be attempted for the versions of the project. Automatic retraining is done as a best effort. Required argument for Content Moderation. Applicable only to adapters.
valid_values: ['ENABLED', 'DISABLED']
- name: Tags
value: "{{ Tags }}"
description: |
A set of tags (key-value pairs) that you want to attach to the project.
DELETE examples
- delete_project
Deletes a Amazon Rekognition project. To delete a project you must first delete all models or adapters associated with the project. To delete a model or adapter, see DeleteProjectVersion. DeleteProject is an asynchronous operation. To check if the project is deleted, call DescribeProjects. The project is deleted when the project no longer appears in the response. Be aware that deleting a given project will also delete any ProjectPolicies associated with that project. This operation requires permissions to perform the rekognition:DeleteProject action.
DELETE FROM aws.rekognition.projects
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- copy_project_version
- start_project_version
- stop_project_version
This operation applies only to Amazon Rekognition Custom Labels. Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and destination projects can be in different AWS accounts but must be in the same AWS Region. You can't copy a model to another AWS service. To copy a model version to a different AWS account, you need to create a resource-based policy known as a project policy. You attach the project policy to the source project by calling PutProjectPolicy. The project policy gives permission to copy the model version from a trusting AWS account to a trusted account. For more information creating and attaching a project policy, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide. If you are copying a model version to a project in the same AWS account, you don't need to create a project policy. Copying project versions is supported only for Custom Labels models. To copy a model, the destination project, source project, and source model version must already exist. Copying a model version takes a while to complete. To get the current status, call DescribeProjectVersions and check the value of Status in the ProjectVersionDescription object. The copy operation has finished when the value of Status is COPYING_COMPLETED. This operation requires permissions to perform the rekognition:CopyProjectVersion action.
EXEC aws.rekognition.projects.copy_project_version
@region='{{ region }}' --required
@@json=
'{
"SourceProjectArn": "{{ SourceProjectArn }}",
"SourceProjectVersionArn": "{{ SourceProjectVersionArn }}",
"DestinationProjectArn": "{{ DestinationProjectArn }}",
"VersionName": "{{ VersionName }}",
"OutputConfig": "{{ OutputConfig }}",
"Tags": "{{ Tags }}",
"KmsKeyId": "{{ KmsKeyId }}"
}'
;
This operation applies only to Amazon Rekognition Custom Labels. Starts the running of the version of a model. Starting a model takes a while to complete. To check the current state of the model, use DescribeProjectVersions. Once the model is running, you can detect custom labels in new images by calling DetectCustomLabels. You are charged for the amount of time that the model is running. To stop a running model, call StopProjectVersion. This operation requires permissions to perform the rekognition:StartProjectVersion action.
EXEC aws.rekognition.projects.start_project_version
@region='{{ region }}' --required
@@json=
'{
"ProjectVersionArn": "{{ ProjectVersionArn }}",
"MinInferenceUnits": {{ MinInferenceUnits }},
"MaxInferenceUnits": {{ MaxInferenceUnits }}
}'
;
This operation applies only to Amazon Rekognition Custom Labels. Stops a running model. The operation might take a while to complete. To check the current status, call DescribeProjectVersions. Only applies to Custom Labels projects. This operation requires permissions to perform the rekognition:StopProjectVersion action.
EXEC aws.rekognition.projects.stop_project_version
@region='{{ region }}' --required
@@json=
'{
"ProjectVersionArn": "{{ ProjectVersionArn }}"
}'
;