Class: AWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
step_functions_tasks/emr_create_cluster.rb

Overview

A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, name:, trigger:, description: nil) ⇒ ScalingRuleProperty

Returns a new instance of ScalingRuleProperty.

Parameters:



2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
# File 'step_functions_tasks/emr_create_cluster.rb', line 2391

def initialize(action:, name:, trigger:, description: nil)
  @action = action.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingActionProperty.new(**action.transform_keys(&:to_sym)) : action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FbXJDcmVhdGVDbHVzdGVyLlNjYWxpbmdBY3Rpb25Qcm9wZXJ0eSJ9")), "action")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @trigger = trigger.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingTriggerProperty.new(**trigger.transform_keys(&:to_sym)) : trigger
  Jsii::Type.check_type(@trigger, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FbXJDcmVhdGVDbHVzdGVyLlNjYWxpbmdUcmlnZ2VyUHJvcGVydHkifQ==")), "trigger")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#actionAWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingActionProperty (readonly)

The conditions that trigger an automatic scaling activity.



2405
2406
2407
# File 'step_functions_tasks/emr_create_cluster.rb', line 2405

def action
  @action
end

#descriptionString? (readonly)

Note:

Default: - None

A friendly, more verbose description of the automatic scaling rule.

Returns:

  • (String, nil)


2420
2421
2422
# File 'step_functions_tasks/emr_create_cluster.rb', line 2420

def description
  @description
end

#nameString (readonly)

The name used to identify an automatic scaling rule.

Rule names must be unique within a scaling policy.

Returns:

  • (String)


2411
2412
2413
# File 'step_functions_tasks/emr_create_cluster.rb', line 2411

def name
  @name
end

#triggerAWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingTriggerProperty (readonly)

The CloudWatch alarm definition that determines when automatic scaling activity is triggered.



2415
2416
2417
# File 'step_functions_tasks/emr_create_cluster.rb', line 2415

def trigger
  @trigger
end

Class Method Details

.jsii_propertiesObject



2422
2423
2424
2425
2426
2427
2428
2429
# File 'step_functions_tasks/emr_create_cluster.rb', line 2422

def self.jsii_properties
  {
    :action => "action",
    :name => "name",
    :trigger => "trigger",
    :description => "description",
  }
end

Instance Method Details

#to_jsiiObject



2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
# File 'step_functions_tasks/emr_create_cluster.rb', line 2431

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "name" => @name,
    "trigger" => @trigger,
    "description" => @description,
  })
  result.compact
end