Skip to content

Commit 119c1d2

Browse files
author
awstools
committed
feat(client-cleanroomsml): Add support for SQL compute configuration for StartAudienceGenerationJob API.
1 parent 104dcc7 commit 119c1d2

File tree

4 files changed

+94
-72
lines changed

4 files changed

+94
-72
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ export interface GetAudienceGenerationJobCommandOutput extends GetAudienceGenera
6868
* // "<keys>": "STRING_VALUE",
6969
* // },
7070
* // },
71+
* // sqlComputeConfiguration: { // ComputeConfiguration Union: only one key present
72+
* // worker: { // WorkerComputeConfiguration
73+
* // type: "CR.1X" || "CR.4X",
74+
* // number: Number("int"),
75+
* // },
76+
* // },
7177
* // },
7278
* // includeSeedInOutput: true || false,
7379
* // collaborationId: "STRING_VALUE",

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

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export interface StartAudienceGenerationJobCommandOutput extends StartAudienceGe
5454
* "<keys>": "STRING_VALUE",
5555
* },
5656
* },
57+
* sqlComputeConfiguration: { // ComputeConfiguration Union: only one key present
58+
* worker: { // WorkerComputeConfiguration
59+
* type: "CR.1X" || "CR.4X",
60+
* number: Number("int"),
61+
* },
62+
* },
5763
* },
5864
* includeSeedInOutput: true || false,
5965
* collaborationId: "STRING_VALUE",

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

+78-71
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,76 @@ export interface AudienceQualityMetrics {
383383
recallMetric?: number | undefined;
384384
}
385385

386+
/**
387+
* @public
388+
* @enum
389+
*/
390+
export const WorkerComputeType = {
391+
CR1X: "CR.1X",
392+
CR4X: "CR.4X",
393+
} as const;
394+
395+
/**
396+
* @public
397+
*/
398+
export type WorkerComputeType = (typeof WorkerComputeType)[keyof typeof WorkerComputeType];
399+
400+
/**
401+
* <p>Configuration information about the compute workers that perform the transform job.</p>
402+
* @public
403+
*/
404+
export interface WorkerComputeConfiguration {
405+
/**
406+
* <p>The instance type of the compute workers that are used.</p>
407+
* @public
408+
*/
409+
type?: WorkerComputeType | undefined;
410+
411+
/**
412+
* <p>The number of compute workers that are used.</p>
413+
* @public
414+
*/
415+
number?: number | undefined;
416+
}
417+
418+
/**
419+
* <p>Provides configuration information for the instances that will perform the compute work.</p>
420+
* @public
421+
*/
422+
export type ComputeConfiguration = ComputeConfiguration.WorkerMember | ComputeConfiguration.$UnknownMember;
423+
424+
/**
425+
* @public
426+
*/
427+
export namespace ComputeConfiguration {
428+
/**
429+
* <p>The worker instances that will perform the compute work.</p>
430+
* @public
431+
*/
432+
export interface WorkerMember {
433+
worker: WorkerComputeConfiguration;
434+
$unknown?: never;
435+
}
436+
437+
/**
438+
* @public
439+
*/
440+
export interface $UnknownMember {
441+
worker?: never;
442+
$unknown: [string, any];
443+
}
444+
445+
export interface Visitor<T> {
446+
worker: (value: WorkerComputeConfiguration) => T;
447+
_: (name: string, value: any) => T;
448+
}
449+
450+
export const visit = <T>(value: ComputeConfiguration, visitor: Visitor<T>): T => {
451+
if (value.worker !== undefined) return visitor.worker(value.worker);
452+
return visitor._(value.$unknown[0], value.$unknown[1]);
453+
};
454+
}
455+
386456
/**
387457
* <p>The parameters for the SQL type Protected Query.</p>
388458
* @public
@@ -439,6 +509,12 @@ export interface AudienceGenerationJobDataSource {
439509
* @public
440510
*/
441511
sqlParameters?: ProtectedQuerySQLParameters | undefined;
512+
513+
/**
514+
* <p>Provides configuration information for the instances that will perform the compute work.</p>
515+
* @public
516+
*/
517+
sqlComputeConfiguration?: ComputeConfiguration | undefined;
442518
}
443519

444520
/**
@@ -3337,76 +3413,6 @@ export interface PutMLConfigurationRequest {
33373413
defaultOutputLocation: MLOutputConfiguration | undefined;
33383414
}
33393415

3340-
/**
3341-
* @public
3342-
* @enum
3343-
*/
3344-
export const WorkerComputeType = {
3345-
CR1X: "CR.1X",
3346-
CR4X: "CR.4X",
3347-
} as const;
3348-
3349-
/**
3350-
* @public
3351-
*/
3352-
export type WorkerComputeType = (typeof WorkerComputeType)[keyof typeof WorkerComputeType];
3353-
3354-
/**
3355-
* <p>Configuration information about the compute workers that perform the transform job.</p>
3356-
* @public
3357-
*/
3358-
export interface WorkerComputeConfiguration {
3359-
/**
3360-
* <p>The instance type of the compute workers that are used.</p>
3361-
* @public
3362-
*/
3363-
type?: WorkerComputeType | undefined;
3364-
3365-
/**
3366-
* <p>The number of compute workers that are used.</p>
3367-
* @public
3368-
*/
3369-
number?: number | undefined;
3370-
}
3371-
3372-
/**
3373-
* <p>Provides configuration information for the instances that will perform the compute work.</p>
3374-
* @public
3375-
*/
3376-
export type ComputeConfiguration = ComputeConfiguration.WorkerMember | ComputeConfiguration.$UnknownMember;
3377-
3378-
/**
3379-
* @public
3380-
*/
3381-
export namespace ComputeConfiguration {
3382-
/**
3383-
* <p>The worker instances that will perform the compute work.</p>
3384-
* @public
3385-
*/
3386-
export interface WorkerMember {
3387-
worker: WorkerComputeConfiguration;
3388-
$unknown?: never;
3389-
}
3390-
3391-
/**
3392-
* @public
3393-
*/
3394-
export interface $UnknownMember {
3395-
worker?: never;
3396-
$unknown: [string, any];
3397-
}
3398-
3399-
export interface Visitor<T> {
3400-
worker: (value: WorkerComputeConfiguration) => T;
3401-
_: (name: string, value: any) => T;
3402-
}
3403-
3404-
export const visit = <T>(value: ComputeConfiguration, visitor: Visitor<T>): T => {
3405-
if (value.worker !== undefined) return visitor.worker(value.worker);
3406-
return visitor._(value.$unknown[0], value.$unknown[1]);
3407-
};
3408-
}
3409-
34103416
/**
34113417
* <p>Provides information necessary to perform the protected query.</p>
34123418
* @public
@@ -5260,7 +5266,7 @@ export interface StartTrainedModelInferenceJobRequest {
52605266
outputConfiguration: InferenceOutputConfiguration | undefined;
52615267

52625268
/**
5263-
* <p>Defines he data source that is used for the trained model inference job.</p>
5269+
* <p>Defines the data source that is used for the trained model inference job.</p>
52645270
* @public
52655271
*/
52665272
dataSource: ModelInferenceDataSource | undefined;
@@ -5727,6 +5733,7 @@ export const ProtectedQuerySQLParametersFilterSensitiveLog = (obj: ProtectedQuer
57275733
export const AudienceGenerationJobDataSourceFilterSensitiveLog = (obj: AudienceGenerationJobDataSource): any => ({
57285734
...obj,
57295735
...(obj.sqlParameters && { sqlParameters: SENSITIVE_STRING }),
5736+
...(obj.sqlComputeConfiguration && { sqlComputeConfiguration: obj.sqlComputeConfiguration }),
57305737
});
57315738

57325739
/**

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,9 @@
10301030
"traits": {
10311031
"smithy.api#documentation": "<p>The protected SQL query parameters.</p>"
10321032
}
1033+
},
1034+
"sqlComputeConfiguration": {
1035+
"target": "com.amazonaws.cleanroomsml#ComputeConfiguration"
10331036
}
10341037
},
10351038
"traits": {
@@ -9921,7 +9924,7 @@
99219924
"dataSource": {
99229925
"target": "com.amazonaws.cleanroomsml#ModelInferenceDataSource",
99239926
"traits": {
9924-
"smithy.api#documentation": "<p>Defines he data source that is used for the trained model inference job.</p>",
9927+
"smithy.api#documentation": "<p>Defines the data source that is used for the trained model inference job.</p>",
99259928
"smithy.api#required": {}
99269929
}
99279930
},

0 commit comments

Comments
 (0)