Class: AWSCDK::KafkaConnect::CfnConnector::AutoScalingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kafka_connect/cfn_connector.rb

Overview

Specifies how the connector scales.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_worker_count:, mcu_count:, min_worker_count:, scale_in_policy:, scale_out_policy:, max_autoscaling_task_count: nil) ⇒ AutoScalingProperty

Returns a new instance of AutoScalingProperty.

Parameters:



740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'kafka_connect/cfn_connector.rb', line 740

def initialize(max_worker_count:, mcu_count:, min_worker_count:, scale_in_policy:, scale_out_policy:, max_autoscaling_task_count: nil)
  @max_worker_count = max_worker_count
  Jsii::Type.check_type(@max_worker_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxWorkerCount")
  @mcu_count = mcu_count
  Jsii::Type.check_type(@mcu_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "mcuCount")
  @min_worker_count = min_worker_count
  Jsii::Type.check_type(@min_worker_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minWorkerCount")
  @scale_in_policy = scale_in_policy.is_a?(Hash) ? ::AWSCDK::KafkaConnect::CfnConnector::ScaleInPolicyProperty.new(**scale_in_policy.transform_keys(&:to_sym)) : scale_in_policy
  Jsii::Type.check_type(@scale_in_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rYWZrYWNvbm5lY3QuQ2ZuQ29ubmVjdG9yLlNjYWxlSW5Qb2xpY3lQcm9wZXJ0eSJ9XX19")), "scaleInPolicy")
  @scale_out_policy = scale_out_policy.is_a?(Hash) ? ::AWSCDK::KafkaConnect::CfnConnector::ScaleOutPolicyProperty.new(**scale_out_policy.transform_keys(&:to_sym)) : scale_out_policy
  Jsii::Type.check_type(@scale_out_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rYWZrYWNvbm5lY3QuQ2ZuQ29ubmVjdG9yLlNjYWxlT3V0UG9saWN5UHJvcGVydHkifV19fQ==")), "scaleOutPolicy")
  @max_autoscaling_task_count = max_autoscaling_task_count
  Jsii::Type.check_type(@max_autoscaling_task_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxAutoscalingTaskCount") unless @max_autoscaling_task_count.nil?
end

Instance Attribute Details

#max_autoscaling_task_countNumeric? (readonly)

The maximum number of tasks allocated to the connector during autoscaling operations.



786
787
788
# File 'kafka_connect/cfn_connector.rb', line 786

def max_autoscaling_task_count
  @max_autoscaling_task_count
end

#max_worker_countNumeric (readonly)

The maximum number of workers allocated to the connector.



759
760
761
# File 'kafka_connect/cfn_connector.rb', line 759

def max_worker_count
  @max_worker_count
end

#mcu_countNumeric (readonly)

The number of microcontroller units (MCUs) allocated to each connector worker.

The valid values are 1,2,4,8.



766
767
768
# File 'kafka_connect/cfn_connector.rb', line 766

def mcu_count
  @mcu_count
end

#min_worker_countNumeric (readonly)

The minimum number of workers allocated to the connector.



771
772
773
# File 'kafka_connect/cfn_connector.rb', line 771

def min_worker_count
  @min_worker_count
end

Class Method Details

.jsii_propertiesObject



788
789
790
791
792
793
794
795
796
797
# File 'kafka_connect/cfn_connector.rb', line 788

def self.jsii_properties
  {
    :max_worker_count => "maxWorkerCount",
    :mcu_count => "mcuCount",
    :min_worker_count => "minWorkerCount",
    :scale_in_policy => "scaleInPolicy",
    :scale_out_policy => "scaleOutPolicy",
    :max_autoscaling_task_count => "maxAutoscalingTaskCount",
  }
end

Instance Method Details

#to_jsiiObject



799
800
801
802
803
804
805
806
807
808
809
810
# File 'kafka_connect/cfn_connector.rb', line 799

def to_jsii
  result = {}
  result.merge!({
    "maxWorkerCount" => @max_worker_count,
    "mcuCount" => @mcu_count,
    "minWorkerCount" => @min_worker_count,
    "scaleInPolicy" => @scale_in_policy,
    "scaleOutPolicy" => @scale_out_policy,
    "maxAutoscalingTaskCount" => @max_autoscaling_task_count,
  })
  result.compact
end