FeatureFlag Struct
A single feature flag.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
declare const recommendedValue: any;
declare const userValue: any;
declare const v1: any;
declare const v2: any;
const featureFlag: cloud_assembly_schema.FeatureFlag = {
explanation: 'explanation',
recommendedValue: recommendedValue,
unconfiguredBehavesLike: {
v1: v1,
v2: v2,
},
userValue: userValue,
};
Properties
explanationoptionalstringexplanationoptionalstrexplanationoptionalStringExplanationoptionalstringExplanationoptional*string#Explanation about the purpose of this flag that can be shown to the user.
Default: No description
recommendedValueoptionalanyrecommended_valueoptionalAnyrecommendedValueoptionalObjectRecommendedValueoptionalobjectRecommendedValueoptionalinterface{}#The library-recommended value for this flag, if any.
Default: No recommended value.
It is possible that there is no recommended value.
unconfiguredBehavesLikeoptionalUnconfiguredBehavesLikeunconfigured_behaves_likeoptionalUnconfiguredBehavesLikeunconfiguredBehavesLikeoptionalUnconfiguredBehavesLikeUnconfiguredBehavesLikeoptionalUnconfiguredBehavesLikeUnconfiguredBehavesLikeoptionalUnconfiguredBehavesLike= false#The value of the flag that produces the same behavior as when the flag is not configured at all.
notes
The structure of this field is a historical accident. The type of this field should have been boolean, which should have contained the default value for the flag appropriate for the current version of the CDK library. We are not rectifying this accident because doing so
Instead, the canonical way to access this value is by evaluating unconfiguredBehavesLike?.v2 ?? false.
userValueoptionalanyuser_valueoptionalAnyuserValueoptionalObjectUserValueoptionalobjectUserValueoptionalinterface{}#The value configured by the user.
Default: Not configured by the user
This is the value configured at the root of the tree. Users may also have configured values at specific locations in the tree; we don't report on those.