All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.CfnReference Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
package software.amazon.awscdk;

/**
 * A Token that represents a CloudFormation reference to another resource.
 * 
 * If these references are used in a different stack from where they are
 * defined, appropriate CloudFormation `Export`s and `Fn::ImportValue`s will be
 * synthesized automatically instead of the regular CloudFormation references.
 * 
 * Additionally, the dependency between the stacks will be recorded, and the toolkit
 * will make sure to deploy producing stack before the consuming stack.
 * 
 * This magic happens in the prepare() phase, where consuming stacks will call
 * `consumeFromStack` on these Tokens and if they happen to be exported by a different
 * Stack, we'll register the dependency.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.940Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.$Module.class, fqn = "@aws-cdk/cdk.CfnReference")
public class CfnReference extends software.amazon.awscdk.Reference {
    protected CfnReference(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
        super(mode);
    }
    public CfnReference(@javax.annotation.Nullable final java.lang.Object value, final java.lang.String displayName, final software.amazon.awscdk.Construct target) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.Jsii);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { value, java.util.Objects.requireNonNull(displayName, "displayName is required"), java.util.Objects.requireNonNull(target, "target is required") });
    }

    /**
     * Check whether this is actually a Reference.
     */
    public static java.lang.Boolean isCfnReference(final software.amazon.awscdk.Token x) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.CfnReference.class, "isCfnReference", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(x, "x is required") });
    }

    /**
     * Register a stack this references is being consumed from.
     */
    public void consumeFromStack(final software.amazon.awscdk.Stack consumingStack, final software.amazon.awscdk.IConstruct consumingConstruct) {
        this.jsiiCall("consumeFromStack", Void.class, new Object[] { java.util.Objects.requireNonNull(consumingStack, "consumingStack is required"), java.util.Objects.requireNonNull(consumingConstruct, "consumingConstruct is required") });
    }

    @Override
    @javax.annotation.Nullable
    public java.lang.Object resolve(final software.amazon.awscdk.ResolveContext context) {
        return this.jsiiCall("resolve", java.lang.Object.class, new Object[] { java.util.Objects.requireNonNull(context, "context is required") });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy