Package software.amazon.awscdk
Class CrossStackReferences
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.CrossStackReferences
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)",
date="2026-06-04T12:52:05.071Z")
@Stability(Stable)
public class CrossStackReferences
extends software.amazon.jsii.JsiiObject
Ergonomic API for configuring cross-stack reference strength on a construct.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; CrossStackReferences crossStackReferences = CrossStackReferences.of(this);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCrossStackReferences(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCrossStackReferences(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidconsume(ReferenceStrength strength) Set the default reference strength used when this scope consumes references from other stacks.static CrossStackReferencesof(software.constructs.IConstruct scope) Returns aCrossStackReferencesconfigurator for the given construct.voidproduce(ReferenceStrength strength) Set how this resource is referenced when consumed from another stack.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CrossStackReferences
protected CrossStackReferences(software.amazon.jsii.JsiiObjectRef objRef) -
CrossStackReferences
protected CrossStackReferences(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
of
@Stability(Stable) @NotNull public static CrossStackReferences of(@NotNull software.constructs.IConstruct scope) Returns aCrossStackReferencesconfigurator for the given construct.- Parameters:
scope- The construct to configure. This parameter is required.
-
consume
Set the default reference strength used when this scope consumes references from other stacks.This controls the consuming side: sets the context key that determines how incoming cross-stack references are resolved for this scope and its descendants.
Equivalent to
scope.node.setContext(DEFAULT_CROSS_STACK_REFERENCES, strength).- Parameters:
strength-- The reference strength to use.
-
produce
Set how this resource is referenced when consumed from another stack.This controls the producing side: any cross-stack reference pointing at this resource will use the specified strength instead of the global default.
Equivalent to
scope.applyCrossStackReferenceStrength(strength).- Parameters:
strength-- The reference strength to use.
-