# ProductStackHistoryProps

Properties for a ProductStackHistory.

Extends: ProductStackHistoryProps
Used as props by: ProductStackHistory

- Source: [`aws-servicecatalog/lib/product-stack-history.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0/packages/aws-cdk-lib/aws-servicecatalog/lib/product-stack-history.ts#L15)
- Type last changed: v2.26.0 · 30 May 2022

## Example

```ts
class S3BucketProduct extends servicecatalog.ProductStack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    new s3.Bucket(this, 'BucketProductV2');
  }
}

const productStackHistory = new servicecatalog.ProductStackHistory(this, 'ProductStackHistory', {
  productStack: new S3BucketProduct(this, 'S3BucketProduct'),
  currentVersionName: 'v2',
  currentVersionLocked: true
});

const product = new servicecatalog.CloudFormationProduct(this, 'MyFirstProduct', {
  productName: "My Product",
  owner: "Product Owner",
  productVersions: [
    productStackHistory.currentVersion(),
  ],
});
```

## Properties

- `currentVersionLocked`: boolean (required) — If this is set to true, the ProductStack will not be overwritten if a snapshot is found for the currentVersionName.

- `currentVersionName`: string (required) — The current version name of the ProductStack.

- `description`: string — The description of the product version.

  **Default:** No description provided

- `directory`: string = 'product-stack-snapshots' — The directory where template snapshots will be stored.

- `productStack`: [ProductStack](/cdk/api/v2/docs/aws-cdk-lib.aws_servicecatalog.ProductStack.html) (required) — The ProductStack whose history will be retained as a snapshot.

- `validateTemplate`: boolean = true — Whether the specified product template will be validated by CloudFormation.

  If turned off, an invalid template configuration can be stored.
