flywheels
Creates, updates, deletes or gets a flywheel resource or lists flywheels in a region
Overview
| Name | flywheels |
| Type | Resource |
| Description | The AWS::Comprehend::Flywheel resource creates an Amazon Comprehend Flywheel that enables customer to train their model. |
| Id | awscc.comprehend.flywheels |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
active_model_arn | string | |
data_access_role_arn | string | |
data_lake_s3_uri | string | |
data_security_config | object | |
flywheel_name | string | |
model_type | string | |
tags | array | |
task_config | object | |
arn | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::Comprehend::Flywheel.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | flywheels | INSERT | FlywheelName, DataAccessRoleArn, DataLakeS3Uri, region |
delete_resource | flywheels | DELETE | Identifier, region |
update_resource | flywheels | UPDATE | Identifier, PatchDocument, region |
list_resources | flywheels_list_only | SELECT | region |
get_resource | flywheels | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual flywheel.
SELECT
region,
active_model_arn,
data_access_role_arn,
data_lake_s3_uri,
data_security_config,
flywheel_name,
model_type,
tags,
task_config,
arn
FROM awscc.comprehend.flywheels
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all flywheels in a region.
SELECT
region,
arn
FROM awscc.comprehend.flywheels_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new flywheel resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.comprehend.flywheels (
DataAccessRoleArn,
DataLakeS3Uri,
FlywheelName,
region
)
SELECT
'{{ data_access_role_arn }}',
'{{ data_lake_s3_uri }}',
'{{ flywheel_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.comprehend.flywheels (
ActiveModelArn,
DataAccessRoleArn,
DataLakeS3Uri,
DataSecurityConfig,
FlywheelName,
ModelType,
Tags,
TaskConfig,
region
)
SELECT
'{{ active_model_arn }}',
'{{ data_access_role_arn }}',
'{{ data_lake_s3_uri }}',
'{{ data_security_config }}',
'{{ flywheel_name }}',
'{{ model_type }}',
'{{ tags }}',
'{{ task_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: flywheel
props:
- name: active_model_arn
value: '{{ active_model_arn }}'
- name: data_access_role_arn
value: '{{ data_access_role_arn }}'
- name: data_lake_s3_uri
value: '{{ data_lake_s3_uri }}'
- name: data_security_config
value:
model_kms_key_id: '{{ model_kms_key_id }}'
volume_kms_key_id: null
data_lake_kms_key_id: null
vpc_config:
security_group_ids:
- '{{ security_group_ids[0] }}'
subnets:
- '{{ subnets[0] }}'
- name: flywheel_name
value: '{{ flywheel_name }}'
- name: model_type
value: '{{ model_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: task_config
value:
language_code: '{{ language_code }}'
document_classification_config:
mode: '{{ mode }}'
labels:
- '{{ labels[0] }}'
entity_recognition_config:
entity_types:
- type: '{{ type }}'
UPDATE example
Use the following StackQL query and manifest file to update a flywheel resource, using stack-deploy.
/*+ update */
UPDATE awscc.comprehend.flywheels
SET PatchDocument = string('{{ {
"ActiveModelArn": active_model_arn,
"DataAccessRoleArn": data_access_role_arn,
"DataSecurityConfig": data_security_config,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.comprehend.flywheels
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the flywheels resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:PassRole,
comprehend:CreateFlywheel,
comprehend:DescribeFlywheel,
comprehend:ListTagsForResource
comprehend:DescribeFlywheel,
comprehend:ListTagsForResource
iam:PassRole,
comprehend:DescribeFlywheel,
comprehend:UpdateFlywheel,
comprehend:ListTagsForResource,
comprehend:TagResource,
comprehend:UntagResource
comprehend:DeleteFlywheel,
comprehend:DescribeFlywheel
comprehend:ListFlywheels