Class: AWSCDK::EMR::CfnCluster::ManagedScalingPolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
emr/cfn_cluster.rb

Overview

Managed scaling policy for an Amazon EMR cluster.

The policy specifies the limits for resources that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compute_limits: nil, scaling_strategy: nil, utilization_performance_index: nil) ⇒ ManagedScalingPolicyProperty

Returns a new instance of ManagedScalingPolicyProperty.

Parameters:

  • compute_limits (AWSCDK::IResolvable, AWSCDK::EMR::CfnCluster::ComputeLimitsProperty, nil) (defaults to: nil)

    The Amazon EC2 unit limits for a managed scaling policy.

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

    Determines whether a custom scaling utilization performance index can be set.

  • utilization_performance_index (Numeric, nil) (defaults to: nil)

    An integer value that represents an advanced scaling strategy.



2292
2293
2294
2295
2296
2297
2298
2299
# File 'emr/cfn_cluster.rb', line 2292

def initialize(compute_limits: nil, scaling_strategy: nil, utilization_performance_index: nil)
  @compute_limits = compute_limits.is_a?(Hash) ? ::AWSCDK::EMR::CfnCluster::ComputeLimitsProperty.new(**compute_limits.transform_keys(&:to_sym)) : compute_limits
  Jsii::Type.check_type(@compute_limits, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuQ2x1c3Rlci5Db21wdXRlTGltaXRzUHJvcGVydHkifV19fQ==")), "computeLimits") unless @compute_limits.nil?
  @scaling_strategy = scaling_strategy
  Jsii::Type.check_type(@scaling_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scalingStrategy") unless @scaling_strategy.nil?
  @utilization_performance_index = utilization_performance_index
  Jsii::Type.check_type(@utilization_performance_index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "utilizationPerformanceIndex") unless @utilization_performance_index.nil?
end

Instance Attribute Details

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

The Amazon EC2 unit limits for a managed scaling policy.

The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.



2307
2308
2309
# File 'emr/cfn_cluster.rb', line 2307

def compute_limits
  @compute_limits
end

#scaling_strategyString? (readonly)

Determines whether a custom scaling utilization performance index can be set.

Possible values include ADVANCED or DEFAULT .



2314
2315
2316
# File 'emr/cfn_cluster.rb', line 2314

def scaling_strategy
  @scaling_strategy
end

#utilization_performance_indexNumeric? (readonly)

An integer value that represents an advanced scaling strategy.

Setting a higher value optimizes for performance. Setting a lower value optimizes for resource conservation. Setting the value to 50 balances performance and resource conservation. Possible values are 1, 25, 50, 75, and 100.



2321
2322
2323
# File 'emr/cfn_cluster.rb', line 2321

def utilization_performance_index
  @utilization_performance_index
end

Class Method Details

.jsii_propertiesObject



2323
2324
2325
2326
2327
2328
2329
# File 'emr/cfn_cluster.rb', line 2323

def self.jsii_properties
  {
    :compute_limits => "computeLimits",
    :scaling_strategy => "scalingStrategy",
    :utilization_performance_index => "utilizationPerformanceIndex",
  }
end

Instance Method Details

#to_jsiiObject



2331
2332
2333
2334
2335
2336
2337
2338
2339
# File 'emr/cfn_cluster.rb', line 2331

def to_jsii
  result = {}
  result.merge!({
    "computeLimits" => @compute_limits,
    "scalingStrategy" => @scaling_strategy,
    "utilizationPerformanceIndex" => @utilization_performance_index,
  })
  result.compact
end