Class FeatureFlags
Features that are implemented behind a flag in order to preserve backwards compatibility for existing apps.
public class FeatureFlags : DeputyBase
- Inheritance
-
FeatureFlags
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);
Remarks
The list of flags are available in the
@aws-cdk/cx-api
module.
The state of the flag for this application is stored as a CDK context variable.
ExampleMetadata: fixture=_generated
Methods
IsEnabled(string)
Check whether a feature flag is enabled.
public virtual bool? IsEnabled(string featureFlag)
Parameters
featureFlag
string
Returns
- bool?
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
IConstruct