Class CfnRefElement

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct
Direct Known Subclasses:
CfnMapping, CfnResource, CfnRule

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:54.901Z") @Stability(Stable) public abstract class CfnRefElement extends CfnElement
Base class for referenceable CloudFormation constructs which are not Resources.

These constructs are things like Conditions and Parameters, can be referenced by taking the .ref attribute.

Resource constructs do not inherit from CfnRefElement because they have their own, more specific types returned from the .ref attribute. Also, some resources aren't referenceable at all (such as BucketPolicies or GatewayAttachments).

  • Nested Class Summary

    Nested classes/interfaces inherited from class software.constructs.Construct

    software.constructs.Construct.Builder

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct

    IConstruct.Jsii$Default

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CfnRefElement(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    CfnRefElement(software.amazon.jsii.JsiiObjectRef objRef)
     
    protected
    CfnRefElement(software.constructs.Construct scope, String id)
    Creates an entity and binds it to a tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return a string that will be resolved to a CloudFormation { Ref } for this element.

    Methods inherited from class software.amazon.awscdk.core.CfnElement

    getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId

    Methods inherited from class software.amazon.awscdk.core.Construct

    getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate

    Methods inherited from class software.constructs.Construct

    toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • CfnRefElement

      protected CfnRefElement(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRefElement

      protected CfnRefElement(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRefElement

      @Stability(Stable) protected CfnRefElement(@NotNull software.constructs.Construct scope, @NotNull String id)
      Creates an entity and binds it to a tree.

      Note that the root of the tree must be a Stack object (not just any Root).

      Parameters:
      scope - The parent construct. This parameter is required.
      id - This parameter is required.
  • Method Details

    • getRef

      @Stability(Stable) @NotNull public String getRef()
      Return a string that will be resolved to a CloudFormation { Ref } for this element.

      If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).