class ProductStackHistory (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Servicecatalog.ProductStackHistory |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#ProductStackHistory |
Java | software.amazon.awscdk.services.servicecatalog.ProductStackHistory |
Python | aws_cdk.aws_servicecatalog.ProductStackHistory |
TypeScript (source) | aws-cdk-lib » aws_servicecatalog » ProductStackHistory |
Implements
IConstruct, IDependable
A Construct that contains a Service Catalog product stack with its previous deployments maintained.
Example
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(),
],
});
Initializer
new ProductStackHistory(scope: Construct, id: string, props: ProductStackHistoryProps)
Parameters
- scope
Construct - id
string - props
ProductStack History Props
Construct Props
| Name | Type | Description |
|---|---|---|
| current | boolean | If this is set to true, the ProductStack will not be overwritten if a snapshot is found for the currentVersionName. |
| current | string | The current version name of the ProductStack. |
| product | Product | The ProductStack whose history will be retained as a snapshot. |
| description? | string | The description of the product version. |
| directory? | string | The directory where template snapshots will be stored. |
| validate | boolean | Whether the specified product template will be validated by CloudFormation. |
currentVersionLocked
Type:
boolean
If this is set to true, the ProductStack will not be overwritten if a snapshot is found for the currentVersionName.
currentVersionName
Type:
string
The current version name of the ProductStack.
productStack
Type:
Product
The ProductStack whose history will be retained as a snapshot.
description?
Type:
string
(optional, default: No description provided)
The description of the product version.
directory?
Type:
string
(optional, default: 'product-stack-snapshots')
The directory where template snapshots will be stored.
validateTemplate?
Type:
boolean
(optional, default: true)
Whether the specified product template will be validated by CloudFormation.
If turned off, an invalid template configuration can be stored.
Properties
| Name | Type | Description |
|---|---|---|
| node | Node | The tree node. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
node
Type:
Node
The tree node.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| current | Retains product stack template as a snapshot when deployed and retrieves a CloudFormationProductVersion for the current product version. |
| to | Returns a string representation of this construct. |
| version | Retrieves a CloudFormationProductVersion from a previously deployed productVersionName. |
| with(...mixins) | Applies one or more mixins to this construct. |
currentVersion()
public currentVersion(): CloudFormationProductVersion
Returns
Retains product stack template as a snapshot when deployed and retrieves a CloudFormationProductVersion for the current product version.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
versionFromSnapshot(productVersionName)
public versionFromSnapshot(productVersionName: string): CloudFormationProductVersion
Parameters
- productVersionName
string
Returns
Retrieves a CloudFormationProductVersion from a previously deployed productVersionName.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixin— The mixins to apply.
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.

.NET
Go
Java
Python
TypeScript (