diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/sage-maker-start-pipeline-execution.test.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/sage-maker-start-pipeline-execution.test.ts index 4c45d04462281..af8870d95486d 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/sage-maker-start-pipeline-execution.test.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/sage-maker-start-pipeline-execution.test.ts @@ -736,4 +736,21 @@ describe('schedule target', () => { target: pipelineTarget, })).toThrow(/Number of retry attempts should be less or equal than 185/); }); + + test('throws when pipelineParameterList length is greater than 200', () => { + const dummyObject = { + name: 'MyParameterName', + value: 'MyParameterValue', + }; + let dummyPipelineParameterList: SageMakerPipelineParameter[] = []; + for (let i = 0; i < 201; i++) { + dummyPipelineParameterList.push(dummyObject); + } + + expect(() => + new SageMakerStartPipelineExecution(pipeline, { + pipelineParameterList: dummyPipelineParameterList, + }), + ).toThrow(/pipelineParameterList length must be between 0 and 200, got 201/); + }); }); \ No newline at end of file