Class: AWSCDK::ImageBuilder::CfnImagePipeline::ScheduleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
image_builder/cfn_image_pipeline.rb

Overview

A schedule configures when and how often a pipeline will automatically create a new image.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auto_disable_policy: nil, pipeline_execution_start_condition: nil, schedule_expression: nil) ⇒ ScheduleProperty

Returns a new instance of ScheduleProperty.

Parameters:

  • auto_disable_policy (AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnImagePipeline::AutoDisablePolicyProperty, nil) (defaults to: nil)

    The policy that configures when Image Builder should automatically disable a pipeline that is failing.

  • pipeline_execution_start_condition (String, nil) (defaults to: nil)

    The condition configures when the pipeline should trigger a new image build.

  • schedule_expression (String, nil) (defaults to: nil)

    The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition .



943
944
945
946
947
948
949
950
# File 'image_builder/cfn_image_pipeline.rb', line 943

def initialize(auto_disable_policy: nil, pipeline_execution_start_condition: nil, schedule_expression: nil)
  @auto_disable_policy = auto_disable_policy.is_a?(Hash) ? ::AWSCDK::ImageBuilder::CfnImagePipeline::AutoDisablePolicyProperty.new(**auto_disable_policy.transform_keys(&:to_sym)) : auto_disable_policy
  Jsii::Type.check_type(@auto_disable_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbWFnZWJ1aWxkZXIuQ2ZuSW1hZ2VQaXBlbGluZS5BdXRvRGlzYWJsZVBvbGljeVByb3BlcnR5In1dfX0=")), "autoDisablePolicy") unless @auto_disable_policy.nil?
  @pipeline_execution_start_condition = pipeline_execution_start_condition
  Jsii::Type.check_type(@pipeline_execution_start_condition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pipelineExecutionStartCondition") unless @pipeline_execution_start_condition.nil?
  @schedule_expression = schedule_expression
  Jsii::Type.check_type(@schedule_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpression") unless @schedule_expression.nil?
end

Instance Attribute Details

#auto_disable_policyAWSCDK::IResolvable, ... (readonly)

The policy that configures when Image Builder should automatically disable a pipeline that is failing.



956
957
958
# File 'image_builder/cfn_image_pipeline.rb', line 956

def auto_disable_policy
  @auto_disable_policy
end

#pipeline_execution_start_conditionString? (readonly)

The condition configures when the pipeline should trigger a new image build.

When the pipeline_execution_start_condition is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE , and you use semantic version filters on the base image or components in your image recipe, Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY , it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the Image Builder API Reference .



963
964
965
# File 'image_builder/cfn_image_pipeline.rb', line 963

def pipeline_execution_start_condition
  @pipeline_execution_start_condition
end

#schedule_expressionString? (readonly)

The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition .

For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder .



970
971
972
# File 'image_builder/cfn_image_pipeline.rb', line 970

def schedule_expression
  @schedule_expression
end

Class Method Details

.jsii_propertiesObject



972
973
974
975
976
977
978
# File 'image_builder/cfn_image_pipeline.rb', line 972

def self.jsii_properties
  {
    :auto_disable_policy => "autoDisablePolicy",
    :pipeline_execution_start_condition => "pipelineExecutionStartCondition",
    :schedule_expression => "scheduleExpression",
  }
end

Instance Method Details

#to_jsiiObject



980
981
982
983
984
985
986
987
988
# File 'image_builder/cfn_image_pipeline.rb', line 980

def to_jsii
  result = {}
  result.merge!({
    "autoDisablePolicy" => @auto_disable_policy,
    "pipelineExecutionStartCondition" => @pipeline_execution_start_condition,
    "scheduleExpression" => @schedule_expression,
  })
  result.compact
end