flywheels
Creates, updates, deletes, gets or lists a flywheels resource.
Overview
| Name | flywheels |
| Type | Resource |
| Id | aws.comprehend.flywheels |
Fields
The following fields are returned by SELECT queries:
- describe_flywheel
- list_flywheels
| Name | Datatype | Description |
|---|---|---|
active_model_arn | string | The Amazon Resource Number (ARN) of the active model version. (pattern: <code>arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-[a-zA-Z0-9])(/version/[a-zA-Z0-9](-[a-zA-Z0-9])*)?</code>) |
creation_time | string (date-time) | Creation time of the flywheel. |
data_access_role_arn | string | The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data. (pattern: <code>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+</code>) |
data_lake_s3_uri | string | Amazon S3 URI of the data lake location. (pattern: <code>s3://[a-z0-9][.-a-z0-9]{1,61}[a-z0-9](/.*)?</code>) |
data_security_config | object | Data security configuration. |
flywheel_arn | string | The Amazon Resource Number (ARN) of the flywheel. (pattern: <code>arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]:[0-9]{12}:flywheel/[a-zA-Z0-9](-[a-zA-Z0-9])*</code>) |
last_modified_time | string (date-time) | Last modified time for the flywheel. |
latest_flywheel_iteration | string | The most recent flywheel iteration. (pattern: <code>[0-9]{8}T[0-9]{6}Z</code>) |
message | string | A description of the status of the flywheel. |
model_type | string | Model type of the flywheel's model. (DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER) |
status | string | The status of the flywheel. (CREATING, ACTIVE, UPDATING, DELETING, FAILED) |
task_config | object | Configuration about the model associated with a flywheel. |
| Name | Datatype | Description |
|---|---|---|
flywheel_summary_list | array | A list of flywheel properties retrieved by the service in response to the request. |
next_token | string | Identifies the next page of results to return. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_flywheel | select | region | Provides configuration information about the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide. | |
list_flywheels | select | region | Gets a list of the flywheels that you have created. | |
create_flywheel | insert | region, FlywheelName, DataAccessRoleArn, DataLakeS3Uri | A flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model. When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model. To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake. To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide. | |
update_flywheel | update | region, FlywheelArn | Update the configuration information for an existing flywheel. | |
delete_flywheel | delete | region | Deletes a flywheel. When you delete the flywheel, Amazon Comprehend does not delete the data lake or the model associated with the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide. | |
start_flywheel_iteration | exec | region, FlywheelArn | Start the flywheel iteration.This operation uses any new datasets to train a new model version. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide. |
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_flywheel
- list_flywheels
Provides configuration information about the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
SELECT
active_model_arn,
creation_time,
data_access_role_arn,
data_lake_s3_uri,
data_security_config,
flywheel_arn,
last_modified_time,
latest_flywheel_iteration,
message,
model_type,
status,
task_config
FROM aws.comprehend.flywheels
WHERE region = '{{ region }}' -- required
;
Gets a list of the flywheels that you have created.
SELECT
flywheel_summary_list,
next_token
FROM aws.comprehend.flywheels
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_flywheel
- Manifest
A flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model. When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model. To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake. To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
INSERT INTO aws.comprehend.flywheels (
FlywheelName,
ActiveModelArn,
DataAccessRoleArn,
TaskConfig,
ModelType,
DataLakeS3Uri,
DataSecurityConfig,
ClientRequestToken,
Tags,
region
)
SELECT
'{{ FlywheelName }}' /* required */,
'{{ ActiveModelArn }}',
'{{ DataAccessRoleArn }}' /* required */,
'{{ TaskConfig }}',
'{{ ModelType }}',
'{{ DataLakeS3Uri }}' /* required */,
'{{ DataSecurityConfig }}',
'{{ ClientRequestToken }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
active_model_arn,
flywheel_arn
;
# Description fields are for documentation purposes
- name: flywheels
props:
- name: region
value: "{{ region }}"
description: Required parameter for the flywheels resource.
- name: FlywheelName
value: "{{ FlywheelName }}"
description: |
Name for the flywheel.
- name: ActiveModelArn
value: "{{ ActiveModelArn }}"
description: |
To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version. Do not set TaskConfig or ModelType if you specify an ActiveModelArn.
- name: DataAccessRoleArn
value: "{{ DataAccessRoleArn }}"
description: |
The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend the permissions required to access the flywheel data in the data lake.
- name: TaskConfig
description: |
Configuration about the model associated with the flywheel. You need to set TaskConfig if you are creating a flywheel for a new model.
value:
LanguageCode: "{{ LanguageCode }}"
DocumentClassificationConfig:
Mode: "{{ Mode }}"
Labels:
- "{{ Labels }}"
EntityRecognitionConfig:
EntityTypes:
- Type: "{{ Type }}"
- name: ModelType
value: "{{ ModelType }}"
description: |
The model type. You need to set ModelType if you are creating a flywheel for a new model.
valid_values: ['DOCUMENT_CLASSIFIER', 'ENTITY_RECOGNIZER']
- name: DataLakeS3Uri
value: "{{ DataLakeS3Uri }}"
description: |
Enter the S3 location for the data lake. You can specify a new S3 bucket or a new folder of an existing S3 bucket. The flywheel creates the data lake at this location.
- name: DataSecurityConfig
description: |
Data security configurations.
value:
ModelKmsKeyId: "{{ ModelKmsKeyId }}"
VolumeKmsKeyId: "{{ VolumeKmsKeyId }}"
DataLakeKmsKeyId: "{{ DataLakeKmsKeyId }}"
VpcConfig:
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
Subnets:
- "{{ Subnets }}"
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
- name: Tags
description: |
The tags to associate with this flywheel.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_flywheel
Update the configuration information for an existing flywheel.
UPDATE aws.comprehend.flywheels
SET
FlywheelArn = '{{ FlywheelArn }}',
ActiveModelArn = '{{ ActiveModelArn }}',
DataAccessRoleArn = '{{ DataAccessRoleArn }}',
DataSecurityConfig = '{{ DataSecurityConfig }}'
WHERE
region = '{{ region }}' --required
AND FlywheelArn = '{{ FlywheelArn }}' --required
RETURNING
flywheel_properties;
DELETE examples
- delete_flywheel
Deletes a flywheel. When you delete the flywheel, Amazon Comprehend does not delete the data lake or the model associated with the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
DELETE FROM aws.comprehend.flywheels
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- start_flywheel_iteration
Start the flywheel iteration.This operation uses any new datasets to train a new model version. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
EXEC aws.comprehend.flywheels.start_flywheel_iteration
@region='{{ region }}' --required
@@json=
'{
"FlywheelArn": "{{ FlywheelArn }}",
"ClientRequestToken": "{{ ClientRequestToken }}"
}'
;