@@ -38,7 +38,24 @@ export interface VolumeProps {
3838 readonly ebs : imagebuilder . CfnImageRecipe . EbsInstanceBlockDeviceSpecificationProperty ;
3939}
4040
41+ export interface ImagePipelineSchedule {
42+ /**
43+ * The cron expression for the schedule.
44+ */
45+ readonly scheduleExpression : string ;
46+
47+ /**
48+ * Optional pipeline execution start condition.
49+ */
50+ readonly pipelineExecutionStartCondition ?: 'EXPRESSION_MATCH_ONLY' | 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE' ;
51+ }
52+
53+
4154export interface ImagePipelineProps {
55+ /**
56+ * Name of the Image Pipeline
57+ */
58+ readonly name ?: string ;
4259 /**
4360 * List of component props
4461 */
@@ -129,6 +146,10 @@ export interface ImagePipelineProps {
129146 * The tags attached to the resource created by Image Builder
130147 */
131148 readonly resourceTags ?: { [ key : string ] : string } ;
149+ /**
150+ * Schedule configuration for the image pipeline.
151+ */
152+ readonly schedule ?: ImagePipelineSchedule ;
132153}
133154
134155export class ImagePipeline extends Construct {
@@ -254,10 +275,21 @@ export class ImagePipeline extends Construct {
254275 let imagePipelineProps : imagebuilder . CfnImagePipelineProps ;
255276 imagePipelineProps = {
256277 infrastructureConfigurationArn : infrastructureConfig . attrArn ,
257- name : `${ uid } ImagePipeline` ,
278+ name : props . name ? props . name : `${ uid } ImagePipeline` ,
258279 description : 'A sample image pipeline' ,
259280 imageRecipeArn : imageRecipe . attrArn ,
260281 } ;
282+
283+ if ( props . schedule ) {
284+ imagePipelineProps = {
285+ ...imagePipelineProps ,
286+ schedule : {
287+ scheduleExpression : props . schedule . scheduleExpression ,
288+ pipelineExecutionStartCondition : props . schedule . pipelineExecutionStartCondition || 'EXPRESSION_MATCH_ONLY' ,
289+ } ,
290+ } ;
291+ }
292+
261293 if ( props . enableVulnScans ) {
262294 imagePipelineProps = {
263295 ...imagePipelineProps ,
0 commit comments