datasets
Creates, updates, deletes, gets or lists a datasets resource.
Overview
| Name | datasets |
| Type | Resource |
| Id | aws.rekognition.datasets |
Fields
The following fields are returned by SELECT queries:
- describe_dataset
| Name | Datatype | Description |
|---|---|---|
creation_timestamp | string (date-time) | The Unix timestamp for the time and date that the dataset was created. |
dataset_stats | object | The status message code for the dataset. |
last_updated_timestamp | string (date-time) | The Unix timestamp for the date and time that the dataset was last updated. |
status | string | The status of the dataset. (CREATE_IN_PROGRESS, CREATE_COMPLETE, CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, DELETE_IN_PROGRESS) |
status_message | string | The status message for the dataset. |
status_message_code | string | The status message code for the dataset operation. If a service error occurs, try the API call again later. If a client error occurs, check the input parameters to the dataset API call that failed. (SUCCESS, SERVICE_ERROR, CLIENT_ERROR) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_dataset | select | region | This operation applies only to Amazon Rekognition Custom Labels. Describes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and statistics about the images and labels in a dataset. This operation requires permissions to perform the rekognition:DescribeDataset action. | |
create_dataset | insert | region, DatasetType, ProjectArn | This operation applies only to Amazon Rekognition Custom Labels. Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset. To create a training dataset for a project, specify TRAIN for the value of DatasetType. To create the test dataset for a project, specify TEST for the value of DatasetType. The response from CreateDataset is the Amazon Resource Name (ARN) for the dataset. Creating a dataset takes a while to complete. Use DescribeDataset to check the current status. The dataset created successfully if the value of Status is CREATE_COMPLETE. To check if any non-terminal errors occurred, call ListDatasetEntries and check for the presence of errors lists in the JSON Lines. Dataset creation fails if a terminal error occurs (Status = CREATE_FAILED). Currently, you can't access the terminal error information. For more information, see Creating dataset in the Amazon Rekognition Custom Labels Developer Guide. This operation requires permissions to perform the rekognition:CreateDataset action. If you want to copy an existing dataset, you also require permission to perform the rekognition:ListDatasetEntries action. | |
delete_dataset | delete | region | This operation applies only to Amazon Rekognition Custom Labels. Deletes an existing Amazon Rekognition Custom Labels dataset. Deleting a dataset might take while. Use DescribeDataset to check the current status. The dataset is still deleting if the value of Status is DELETE_IN_PROGRESS. If you try to access the dataset after it is deleted, you get a ResourceNotFoundException exception. You can't delete a dataset while it is creating (Status = CREATE_IN_PROGRESS) or if the dataset is updating (Status = UPDATE_IN_PROGRESS). This operation requires permissions to perform the rekognition:DeleteDataset 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_dataset
This operation applies only to Amazon Rekognition Custom Labels. Describes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and statistics about the images and labels in a dataset. This operation requires permissions to perform the rekognition:DescribeDataset action.
SELECT
creation_timestamp,
dataset_stats,
last_updated_timestamp,
status,
status_message,
status_message_code
FROM aws.rekognition.datasets
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_dataset
- Manifest
This operation applies only to Amazon Rekognition Custom Labels. Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset. To create a training dataset for a project, specify TRAIN for the value of DatasetType. To create the test dataset for a project, specify TEST for the value of DatasetType. The response from CreateDataset is the Amazon Resource Name (ARN) for the dataset. Creating a dataset takes a while to complete. Use DescribeDataset to check the current status. The dataset created successfully if the value of Status is CREATE_COMPLETE. To check if any non-terminal errors occurred, call ListDatasetEntries and check for the presence of errors lists in the JSON Lines. Dataset creation fails if a terminal error occurs (Status = CREATE_FAILED). Currently, you can't access the terminal error information. For more information, see Creating dataset in the Amazon Rekognition Custom Labels Developer Guide. This operation requires permissions to perform the rekognition:CreateDataset action. If you want to copy an existing dataset, you also require permission to perform the rekognition:ListDatasetEntries action.
INSERT INTO aws.rekognition.datasets (
DatasetSource,
DatasetType,
ProjectArn,
Tags,
region
)
SELECT
'{{ DatasetSource }}',
'{{ DatasetType }}' /* required */,
'{{ ProjectArn }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
dataset_arn
;
# Description fields are for documentation purposes
- name: datasets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the datasets resource.
- name: DatasetSource
description: |
The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify datasetSource, an empty dataset is created. To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries.
value:
GroundTruthManifest:
S3Object:
Bucket: "{{ Bucket }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
DatasetArn: "{{ DatasetArn }}"
- name: DatasetType
value: "{{ DatasetType }}"
description: |
The type of the dataset. Specify TRAIN to create a training dataset. Specify TEST to create a test dataset.
valid_values: ['TRAIN', 'TEST']
- name: ProjectArn
value: "{{ ProjectArn }}"
description: |
The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset.
- name: Tags
value: "{{ Tags }}"
description: |
A set of tags (key-value pairs) that you want to attach to the dataset.
DELETE examples
- delete_dataset
This operation applies only to Amazon Rekognition Custom Labels. Deletes an existing Amazon Rekognition Custom Labels dataset. Deleting a dataset might take while. Use DescribeDataset to check the current status. The dataset is still deleting if the value of Status is DELETE_IN_PROGRESS. If you try to access the dataset after it is deleted, you get a ResourceNotFoundException exception. You can't delete a dataset while it is creating (Status = CREATE_IN_PROGRESS) or if the dataset is updating (Status = UPDATE_IN_PROGRESS). This operation requires permissions to perform the rekognition:DeleteDataset action.
DELETE FROM aws.rekognition.datasets
WHERE region = '{{ region }}' --required
;