# FeatureFlag

A single feature flag.

- Source: [`node_modules/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/artifact-schema.d.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/artifact-schema.d.ts#L235)
- Type last changed: v2.232.0 · 5 Dec 2025

## 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

- `explanation`: string — Explanation about the purpose of this flag that can be shown to the user.

  **Default:** No description

- `recommendedValue`: any — The library-recommended value for this flag, if any.

  **Default:** No recommended value.

  It is possible that there is no recommended value.

- `unconfiguredBehavesLike`: [UnconfiguredBehavesLike](/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.UnconfiguredBehavesLike.html) = false — The value of the flag that produces the same behavior as when the flag is not configured at all.

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

- `userValue`: any — 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.
