Class: AWSCDK::IoT::CfnJobTemplate::AbortCriteriaProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_job_template.rb

Overview

The criteria that determine when and how a job abort takes place.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, failure_type:, min_number_of_executed_things:, threshold_percentage:) ⇒ AbortCriteriaProperty

Returns a new instance of AbortCriteriaProperty.

Parameters:

  • action (String)

    The type of job action to take to initiate the job abort.

  • failure_type (String)

    The type of job execution failures that can initiate a job abort.

  • min_number_of_executed_things (Numeric)

    The minimum number of things which must receive job execution notifications before the job can be aborted.

  • threshold_percentage (Numeric)

    The minimum percentage of job execution failures that must occur to initiate the job abort.



736
737
738
739
740
741
742
743
744
745
# File 'io_t/cfn_job_template.rb', line 736

def initialize(action:, failure_type:, min_number_of_executed_things:, threshold_percentage:)
  @action = action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action")
  @failure_type = failure_type
  Jsii::Type.check_type(@failure_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "failureType")
  @min_number_of_executed_things = min_number_of_executed_things
  Jsii::Type.check_type(@min_number_of_executed_things, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minNumberOfExecutedThings")
  @threshold_percentage = threshold_percentage
  Jsii::Type.check_type(@threshold_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "thresholdPercentage")
end

Instance Attribute Details

#actionString (readonly)

The type of job action to take to initiate the job abort.



751
752
753
# File 'io_t/cfn_job_template.rb', line 751

def action
  @action
end

#failure_typeString (readonly)

The type of job execution failures that can initiate a job abort.



756
757
758
# File 'io_t/cfn_job_template.rb', line 756

def failure_type
  @failure_type
end

#min_number_of_executed_thingsNumeric (readonly)

The minimum number of things which must receive job execution notifications before the job can be aborted.



761
762
763
# File 'io_t/cfn_job_template.rb', line 761

def min_number_of_executed_things
  @min_number_of_executed_things
end

#threshold_percentageNumeric (readonly)

The minimum percentage of job execution failures that must occur to initiate the job abort.

AWS IoT Core supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).



768
769
770
# File 'io_t/cfn_job_template.rb', line 768

def threshold_percentage
  @threshold_percentage
end

Class Method Details

.jsii_propertiesObject



770
771
772
773
774
775
776
777
# File 'io_t/cfn_job_template.rb', line 770

def self.jsii_properties
  {
    :action => "action",
    :failure_type => "failureType",
    :min_number_of_executed_things => "minNumberOfExecutedThings",
    :threshold_percentage => "thresholdPercentage",
  }
end

Instance Method Details

#to_jsiiObject



779
780
781
782
783
784
785
786
787
788
# File 'io_t/cfn_job_template.rb', line 779

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "failureType" => @failure_type,
    "minNumberOfExecutedThings" => @min_number_of_executed_things,
    "thresholdPercentage" => @threshold_percentage,
  })
  result.compact
end