training_datasets
Creates, updates, deletes or gets a training_dataset
resource or lists training_datasets
in a region
Overview
Name | training_datasets |
Type | Resource |
Description | Definition of AWS::CleanRoomsML::TrainingDataset Resource Type |
Id | aws.cleanroomsml.training_datasets |
Fields
Name | Datatype | Description |
---|---|---|
description | string | |
name | string | |
role_arn | string | |
tags | array | An arbitrary set of tags (key-value pairs) for this cleanrooms-ml training dataset. |
training_data | array | |
training_dataset_arn | string | |
status | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, RoleArn, TrainingData, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all training_datasets
in a region.
SELECT
region,
description,
name,
role_arn,
tags,
training_data,
training_dataset_arn,
status
FROM aws.cleanroomsml.training_datasets
WHERE region = 'us-east-1';
Gets all properties from an individual training_dataset
.
SELECT
region,
description,
name,
role_arn,
tags,
training_data,
training_dataset_arn,
status
FROM aws.cleanroomsml.training_datasets
WHERE region = 'us-east-1' AND data__Identifier = '<TrainingDatasetArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new training_dataset
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cleanroomsml.training_datasets (
Name,
RoleArn,
TrainingData,
region
)
SELECT
'{{ Name }}',
'{{ RoleArn }}',
'{{ TrainingData }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cleanroomsml.training_datasets (
Description,
Name,
RoleArn,
Tags,
TrainingData,
region
)
SELECT
'{{ Description }}',
'{{ Name }}',
'{{ RoleArn }}',
'{{ Tags }}',
'{{ TrainingData }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: training_dataset
props:
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: TrainingData
value:
- Type: '{{ Type }}'
InputConfig:
Schema:
- ColumnName: '{{ ColumnName }}'
ColumnTypes:
- '{{ ColumnTypes[0] }}'
DataSource:
GlueDataSource:
TableName: '{{ TableName }}'
DatabaseName: '{{ DatabaseName }}'
CatalogId: '{{ CatalogId }}'
DELETE
example
/*+ delete */
DELETE FROM aws.cleanroomsml.training_datasets
WHERE data__Identifier = '<TrainingDatasetArn>'
AND region = 'us-east-1';
Permissions
To operate on the training_datasets
resource, the following permissions are required:
Create
cleanrooms-ml:CreateTrainingDataset,
cleanrooms-ml:GetTrainingDataset,
cleanrooms-ml:TagResource,
iam:PassRole
Read
cleanrooms-ml:GetTrainingDataset
Delete
cleanrooms-ml:DeleteTrainingDataset
List
cleanrooms-ml:ListTrainingDatasets
Update
cleanrooms-ml:TagResource,
cleanrooms-ml:UntagResource