Skip to main content

training_datasets

Creates, updates, deletes or gets a training_dataset resource or lists training_datasets in a region

Overview

Nametraining_datasets
TypeResource
DescriptionDefinition of AWS::CleanRoomsML::TrainingDataset Resource Type
Idawscc.cleanroomsml.training_datasets

Fields

NameDatatypeDescription
descriptionstring
namestring
role_arnstring
tagsarrayAn arbitrary set of tags (key-value pairs) for this cleanrooms-ml training dataset.
training_dataarray
training_dataset_arnstring
statusstring
regionstringAWS region.

For more information, see AWS::CleanRoomsML::TrainingDataset.

Methods

NameResourceAccessible byRequired Params
create_resourcetraining_datasetsINSERTName, RoleArn, TrainingData, region
delete_resourcetraining_datasetsDELETEIdentifier, region
update_resourcetraining_datasetsUPDATEIdentifier, PatchDocument, region
list_resourcestraining_datasets_list_onlySELECTregion
get_resourcetraining_datasetsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual training_dataset.

SELECT
region,
description,
name,
role_arn,
tags,
training_data,
training_dataset_arn,
status
FROM awscc.cleanroomsml.training_datasets
WHERE
region = '{{ region }}' AND
Identifier = '{{ training_dataset_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new training_dataset resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.cleanroomsml.training_datasets (
Name,
RoleArn,
TrainingData,
region
)
SELECT
'{{ name }}',
'{{ role_arn }}',
'{{ training_data }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a training_dataset resource, using stack-deploy.

/*+ update */
UPDATE awscc.cleanroomsml.training_datasets
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ training_dataset_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.cleanroomsml.training_datasets
WHERE
Identifier = '{{ training_dataset_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:

ParameterDescription
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 training_datasets resource, the following permissions are required:

cleanrooms-ml:CreateTrainingDataset,
cleanrooms-ml:GetTrainingDataset,
cleanrooms-ml:TagResource,
iam:PassRole