Show / Hide Table of Contents

Class CfnRefElement

Base class for referenceable CloudFormation constructs which are not Resources.

Inheritance
object
CfnElement
CfnRefElement
CfnMapping
CfnResource
CfnRule
Inherited Members
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class CfnRefElement : CfnElement
Syntax (vb)
Public MustInherit Class CfnRefElement Inherits CfnElement
Remarks

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).

Synopsis

Constructors

CfnRefElement(Construct, string)

Creates an entity and binds it to a tree.

Properties

Ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

Constructors

CfnRefElement(Construct, string)

Creates an entity and binds it to a tree.

protected CfnRefElement(Construct scope, string id)
Parameters
scope Construct

The parent construct.

id string

The parent construct.

Remarks

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

Properties

Ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

public virtual string Ref { get; }
Property Value

string

Remarks

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 }).

Back to top Generated by DocFX