2024/07/23 - AWS Clean Rooms ML - 2 updated api methods
Changes Adds SQL query as the source of seed audience for audience generation job.
{'protectedQueryIdentifier': 'string', 'seedAudience': {'sqlParameters': {'analysisTemplateArn': 'string', 'parameters': {'string': 'string'}, 'queryString': 'string'}}}
Returns information about an audience generation job.
See also: AWS API Documentation
Request Syntax
client.get_audience_generation_job( audienceGenerationJobArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the audience generation job that you are interested in.
dict
Response Syntax
{ 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'audienceGenerationJobArn': 'string', 'name': 'string', 'description': 'string', 'status': 'CREATE_PENDING'|'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_PENDING'|'DELETE_IN_PROGRESS'|'DELETE_FAILED', 'statusDetails': { 'statusCode': 'string', 'message': 'string' }, 'configuredAudienceModelArn': 'string', 'seedAudience': { 'dataSource': { 's3Uri': 'string' }, 'roleArn': 'string', 'sqlParameters': { 'queryString': 'string', 'analysisTemplateArn': 'string', 'parameters': { 'string': 'string' } } }, 'includeSeedInOutput': True|False, 'collaborationId': 'string', 'metrics': { 'relevanceMetrics': [ { 'audienceSize': { 'type': 'ABSOLUTE'|'PERCENTAGE', 'value': 123 }, 'score': 123.0 }, ], 'recallMetric': 123.0 }, 'startedBy': 'string', 'tags': { 'string': 'string' }, 'protectedQueryIdentifier': 'string' }
Response Structure
(dict) --
createTime (datetime) --
The time at which the audience generation job was created.
updateTime (datetime) --
The most recent time at which the audience generation job was updated.
audienceGenerationJobArn (string) --
The Amazon Resource Name (ARN) of the audience generation job.
name (string) --
The name of the audience generation job.
description (string) --
The description of the audience generation job.
status (string) --
The status of the audience generation job.
statusDetails (dict) --
Details about the status of the audience generation job.
statusCode (string) --
The status code that was returned. The status code is intended for programmatic error handling. Clean Rooms ML will not change the status code for existing error conditions.
message (string) --
The error message that was returned. The message is intended for human consumption and can change at any time. Use the statusCode for programmatic error handling.
configuredAudienceModelArn (string) --
The Amazon Resource Name (ARN) of the configured audience model used for this audience generation job.
seedAudience (dict) --
The seed audience that was used for this audience generation job. This field will be null if the account calling the API is the account that started this audience generation job.
dataSource (dict) --
Defines the Amazon S3 bucket where the seed audience for the generating audience is stored. A valid data source is a JSON line file in the following format:
{"user_id": "111111"}
{"user_id": "222222"}
...
s3Uri (string) --
The Amazon S3 location URI.
roleArn (string) --
The ARN of the IAM role that can read the Amazon S3 bucket where the seed audience is stored.
sqlParameters (dict) --
The protected SQL query parameters.
queryString (string) --
The query string to be submitted.
analysisTemplateArn (string) --
The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.
parameters (dict) --
The protected query SQL parameters.
(string) --
(string) --
includeSeedInOutput (boolean) --
Configure whether the seed users are included in the output audience. By default, Clean Rooms ML removes seed users from the output audience. If you specify TRUE, the seed users will appear first in the output. Clean Rooms ML does not explicitly reveal whether a user was in the seed, but the recipient of the audience will know that the first minimumSeedSize count of users are from the seed.
collaborationId (string) --
The identifier of the collaboration that this audience generation job is associated with.
metrics (dict) --
The relevance scores for different audience sizes and the recall score of the generated audience.
relevanceMetrics (list) --
The relevance scores of the generated audience.
(dict) --
The relevance score of a generated audience.
audienceSize (dict) --
The size of the generated audience. Must match one of the sizes in the configured audience model.
type (string) --
Whether the audience size is defined in absolute terms or as a percentage. You can use the ABSOLUTE AudienceSize to configure out audience sizes using the count of identifiers in the output. You can use the Percentage AudienceSize to configure sizes in the range 1-100 percent.
value (integer) --
Specify an audience size value.
score (float) --
The relevance score of the generated audience.
recallMetric (float) --
The recall score of the generated audience. Recall is the percentage of the most similar users (by default, the most similar 20%) from a sample of the training data that are included in the seed audience by the audience generation job. Values range from 0-1, larger values indicate a better audience. A recall value approximately equal to the maximum bin size indicates that the audience model is equivalent to random selection.
startedBy (string) --
The AWS account that started this audience generation job.
tags (dict) --
The tags that are associated to this audience generation job.
(string) --
(string) --
protectedQueryIdentifier (string) --
The unique identifier of the protected query for this audience generation job.
{'seedAudience': {'sqlParameters': {'analysisTemplateArn': 'string', 'parameters': {'string': 'string'}, 'queryString': 'string'}}}
Information necessary to start the audience generation job.
See also: AWS API Documentation
Request Syntax
client.start_audience_generation_job( name='string', configuredAudienceModelArn='string', seedAudience={ 'dataSource': { 's3Uri': 'string' }, 'roleArn': 'string', 'sqlParameters': { 'queryString': 'string', 'analysisTemplateArn': 'string', 'parameters': { 'string': 'string' } } }, includeSeedInOutput=True|False, collaborationId='string', description='string', tags={ 'string': 'string' } )
string
[REQUIRED]
The name of the audience generation job.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the configured audience model that is used for this audience generation job.
dict
[REQUIRED]
The seed audience that is used to generate the audience.
dataSource (dict) --
Defines the Amazon S3 bucket where the seed audience for the generating audience is stored. A valid data source is a JSON line file in the following format:
{"user_id": "111111"}
{"user_id": "222222"}
...
s3Uri (string) -- [REQUIRED]
The Amazon S3 location URI.
roleArn (string) -- [REQUIRED]
The ARN of the IAM role that can read the Amazon S3 bucket where the seed audience is stored.
sqlParameters (dict) --
The protected SQL query parameters.
queryString (string) --
The query string to be submitted.
analysisTemplateArn (string) --
The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.
parameters (dict) --
The protected query SQL parameters.
(string) --
(string) --
boolean
Whether the seed audience is included in the audience generation output.
string
The identifier of the collaboration that contains the audience generation job.
string
The description of the audience generation job.
dict
The optional metadata that you apply to the resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50.
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8.
Maximum value length - 256 Unicode characters in UTF-8.
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case sensitive.
Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.
(string) --
(string) --
dict
Response Syntax
{ 'audienceGenerationJobArn': 'string' }
Response Structure
(dict) --
audienceGenerationJobArn (string) --
The Amazon Resource Name (ARN) of the audience generation job.