class CloudFormationTemplate
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ServiceCatalog.CloudFormationTemplate |
Java | software.amazon.awscdk.services.servicecatalog.CloudFormationTemplate |
Python | aws_cdk.aws_servicecatalog.CloudFormationTemplate |
TypeScript (source) | @aws-cdk/aws-servicecatalog » CloudFormationTemplate |
Represents the Product Provisioning Artifact Template.
Example
import * as path from 'path';
const product = new servicecatalog.CloudFormationProduct(this, 'Product', {
productName: "My Product",
owner: "Product Owner",
productVersions: [
{
productVersionName: "v1",
cloudFormationTemplate: servicecatalog.CloudFormationTemplate.fromUrl(
'https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/ServiceCatalog/Product.yaml'),
},
{
productVersionName: "v2",
cloudFormationTemplate: servicecatalog.CloudFormationTemplate.fromAsset(path.join(__dirname, 'development-environment.template.json')),
},
],
});
Initializer
new CloudFormationTemplate()
Methods
Name | Description |
---|---|
bind(scope) | Called when the product is initialized to allow this object to bind to the stack, add resources and have fun. |
static from | Loads the provisioning artifacts template from a local disk path. |
static from | Creates a product with the resources defined in the given product stack. |
static from | Template from URL. |
bind(scope)
public bind(scope: Construct): CloudFormationTemplateConfig
Parameters
- scope
Construct
— The binding scope.
Returns
Called when the product is initialized to allow this object to bind to the stack, add resources and have fun.
Asset(path, options?)
static frompublic static fromAsset(path: string, options?: AssetOptions): CloudFormationTemplate
Parameters
- path
string
— A file containing the provisioning artifacts. - options
Asset
Options
Returns
Loads the provisioning artifacts template from a local disk path.
ProductStack(productStack)
static frompublic static fromProductStack(productStack: ProductStack): CloudFormationTemplate
Parameters
- productStack
Product
Stack
Returns
Creates a product with the resources defined in the given product stack.
Url(url)
static frompublic static fromUrl(url: string): CloudFormationTemplate
Parameters
- url
string
— The url that points to the provisioning artifacts template.
Returns
Template from URL.