audience_models
Creates, updates, deletes, gets or lists an audience_models resource.
Overview
| Name | audience_models |
| Type | Resource |
| Id | aws.cleanroomsml.audience_models |
Fields
The following fields are returned by SELECT queries:
- get_audience_model
- list_audience_models
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the audience model. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
audience_model_arn | string | The 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_time | string (date-time) | The time at which the audience model was created. |
description | string | The description of the audience model. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
kms_key_arn | string | The KMS key ARN used for the audience model. (pattern: <code>arn:aws[-a-z]*:kms:[-a-z0-9]+:[0-9]{12}:key/.+</code>) |
status | string | The status of the audience model. (CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED) |
status_details | object | Details about the status of a resource. |
tags | object | The tags that are assigned to the audience model. |
training_data_end_time | string (date-time) | The end date specified for the training window. |
training_data_start_time | string (date-time) | The start date specified for the training window. |
training_dataset_arn | string | The 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_time | string (date-time) | The most recent time at which the audience model was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the audience model. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
audience_model_arn | string | The 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_time | string (date-time) | The time at which the audience model was created. |
description | string | The description of the audience model. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
status | string | The status of the audience model. (CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED) |
training_dataset_arn | string | The Amazon Resource Name (ARN) of the training dataset that was used for the audience model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:training-dataset/[-a-zA-Z0-9_/.]+</code>) |
update_time | string (date-time) | The most recent time at which the audience model was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_audience_model | select | audience_model_arn, region | Returns information about an audience model | |
list_audience_models | select | region | nextToken, maxResults | Returns a list of audience models. |
create_audience_model | insert | region, name, trainingDatasetArn | 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. | |
delete_audience_model | delete | audience_model_arn, region | 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. |
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 |
|---|---|---|
audience_model_arn | string | The Amazon Resource Name (ARN) of the audience model that you want to delete. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum size of the results that is returned per call. |
nextToken | string | The token value retrieved from a previous call to access the next page of results. |
SELECT examples
- get_audience_model
- list_audience_models
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
;
Returns a list of audience models.
SELECT
name,
audience_model_arn,
create_time,
description,
status,
training_dataset_arn,
update_time
FROM aws.cleanroomsml.audience_models
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_audience_model
- Manifest
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
;
# Description fields are for documentation purposes
- name: audience_models
props:
- name: region
value: "{{ region }}"
description: Required parameter for the audience_models resource.
- name: trainingDataStartTime
value: "{{ trainingDataStartTime }}"
- name: trainingDataEndTime
value: "{{ trainingDataEndTime }}"
- name: name
value: "{{ name }}"
- name: trainingDatasetArn
value: "{{ trainingDatasetArn }}"
- name: kmsKeyArn
value: "{{ kmsKeyArn }}"
- name: tags
value: "{{ tags }}"
- name: description
value: "{{ description }}"
DELETE examples
- delete_audience_model
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
;