Skip to content

Commit

Permalink
feat(client-cleanroomsml): Add support for SQL compute configuration …
Browse files Browse the repository at this point in the history
…for StartAudienceGenerationJob API.
  • Loading branch information
awstools committed Dec 17, 2024
1 parent 104dcc7 commit 119c1d2
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export interface GetAudienceGenerationJobCommandOutput extends GetAudienceGenera
* // "<keys>": "STRING_VALUE",
* // },
* // },
* // sqlComputeConfiguration: { // ComputeConfiguration Union: only one key present
* // worker: { // WorkerComputeConfiguration
* // type: "CR.1X" || "CR.4X",
* // number: Number("int"),
* // },
* // },
* // },
* // includeSeedInOutput: true || false,
* // collaborationId: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export interface StartAudienceGenerationJobCommandOutput extends StartAudienceGe
* "<keys>": "STRING_VALUE",
* },
* },
* sqlComputeConfiguration: { // ComputeConfiguration Union: only one key present
* worker: { // WorkerComputeConfiguration
* type: "CR.1X" || "CR.4X",
* number: Number("int"),
* },
* },
* },
* includeSeedInOutput: true || false,
* collaborationId: "STRING_VALUE",
Expand Down
149 changes: 78 additions & 71 deletions clients/client-cleanroomsml/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,76 @@ export interface AudienceQualityMetrics {
recallMetric?: number | undefined;
}

/**
* @public
* @enum
*/
export const WorkerComputeType = {
CR1X: "CR.1X",
CR4X: "CR.4X",
} as const;

/**
* @public
*/
export type WorkerComputeType = (typeof WorkerComputeType)[keyof typeof WorkerComputeType];

/**
* <p>Configuration information about the compute workers that perform the transform job.</p>
* @public
*/
export interface WorkerComputeConfiguration {
/**
* <p>The instance type of the compute workers that are used.</p>
* @public
*/
type?: WorkerComputeType | undefined;

/**
* <p>The number of compute workers that are used.</p>
* @public
*/
number?: number | undefined;
}

/**
* <p>Provides configuration information for the instances that will perform the compute work.</p>
* @public
*/
export type ComputeConfiguration = ComputeConfiguration.WorkerMember | ComputeConfiguration.$UnknownMember;

/**
* @public
*/
export namespace ComputeConfiguration {
/**
* <p>The worker instances that will perform the compute work.</p>
* @public
*/
export interface WorkerMember {
worker: WorkerComputeConfiguration;
$unknown?: never;
}

/**
* @public
*/
export interface $UnknownMember {
worker?: never;
$unknown: [string, any];
}

export interface Visitor<T> {
worker: (value: WorkerComputeConfiguration) => T;
_: (name: string, value: any) => T;
}

export const visit = <T>(value: ComputeConfiguration, visitor: Visitor<T>): T => {
if (value.worker !== undefined) return visitor.worker(value.worker);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}

/**
* <p>The parameters for the SQL type Protected Query.</p>
* @public
Expand Down Expand Up @@ -439,6 +509,12 @@ export interface AudienceGenerationJobDataSource {
* @public
*/
sqlParameters?: ProtectedQuerySQLParameters | undefined;

/**
* <p>Provides configuration information for the instances that will perform the compute work.</p>
* @public
*/
sqlComputeConfiguration?: ComputeConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -3337,76 +3413,6 @@ export interface PutMLConfigurationRequest {
defaultOutputLocation: MLOutputConfiguration | undefined;
}

/**
* @public
* @enum
*/
export const WorkerComputeType = {
CR1X: "CR.1X",
CR4X: "CR.4X",
} as const;

/**
* @public
*/
export type WorkerComputeType = (typeof WorkerComputeType)[keyof typeof WorkerComputeType];

/**
* <p>Configuration information about the compute workers that perform the transform job.</p>
* @public
*/
export interface WorkerComputeConfiguration {
/**
* <p>The instance type of the compute workers that are used.</p>
* @public
*/
type?: WorkerComputeType | undefined;

/**
* <p>The number of compute workers that are used.</p>
* @public
*/
number?: number | undefined;
}

/**
* <p>Provides configuration information for the instances that will perform the compute work.</p>
* @public
*/
export type ComputeConfiguration = ComputeConfiguration.WorkerMember | ComputeConfiguration.$UnknownMember;

/**
* @public
*/
export namespace ComputeConfiguration {
/**
* <p>The worker instances that will perform the compute work.</p>
* @public
*/
export interface WorkerMember {
worker: WorkerComputeConfiguration;
$unknown?: never;
}

/**
* @public
*/
export interface $UnknownMember {
worker?: never;
$unknown: [string, any];
}

export interface Visitor<T> {
worker: (value: WorkerComputeConfiguration) => T;
_: (name: string, value: any) => T;
}

export const visit = <T>(value: ComputeConfiguration, visitor: Visitor<T>): T => {
if (value.worker !== undefined) return visitor.worker(value.worker);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}

/**
* <p>Provides information necessary to perform the protected query.</p>
* @public
Expand Down Expand Up @@ -5260,7 +5266,7 @@ export interface StartTrainedModelInferenceJobRequest {
outputConfiguration: InferenceOutputConfiguration | undefined;

/**
* <p>Defines he data source that is used for the trained model inference job.</p>
* <p>Defines the data source that is used for the trained model inference job.</p>
* @public
*/
dataSource: ModelInferenceDataSource | undefined;
Expand Down Expand Up @@ -5727,6 +5733,7 @@ export const ProtectedQuerySQLParametersFilterSensitiveLog = (obj: ProtectedQuer
export const AudienceGenerationJobDataSourceFilterSensitiveLog = (obj: AudienceGenerationJobDataSource): any => ({
...obj,
...(obj.sqlParameters && { sqlParameters: SENSITIVE_STRING }),
...(obj.sqlComputeConfiguration && { sqlComputeConfiguration: obj.sqlComputeConfiguration }),
});

/**
Expand Down
5 changes: 4 additions & 1 deletion codegen/sdk-codegen/aws-models/cleanroomsml.json
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,9 @@
"traits": {
"smithy.api#documentation": "<p>The protected SQL query parameters.</p>"
}
},
"sqlComputeConfiguration": {
"target": "com.amazonaws.cleanroomsml#ComputeConfiguration"
}
},
"traits": {
Expand Down Expand Up @@ -9921,7 +9924,7 @@
"dataSource": {
"target": "com.amazonaws.cleanroomsml#ModelInferenceDataSource",
"traits": {
"smithy.api#documentation": "<p>Defines he data source that is used for the trained model inference job.</p>",
"smithy.api#documentation": "<p>Defines the data source that is used for the trained model inference job.</p>",
"smithy.api#required": {}
}
},
Expand Down

0 comments on commit 119c1d2

Please sign in to comment.