class JsonSchemaValidator
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppConfig.JsonSchemaValidator |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#JsonSchemaValidator |
![]() | software.amazon.awscdk.services.appconfig.JsonSchemaValidator |
![]() | aws_cdk.aws_appconfig.JsonSchemaValidator |
![]() | aws-cdk-lib » aws_appconfig » JsonSchemaValidator |
Implements
IValidator
Defines a JSON Schema validator.
Example
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
new JsonSchemaValidator()
Properties
Name | Type | Description |
---|---|---|
content | string | The content of the validator. |
type | Validator | The type of validator. |
content
Type:
string
The content of the validator.
type
Type:
Validator
The type of validator.
Methods
Name | Description |
---|---|
static from | Defines a JSON Schema validator from a file. |
static from | Defines a JSON Schema validator from inline code. |
static fromFile(inputPath)
public static fromFile(inputPath: string): JsonSchemaValidator
Parameters
- inputPath
string
— The path to the file that defines the validator.
Returns
Defines a JSON Schema validator from a file.
static fromInline(code)
public static fromInline(code: string): JsonSchemaValidator
Parameters
- code
string
— The inline code that defines the validator.
Returns
Defines a JSON Schema validator from inline code.