class ProductStackHistory (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Servicecatalog.ProductStackHistory |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#ProductStackHistory |
![]() | software.amazon.awscdk.services.servicecatalog.ProductStackHistory |
![]() | aws_cdk.aws_servicecatalog.ProductStackHistory |
![]() | 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
Product
Stack 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. |
node
Type:
Node
The tree node.
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. |
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.