ArrayMergeStrategy
- class aws_cdk.ArrayMergeStrategy(*args: Any, **kwargs)
Bases:
objectStrategies for merging arrays in L1 property mixins.
Array elements are never deep-merged.
Static Methods
- classmethod append()
Append source elements after the existing target elements.
Example:: :rtype:
IArrayMergeStrategy
- classmethod prepend()
Prepend source elements before the existing target elements.
Example:: :rtype:
IArrayMergeStrategy
- classmethod replace()
Replace the target array entirely with the source array.
Example:: :rtype:
IArrayMergeStrategy
- classmethod replace_by_index()
Overwrite target elements positionally with source elements.
Target elements beyond the source length are preserved.
Example:: :rtype:
IArrayMergeStrategy
- classmethod replace_by_key(key)
Match source and target elements by a shared key property.
Matching target elements are replaced (not deep-merged). Unmatched source elements are appended.
- Parameters:
key (
str) –The property name to match elements on.
- Return type:
Example: