Skip to content

Commit

Permalink
Add feedback from Leo
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol committed Oct 30, 2024
1 parent 07714a9 commit 45b119c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-pipes-targets-alpha/lib/sagemaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,33 @@ export interface SageMakerTargetParameters {
}

/**
* A EventBridge Pipes target that sends messages to an SageMaker.
* An EventBridge Pipes target that sends messages to a SageMaker pipeline.
*/
export class SageMakerTarget implements ITarget {
private pipeline: IPipeline;
private sagemakerParameters?: SageMakerTargetParameters;
private sageMakerParameters?: SageMakerTargetParameters;
private pipelineParameters?: Record<string, string>;
public readonly targetArn: string;

constructor(pipeline: IPipeline, parameters?: SageMakerTargetParameters) {
this.pipeline = pipeline;
this.targetArn = pipeline.pipelineArn;
this.sagemakerParameters = parameters;
this.pipelineParameters = this.sagemakerParameters?.pipelineParameters;
this.sageMakerParameters = parameters;
this.pipelineParameters = this.sageMakerParameters?.pipelineParameters;
}

grantPush(grantee: IRole): void {
this.pipeline.grantStartPipelineExecution(grantee);
}

bind(pipe: IPipe): TargetConfig {
if (!this.sagemakerParameters) {
if (!this.sageMakerParameters) {
return { targetParameters: {} };
}

return {
targetParameters: {
inputTemplate: this.sagemakerParameters.inputTransformation?.bind(pipe).inputTemplate,
inputTemplate: this.sageMakerParameters.inputTransformation?.bind(pipe).inputTemplate,
sageMakerPipelineParameters: {
pipelineParameterList: this.pipelineParameters ?
Object.entries(this.pipelineParameters).map(([key, value]) => ({
Expand Down

0 comments on commit 45b119c

Please sign in to comment.