Class: AWSCDK::Greengrassv2::CfnDeployment::IoTJobAbortCriteriaProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
greengrassv2/cfn_deployment.rb

Overview

Contains criteria that define when and how to cancel a job.

The deployment stops if the following conditions are true:

  • The number of things that receive the deployment exceeds the min_number_of_executed_things .
  • The percentage of failures with type failure_type exceeds the threshold_percentage .

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:) ⇒ IoTJobAbortCriteriaProperty

Returns a new instance of IoTJobAbortCriteriaProperty.

Parameters:

  • action (String)

    The action to perform when the criteria are met.

  • failure_type (String)

    The type of job deployment failure that can cancel a job.

  • min_number_of_executed_things (Numeric)

    The minimum number of things that receive the configuration before the job can cancel.

  • threshold_percentage (Numeric)

    The minimum percentage of failureType failures that occur before the job can cancel.



1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
# File 'greengrassv2/cfn_deployment.rb', line 1048

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 action to perform when the criteria are met.



1063
1064
1065
# File 'greengrassv2/cfn_deployment.rb', line 1063

def action
  @action
end

#failure_typeString (readonly)

The type of job deployment failure that can cancel a job.



1068
1069
1070
# File 'greengrassv2/cfn_deployment.rb', line 1068

def failure_type
  @failure_type
end

#min_number_of_executed_thingsNumeric (readonly)

The minimum number of things that receive the configuration before the job can cancel.



1073
1074
1075
# File 'greengrassv2/cfn_deployment.rb', line 1073

def min_number_of_executed_things
  @min_number_of_executed_things
end

#threshold_percentageNumeric (readonly)

The minimum percentage of failureType failures that occur before the job can cancel.

This parameter supports up to two digits after the decimal (for example, you can specify 10.9 or 10.99 , but not 10.999 ).



1080
1081
1082
# File 'greengrassv2/cfn_deployment.rb', line 1080

def threshold_percentage
  @threshold_percentage
end

Class Method Details

.jsii_propertiesObject



1082
1083
1084
1085
1086
1087
1088
1089
# File 'greengrassv2/cfn_deployment.rb', line 1082

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

Instance Method Details

#to_jsiiObject



1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
# File 'greengrassv2/cfn_deployment.rb', line 1091

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