Show / Hide Table of Contents

Class CfnCondition

Represents a CloudFormation condition, for resources which must be conditionally created and the determination must be made at deploy time.

Inheritance
System.Object
CfnElement
CfnCondition
Implements
ICfnConditionExpression
IResolvable
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 class CfnCondition : CfnElement, ICfnConditionExpression, IResolvable
Syntax (vb)
Public Class CfnCondition
    Inherits CfnElement
    Implements ICfnConditionExpression, IResolvable
Remarks

ExampleMetadata: infused

Examples
// Example automatically generated from non-compiling source. May contain errors.
var rawBucket = new CfnBucket(this, "Bucket", new CfnBucketProps { });
// -or-
var rawBucketAlt = (CfnBucket)myBucket.Node.DefaultChild;

// then
rawBucket.CfnOptions.Condition = new CfnCondition(this, "EnableBucket", new CfnConditionProps { });
rawBucket.CfnOptions.Metadata = new Dictionary<string, object> {
    { "metadataKey", "MetadataValue" }
};

Synopsis

Constructors

CfnCondition(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CfnCondition(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

CfnCondition(Construct, String, ICfnConditionProps)

Build a new condition.

Properties

Expression

The condition statement.

Methods

Resolve(IResolveContext)

Synthesizes the condition.

Constructors

CfnCondition(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CfnCondition(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CfnCondition(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CfnCondition(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

CfnCondition(Construct, String, ICfnConditionProps)

Build a new condition.

public CfnCondition(Construct scope, string id, ICfnConditionProps props = null)
Parameters
scope Constructs.Construct
id System.String
props ICfnConditionProps
Remarks

The condition must be constructed with a condition token, that the condition is based on.

Properties

Expression

The condition statement.

public virtual ICfnConditionExpression Expression { get; set; }
Property Value

ICfnConditionExpression

Methods

Resolve(IResolveContext)

Synthesizes the condition.

public virtual object Resolve(IResolveContext context)
Parameters
context IResolveContext
Returns

System.Object

Implements

ICfnConditionExpression
IResolvable
Back to top Generated by DocFX