Skip to content

Commit 46ea196

Browse files
author
awstools
committedApr 3, 2024
feat(client-cleanroomsml): The release includes a public SDK for AWS Clean Rooms ML APIs, making them globally available to developers worldwide.
1 parent 2cc8c1c commit 46ea196

15 files changed

+55
-180
lines changed
 

‎clients/client-cleanroomsml/src/commands/CreateAudienceModelCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface CreateAudienceModelCommandOutput extends CreateAudienceModelRes
6363
* <p>You do not have sufficient access to perform this action.</p>
6464
*
6565
* @throws {@link ConflictException} (client fault)
66-
* <p>A resource with that name already exists in this region.</p>
66+
* <p>You can't complete this action because another resource depends on this resource.</p>
6767
*
6868
* @throws {@link ResourceNotFoundException} (client fault)
6969
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/CreateConfiguredAudienceModelCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export interface CreateConfiguredAudienceModelCommandOutput
8484
* <p>You do not have sufficient access to perform this action.</p>
8585
*
8686
* @throws {@link ConflictException} (client fault)
87-
* <p>A resource with that name already exists in this region.</p>
87+
* <p>You can't complete this action because another resource depends on this resource.</p>
8888
*
8989
* @throws {@link ResourceNotFoundException} (client fault)
9090
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/CreateTrainingDatasetCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface CreateTrainingDatasetCommandInput extends CreateTrainingDataset
2727
export interface CreateTrainingDatasetCommandOutput extends CreateTrainingDatasetResponse, __MetadataBearer {}
2828

2929
/**
30-
* <p>Defines the information necessary to create a training dataset, or seed audience. In Clean Rooms ML, the <code>TrainingDataset</code> is metadata that points to a Glue table, which is read only during <code>AudienceModel</code> creation.</p>
30+
* <p>Defines the information necessary to create a training dataset. In Clean Rooms ML, the <code>TrainingDataset</code> is metadata that points to a Glue table, which is read only during <code>AudienceModel</code> creation.</p>
3131
* @example
3232
* Use a bare-bones client and the command you need to make an API call.
3333
* ```javascript
@@ -82,7 +82,7 @@ export interface CreateTrainingDatasetCommandOutput extends CreateTrainingDatase
8282
* <p>You do not have sufficient access to perform this action.</p>
8383
*
8484
* @throws {@link ConflictException} (client fault)
85-
* <p>A resource with that name already exists in this region.</p>
85+
* <p>You can't complete this action because another resource depends on this resource.</p>
8686
*
8787
* @throws {@link ValidationException} (client fault)
8888
* <p>The request parameters for this request are incorrect.</p>

‎clients/client-cleanroomsml/src/commands/DeleteAudienceGenerationJobCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface DeleteAudienceGenerationJobCommandOutput extends __MetadataBear
5656
* <p>You do not have sufficient access to perform this action.</p>
5757
*
5858
* @throws {@link ConflictException} (client fault)
59-
* <p>A resource with that name already exists in this region.</p>
59+
* <p>You can't complete this action because another resource depends on this resource.</p>
6060
*
6161
* @throws {@link ResourceNotFoundException} (client fault)
6262
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/DeleteAudienceModelCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface DeleteAudienceModelCommandOutput extends __MetadataBearer {}
5353
* <p>You do not have sufficient access to perform this action.</p>
5454
*
5555
* @throws {@link ConflictException} (client fault)
56-
* <p>A resource with that name already exists in this region.</p>
56+
* <p>You can't complete this action because another resource depends on this resource.</p>
5757
*
5858
* @throws {@link ResourceNotFoundException} (client fault)
5959
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/DeleteConfiguredAudienceModelCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface DeleteConfiguredAudienceModelCommandOutput extends __MetadataBe
5656
* <p>You do not have sufficient access to perform this action.</p>
5757
*
5858
* @throws {@link ConflictException} (client fault)
59-
* <p>A resource with that name already exists in this region.</p>
59+
* <p>You can't complete this action because another resource depends on this resource.</p>
6060
*
6161
* @throws {@link ResourceNotFoundException} (client fault)
6262
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/DeleteTrainingDatasetCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface DeleteTrainingDatasetCommandOutput extends __MetadataBearer {}
5353
* <p>You do not have sufficient access to perform this action.</p>
5454
*
5555
* @throws {@link ConflictException} (client fault)
56-
* <p>A resource with that name already exists in this region.</p>
56+
* <p>You can't complete this action because another resource depends on this resource.</p>
5757
*
5858
* @throws {@link ResourceNotFoundException} (client fault)
5959
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/GetAudienceGenerationJobCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface GetAudienceGenerationJobCommandOutput extends GetAudienceGenera
6969
* // score: Number("double"),
7070
* // },
7171
* // ],
72+
* // recallMetric: Number("double"),
7273
* // },
7374
* // startedBy: "STRING_VALUE",
7475
* // tags: { // TagMap

‎clients/client-cleanroomsml/src/commands/GetAudienceModelCommand.ts

-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ export interface GetAudienceModelCommandOutput extends GetAudienceModelResponse,
5252
* // statusCode: "STRING_VALUE",
5353
* // message: "STRING_VALUE",
5454
* // },
55-
* // metrics: [ // AudienceModelMetrics
56-
* // { // AudienceModelMetric
57-
* // type: "NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN" || "MEAN_RECIPROCAL_RANK" || "PRECISION" || "RECALL", // required
58-
* // forTopKItemPredictions: Number("int"), // required
59-
* // value: Number("double"), // required
60-
* // },
61-
* // ],
6255
* // kmsKeyArn: "STRING_VALUE",
6356
* // tags: { // TagMap
6457
* // "<keys>": "STRING_VALUE",

‎clients/client-cleanroomsml/src/commands/StartAudienceExportJobCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface StartAudienceExportJobCommandOutput extends __MetadataBearer {}
5959
* <p>You do not have sufficient access to perform this action.</p>
6060
*
6161
* @throws {@link ConflictException} (client fault)
62-
* <p>A resource with that name already exists in this region.</p>
62+
* <p>You can't complete this action because another resource depends on this resource.</p>
6363
*
6464
* @throws {@link ResourceNotFoundException} (client fault)
6565
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/StartAudienceGenerationJobCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface StartAudienceGenerationJobCommandOutput extends StartAudienceGe
6868
* <p>You do not have sufficient access to perform this action.</p>
6969
*
7070
* @throws {@link ConflictException} (client fault)
71-
* <p>A resource with that name already exists in this region.</p>
71+
* <p>You can't complete this action because another resource depends on this resource.</p>
7272
*
7373
* @throws {@link ResourceNotFoundException} (client fault)
7474
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/commands/UpdateConfiguredAudienceModelCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface UpdateConfiguredAudienceModelCommandOutput
8080
* <p>You do not have sufficient access to perform this action.</p>
8181
*
8282
* @throws {@link ConflictException} (client fault)
83-
* <p>A resource with that name already exists in this region.</p>
83+
* <p>You can't complete this action because another resource depends on this resource.</p>
8484
*
8585
* @throws {@link ResourceNotFoundException} (client fault)
8686
* <p>The resource you are requesting does not exist.</p>

‎clients/client-cleanroomsml/src/models/models_0.ts

+25-55
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class ValidationException extends __BaseException {
236236
}
237237

238238
/**
239-
* <p>A resource with that name already exists in this region.</p>
239+
* <p>You can't complete this action because another resource depends on this resource.</p>
240240
* @public
241241
*/
242242
export class ConflictException extends __BaseException {
@@ -374,15 +374,31 @@ export interface AudienceQualityMetrics {
374374
* @public
375375
*/
376376
relevanceMetrics: RelevanceMetric[] | undefined;
377+
378+
/**
379+
* <p>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.
380+
* </p>
381+
* @public
382+
*/
383+
recallMetric?: number;
377384
}
378385

379386
/**
380-
* <p>Defines the Amazon S3 bucket where the training data for the configured audience is stored.</p>
387+
* <p>Defines the Amazon S3 bucket where the seed audience for the generating audience is stored.</p>
381388
* @public
382389
*/
383390
export interface AudienceGenerationJobDataSource {
384391
/**
385-
* <p>The Amazon S3 bucket where the training data for the configured audience is stored.</p>
392+
* <p>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:</p>
393+
* <p>
394+
* <code>\{"user_id": "111111"\}</code>
395+
* </p>
396+
* <p>
397+
* <code>\{"user_id": "222222"\}</code>
398+
* </p>
399+
* <p>
400+
* <code>...</code>
401+
* </p>
386402
* @public
387403
*/
388404
dataSource: S3ConfigMap | undefined;
@@ -485,7 +501,7 @@ export interface GetAudienceGenerationJobResponse {
485501
collaborationId?: string;
486502

487503
/**
488-
* <p>The relevance scores for different audience sizes. </p>
504+
* <p>The relevance scores for different audience sizes and the recall score of the generated audience. </p>
489505
* @public
490506
*/
491507
metrics?: AudienceQualityMetrics;
@@ -672,7 +688,7 @@ export interface StartAudienceGenerationJobRequest {
672688
* <p>Tag keys and values are case sensitive.</p>
673689
* </li>
674690
* <li>
675-
* <p>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 Forecast 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.</p>
691+
* <p>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.</p>
676692
* </li>
677693
* </ul>
678694
* @public
@@ -748,7 +764,7 @@ export interface CreateAudienceModelRequest {
748764
* <p>Tag keys and values are case sensitive.</p>
749765
* </li>
750766
* <li>
751-
* <p>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 Forecast 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.</p>
767+
* <p>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.</p>
752768
* </li>
753769
* </ul>
754770
* @public
@@ -795,46 +811,6 @@ export interface GetAudienceModelRequest {
795811
audienceModelArn: string | undefined;
796812
}
797813

798-
/**
799-
* @public
800-
* @enum
801-
*/
802-
export const AudienceModelMetricType = {
803-
MEAN_RECIPROCAL_RANK: "MEAN_RECIPROCAL_RANK",
804-
NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN: "NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN",
805-
PRECISION: "PRECISION",
806-
RECALL: "RECALL",
807-
} as const;
808-
809-
/**
810-
* @public
811-
*/
812-
export type AudienceModelMetricType = (typeof AudienceModelMetricType)[keyof typeof AudienceModelMetricType];
813-
814-
/**
815-
* <p>The audience model metrics.</p>
816-
* @public
817-
*/
818-
export interface AudienceModelMetric {
819-
/**
820-
* <p>The audience model metric.</p>
821-
* @public
822-
*/
823-
type: AudienceModelMetricType | undefined;
824-
825-
/**
826-
* <p>The number of users that were used to generate these model metrics.</p>
827-
* @public
828-
*/
829-
forTopKItemPredictions: number | undefined;
830-
831-
/**
832-
* <p>The value of the audience model metric</p>
833-
* @public
834-
*/
835-
value: number | undefined;
836-
}
837-
838814
/**
839815
* @public
840816
* @enum
@@ -912,12 +888,6 @@ export interface GetAudienceModelResponse {
912888
*/
913889
statusDetails?: StatusDetails;
914890

915-
/**
916-
* <p>Accuracy metrics for the model.</p>
917-
* @public
918-
*/
919-
metrics?: AudienceModelMetric[];
920-
921891
/**
922892
* <p>The KMS key ARN used for the audience model.</p>
923893
* @public
@@ -1120,7 +1090,7 @@ export interface CreateConfiguredAudienceModelRequest {
11201090
sharedAudienceMetrics: SharedAudienceMetrics[] | undefined;
11211091

11221092
/**
1123-
* <p>The minimum number of users from the seed audience that must match with users in the training data of the audience model.</p>
1093+
* <p>The minimum number of users from the seed audience that must match with users in the training data of the audience model. The default value is 500.</p>
11241094
* @public
11251095
*/
11261096
minMatchingSeedSize?: number;
@@ -1156,7 +1126,7 @@ export interface CreateConfiguredAudienceModelRequest {
11561126
* <p>Tag keys and values are case sensitive.</p>
11571127
* </li>
11581128
* <li>
1159-
* <p>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 Forecast 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.</p>
1129+
* <p>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.</p>
11601130
* </li>
11611131
* </ul>
11621132
* @public
@@ -1609,7 +1579,7 @@ export interface TagResourceRequest {
16091579
* <p>Tag keys and values are case sensitive.</p>
16101580
* </li>
16111581
* <li>
1612-
* <p>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 Forecast 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.</p>
1582+
* <p>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 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.</p>
16131583
* </li>
16141584
* </ul>
16151585
* @public

‎clients/client-cleanroomsml/src/protocols/Aws_restJson1.ts

+1-25
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ import {
117117
AudienceExportJobSummary,
118118
AudienceGenerationJobDataSource,
119119
AudienceGenerationJobSummary,
120-
AudienceModelMetric,
121120
AudienceModelSummary,
122121
AudienceQualityMetrics,
123122
AudienceSize,
@@ -850,7 +849,6 @@ export const de_GetAudienceModelCommand = async (
850849
createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
851850
description: __expectString,
852851
kmsKeyArn: __expectString,
853-
metrics: (_) => de_AudienceModelMetrics(_, context),
854852
name: __expectString,
855853
status: __expectString,
856854
statusDetails: _json,
@@ -1433,29 +1431,6 @@ const de_AudienceModelList = (output: any, context: __SerdeContext): AudienceMod
14331431
return retVal;
14341432
};
14351433

1436-
/**
1437-
* deserializeAws_restJson1AudienceModelMetric
1438-
*/
1439-
const de_AudienceModelMetric = (output: any, context: __SerdeContext): AudienceModelMetric => {
1440-
return take(output, {
1441-
forTopKItemPredictions: __expectInt32,
1442-
type: __expectString,
1443-
value: __limitedParseDouble,
1444-
}) as any;
1445-
};
1446-
1447-
/**
1448-
* deserializeAws_restJson1AudienceModelMetrics
1449-
*/
1450-
const de_AudienceModelMetrics = (output: any, context: __SerdeContext): AudienceModelMetric[] => {
1451-
const retVal = (output || [])
1452-
.filter((e: any) => e != null)
1453-
.map((entry: any) => {
1454-
return de_AudienceModelMetric(entry, context);
1455-
});
1456-
return retVal;
1457-
};
1458-
14591434
/**
14601435
* deserializeAws_restJson1AudienceModelSummary
14611436
*/
@@ -1476,6 +1451,7 @@ const de_AudienceModelSummary = (output: any, context: __SerdeContext): Audience
14761451
*/
14771452
const de_AudienceQualityMetrics = (output: any, context: __SerdeContext): AudienceQualityMetrics => {
14781453
return take(output, {
1454+
recallMetric: __limitedParseDouble,
14791455
relevanceMetrics: (_: any) => de_RelevanceMetrics(_, context),
14801456
}) as any;
14811457
};

‎codegen/sdk-codegen/aws-models/cleanroomsml.json

+17-82
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.