Class: AWSCDK::CodeBuild::CfnFleet::TargetTrackingScalingConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_build/cfn_fleet.rb

Overview

Defines when a new instance is auto-scaled into the compute fleet.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric_type: nil, target_value: nil) ⇒ TargetTrackingScalingConfigurationProperty

Returns a new instance of TargetTrackingScalingConfigurationProperty.

Parameters:

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

    The metric type to determine auto-scaling.

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

    The value of metricType when to start scaling.



891
892
893
894
895
896
# File 'code_build/cfn_fleet.rb', line 891

def initialize(metric_type: nil, target_value: nil)
  @metric_type = metric_type
  Jsii::Type.check_type(@metric_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricType") unless @metric_type.nil?
  @target_value = target_value
  Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetValue") unless @target_value.nil?
end

Instance Attribute Details

#metric_typeString? (readonly)

The metric type to determine auto-scaling.



902
903
904
# File 'code_build/cfn_fleet.rb', line 902

def metric_type
  @metric_type
end

#target_valueNumeric? (readonly)

The value of metricType when to start scaling.



907
908
909
# File 'code_build/cfn_fleet.rb', line 907

def target_value
  @target_value
end

Class Method Details

.jsii_propertiesObject



909
910
911
912
913
914
# File 'code_build/cfn_fleet.rb', line 909

def self.jsii_properties
  {
    :metric_type => "metricType",
    :target_value => "targetValue",
  }
end

Instance Method Details

#to_jsiiObject



916
917
918
919
920
921
922
923
# File 'code_build/cfn_fleet.rb', line 916

def to_jsii
  result = {}
  result.merge!({
    "metricType" => @metric_type,
    "targetValue" => @target_value,
  })
  result.compact
end