Class FeatureFlags
Features that are implemented behind a flag in order to preserve backwards compatibility for existing apps.
Inheritance
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FeatureFlags : DeputyBase
Syntax (vb)
Public Class FeatureFlags
Inherits DeputyBase
Remarks
The list of flags are available in the
aws-cdk-lib/cx-api
module.
The state of the flag for this application is stored as a CDK context variable.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var featureFlags = FeatureFlags.Of(this);
Synopsis
Constructors
FeatureFlags(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
FeatureFlags(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
IsEnabled(String) | Check whether a feature flag is enabled. |
Of(IConstruct) | Inspect feature flags on the construct node's context. |
Constructors
FeatureFlags(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FeatureFlags(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
FeatureFlags(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FeatureFlags(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
IsEnabled(String)
Check whether a feature flag is enabled.
public virtual Nullable<bool> IsEnabled(string featureFlag)
Parameters
- featureFlag System.String
Returns
System.Nullable<System.Boolean>
Remarks
If configured, the flag is present in
the construct node context. Falls back to the defaults defined in the cx-api
module.
Of(IConstruct)
Inspect feature flags on the construct node's context.
public static FeatureFlags Of(IConstruct scope)
Parameters
- scope Constructs.IConstruct
Returns