Skip to content
v2.278.0

ValidationRuleSource Struct ​

A custom rule source for the validation engine.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const validationRuleSource: cdk.ValidationRuleSource = {
  content: 'content',
  name: 'name',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

validation_rule_source = cdk.ValidationRuleSource(
    content="content",
    name="name"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

ValidationRuleSource validationRuleSource = ValidationRuleSource.builder()
        .content("content")
        .name("name")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;

var validationRuleSource = new ValidationRuleSource {
    Content = "content",
    Name = "name"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

validationRuleSource := &ValidationRuleSource{
	Content: jsii.String("content"),
	Name: jsii.String("name"),
}

Properties ​

contentstringcontentstrcontentStringContentstringContent*string required #
The rule content (e.g., Rego policy source code).
namestringnamestrnameStringNamestringName*string required #
The name of the rule source.