Skip to main content

audience_models

Creates, updates, deletes, gets or lists an audience_models resource.

Overview

Nameaudience_models
TypeResource
Idaws.cleanroomsml.audience_models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the audience model. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>)
audience_model_arnstringThe Amazon Resource Name (ARN) of the audience model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:audience-model/[-a-zA-Z0-9_/.]+</code>)
create_timestring (date-time)The time at which the audience model was created.
descriptionstringThe description of the audience model. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>)
kms_key_arnstringThe KMS key ARN used for the audience model. (pattern: <code>arn:aws[-a-z]*:kms:[-a-z0-9]+:[0-9]{12}:key/.+</code>)
statusstringThe status of the audience model. (CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED)
status_detailsobjectDetails about the status of a resource.
tagsobjectThe tags that are assigned to the audience model.
training_data_end_timestring (date-time)The end date specified for the training window.
training_data_start_timestring (date-time)The start date specified for the training window.
training_dataset_arnstringThe Amazon Resource Name (ARN) of the training dataset that was used for this audience model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:training-dataset/[-a-zA-Z0-9_/.]+</code>)
update_timestring (date-time)The most recent time at which the audience model was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_audience_modelselectaudience_model_arn, regionReturns information about an audience model
list_audience_modelsselectregionnextToken, maxResultsReturns a list of audience models.
create_audience_modelinsertregion, name, trainingDatasetArnDefines the information necessary to create an audience model. An audience model is a machine learning model that Clean Rooms ML trains to measure similarity between users. Clean Rooms ML manages training and storing the audience model. The audience model can be used in multiple calls to the StartAudienceGenerationJob API.
delete_audience_modeldeleteaudience_model_arn, regionSpecifies an audience model that you want to delete. You can't delete an audience model if there are any configured audience models that depend on the audience model.

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.

NameDatatypeDescription
audience_model_arnstringThe Amazon Resource Name (ARN) of the audience model that you want to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum size of the results that is returned per call.
nextTokenstringThe token value retrieved from a previous call to access the next page of results.

SELECT examples

Returns information about an audience model

SELECT
name,
audience_model_arn,
create_time,
description,
kms_key_arn,
status,
status_details,
tags,
training_data_end_time,
training_data_start_time,
training_dataset_arn,
update_time
FROM aws.cleanroomsml.audience_models
WHERE audience_model_arn = '{{ audience_model_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Defines the information necessary to create an audience model. An audience model is a machine learning model that Clean Rooms ML trains to measure similarity between users. Clean Rooms ML manages training and storing the audience model. The audience model can be used in multiple calls to the StartAudienceGenerationJob API.

INSERT INTO aws.cleanroomsml.audience_models (
trainingDataStartTime,
trainingDataEndTime,
name,
trainingDatasetArn,
kmsKeyArn,
tags,
description,
region
)
SELECT
'{{ trainingDataStartTime }}',
'{{ trainingDataEndTime }}',
'{{ name }}' /* required */,
'{{ trainingDatasetArn }}' /* required */,
'{{ kmsKeyArn }}',
'{{ tags }}',
'{{ description }}',
'{{ region }}'
RETURNING
audience_model_arn
;

DELETE examples

Specifies an audience model that you want to delete. You can't delete an audience model if there are any configured audience models that depend on the audience model.

DELETE FROM aws.cleanroomsml.audience_models
WHERE audience_model_arn = '{{ audience_model_arn }}' --required
AND region = '{{ region }}' --required
;