interface CloudFormationRuleConstraintOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Servicecatalog.CloudFormationRuleConstraintOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#CloudFormationRuleConstraintOptions |
Java | software.amazon.awscdk.services.servicecatalog.CloudFormationRuleConstraintOptions |
Python | aws_cdk.aws_servicecatalog.CloudFormationRuleConstraintOptions |
TypeScript (source) | aws-cdk-lib » aws_servicecatalog » CloudFormationRuleConstraintOptions |
Properties for provisoning rule constraint.
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 |
---|---|---|
rule | Template | The rule with condition and assertions to apply to template. |
description? | string | The description of the constraint. |
message | Message | The language code. |
rule
Type:
Template
The rule with condition and assertions to apply to template.
description?
Type:
string
(optional, default: No description provided)
The description of the constraint.
messageLanguage?
Type:
Message
(optional, default: English)
The language code.
Configures the language for error messages from service catalog.