interface TemplateRule
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Servicecatalog.TemplateRule |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#TemplateRule |
Java | software.amazon.awscdk.services.servicecatalog.TemplateRule |
Python | aws_cdk.aws_servicecatalog.TemplateRule |
TypeScript (source) | aws-cdk-lib » aws_servicecatalog » TemplateRule |
Defines the provisioning template constraints.
Example
import * as cdk from 'aws-cdk-lib';
declare const portfolio: servicecatalog.Portfolio;
declare const product: servicecatalog.CloudFormationProduct;
portfolio.constrainCloudFormationParameters(product, {
rule: {
ruleName: 'testInstanceType',
condition: Fn.conditionEquals(Fn.ref('Environment'), 'test'),
assertions: [{
assert: Fn.conditionContains(['t2.micro', 't2.small'], Fn.ref('InstanceType')),
description: 'For test environment, the instance type should be small',
}],
},
});
Properties
Name | Type | Description |
---|---|---|
assertions | Template [] | A list of assertions that make up the rule. |
rule | string | Name of the rule. |
condition? | ICfn | Specify when to apply rule with a rule-specific intrinsic function. |
assertions
Type:
Template
[]
A list of assertions that make up the rule.
ruleName
Type:
string
Name of the rule.
condition?
Type:
ICfn
(optional, default: no rule condition provided)
Specify when to apply rule with a rule-specific intrinsic function.