Skip to content

Commit

Permalink
Update name of parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol committed Jul 1, 2024
1 parent ee3e753 commit 16dce83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-pipes-targets-alpha/lib/sagemaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface SageMakerTargetParameters {
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetsagemakerpipelineparameters.html#cfn-pipes-pipe-pipetargetsagemakerpipelineparameters-pipelineparameterlist
* @default - none
*/
readonly pipelineParameterList?: Record<string, string>;
readonly pipelineParameters?: Record<string, string>;
}

/**
Expand All @@ -31,14 +31,14 @@ export interface SageMakerTargetParameters {
export class SageMakerTarget implements ITarget {
private pipeline: IPipeline;
private sagemakerParameters?: SageMakerTargetParameters;
private pipelineParameterList?: Record<string, string>;
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.pipelineParameterList = this.sagemakerParameters?.pipelineParameterList;
this.pipelineParameters = this.sagemakerParameters?.pipelineParameters;
}

grantPush(grantee: IRole): void {
Expand All @@ -56,8 +56,8 @@ export class SageMakerTarget implements ITarget {
targetParameters: {
inputTemplate: this.sagemakerParameters.inputTransformation?.bind(pipe).inputTemplate,
sageMakerPipelineParameters: {
pipelineParameterList: this.pipelineParameterList ?
Object.entries(this.pipelineParameterList).map(([key, value]) => ({
pipelineParameterList: this.pipelineParameters ?
Object.entries(this.pipelineParameters).map(([key, value]) => ({
name: key,
value: value,
})) : undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const targetPipeline = new FakePipeline(stack, 'Pipeline', {
new Pipe(stack, 'Pipe', {
source: new TestSource(sourceQueue),
target: new SageMakerTarget(targetPipeline, {
pipelineParameterList: {
pipelineParameters: {
foor: 'bar',
},
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('SageMaker', () => {
it('should have target parameters', () => {
// ARRANGE
const target = new SageMakerTarget(pipeline, {
pipelineParameterList: {
pipelineParameters: {
foo: 'bar',
},
});
Expand Down

0 comments on commit 16dce83

Please sign in to comment.