aws-cdk-lib.aws_servicecatalog.CloudFormationRuleConstraintOptions

interface CloudFormationRuleConstraintOptions

LanguageType name
.NETAmazon.CDK.AWS.Servicecatalog.CloudFormationRuleConstraintOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#CloudFormationRuleConstraintOptions
Javasoftware.amazon.awscdk.services.servicecatalog.CloudFormationRuleConstraintOptions
Pythonaws_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

NameTypeDescription
ruleTemplateRuleThe rule with condition and assertions to apply to template.
description?stringThe description of the constraint.
messageLanguage?MessageLanguageThe language code.

rule

Type: TemplateRule

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: MessageLanguage (optional, default: English)

The language code.

Configures the language for error messages from service catalog.