Class: AWSCDK::PropertyMergeStrategy

Inherits:
Jsii::Object
  • Object
show all
Defined in:
property_merge_strategy.rb

Overview

Strategy for handling nested properties in L1 property mixins.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ PropertyMergeStrategy

Returns a new instance of PropertyMergeStrategy.

Raises:

  • (NoMethodError)


8
9
10
# File 'property_merge_strategy.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.PropertyMergeStrategy does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.combine(options = nil) ⇒ AWSCDK::IMergeStrategy

Deep merges nested objects from source into target.

When both the existing and new value for a key are plain objects, their properties are merged recursively. Primitives, arrays, and mismatched types are overridden by the source value.

Supports Box-backed values: when the target value is a Box, the merge is deferred until the Box resolves.

Parameters:

Returns:



28
29
30
31
32
# File 'property_merge_strategy.rb', line 28

def self.combine(options = nil)
  options = options.is_a?(Hash) ? ::AWSCDK::CombineStrategyOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Db21iaW5lU3RyYXRlZ3lPcHRpb25zIn0=")), "options") unless options.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.PropertyMergeStrategy", "combine", [options])
end

.jsii_overridable_methodsObject



12
13
14
15
# File 'property_merge_strategy.rb', line 12

def self.jsii_overridable_methods
  {
  }
end

.overrideAWSCDK::IMergeStrategy

Replaces existing property values on the target with the values from the source.

Each allowed key is copied from source to target as-is, without inspecting nested objects. Any previous value on the target is discarded.



40
41
42
# File 'property_merge_strategy.rb', line 40

def self.override()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.PropertyMergeStrategy", "override", [])
end