Skip to content
v2.273.0

LambdaValidator Class ​

Defines an AWS Lambda validator.

Example ​

ts
declare const application: appconfig.Application;
declare const fn: lambda.Function;

new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', {
  application,
  content: appconfig.ConfigurationContent.fromInlineText('This is my configuration content.'),
  validators: [
    appconfig.JsonSchemaValidator.fromFile('schema.json'),
    appconfig.LambdaValidator.fromFunction(fn),
  ],
});

Initializer ​

ts
new LambdaValidator()
python
LambdaValidator()
java
new LambdaValidator()
csharp
new LambdaValidator()
go
NewLambdaValidator()

Properties ​

contentstringcontentstrcontentStringContentstringContent*stringrequired#
The content of the validator.
The type of validator.

Methods ​

fromFunction(func: Function): LambdaValidator // chainable@staticmethod def from_function(func: Function) -> LambdaValidatorpublic static LambdaValidator fromFunction(Function func)public static LambdaValidator FromFunction(Function func)func FromFunction(Func Function) LambdaValidatorstatic#
Defines an AWS Lambda validator from a Lambda function.

This will call addPermission to your function to grant AWS AppConfig permissions.

1 parameter

Parameters

  • funcfuncfuncfuncFunc — The function that defines the validator.