Class: AWSCDK::ECS::Mixins::ClusterSettings

Inherits:
Mixin
  • Object
show all
Defined in:
ecs/mixins/cluster_settings.rb

Overview

Applies one or more cluster settings to an ECS cluster.

If a setting with the same name already exists, its value is replaced.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ ClusterSettings

Returns a new instance of ClusterSettings.

Parameters:



11
12
13
14
15
# File 'ecs/mixins/cluster_settings.rb', line 11

def initialize(settings)
  settings = settings.is_a?(Array) ? settings.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ECS::CfnCluster::ClusterSettingsProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : settings
  Jsii::Type.check_type(settings, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuQ2x1c3Rlci5DbHVzdGVyU2V0dGluZ3NQcm9wZXJ0eSJ9LCJraW5kIjoiYXJyYXkifX0=")), "settings")
  Jsii::Object.instance_method(:initialize).bind(self).call(settings)
end

Class Method Details

.jsii_overridable_methodsObject



17
18
19
20
21
22
# File 'ecs/mixins/cluster_settings.rb', line 17

def self.jsii_overridable_methods
  {
    :apply_to => { kind: :method, name: "applyTo", is_optional: false },
    :supports => { kind: :method, name: "supports", is_optional: false },
  }
end

Instance Method Details

#apply_to(cluster) ⇒ void

This method returns an undefined value.

Applies the mixin functionality to the target construct.

Parameters:

  • cluster (Constructs::IConstruct)


28
29
30
31
# File 'ecs/mixins/cluster_settings.rb', line 28

def apply_to(cluster)
  Jsii::Type.check_type(cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "cluster")
  jsii_call_method("applyTo", [cluster])
end

#supports(construct) ⇒ Boolean

Determines whether this mixin can be applied to the given construct.

Parameters:

  • construct (Constructs::IConstruct)

Returns:

  • (Boolean)


37
38
39
40
# File 'ecs/mixins/cluster_settings.rb', line 37

def supports(construct)
  Jsii::Type.check_type(construct, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "construct")
  jsii_call_method("supports", [construct])
end