@amaabca/aws-lex-custom-resources
Version:
AWS Lex infrastructure as code via the CDK
20 lines (19 loc) • 703 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const constructs_1 = require("constructs");
const aws_cdk_lib_1 = require("aws-cdk-lib");
class default_1 extends constructs_1.Construct {
constructor(scope, id, serviceToken, props) {
super(scope, id);
this.resource = new aws_cdk_lib_1.CfnResource(this, id, {
type: 'Custom::LexBotAlias',
properties: {
ServiceToken: serviceToken,
...props,
},
});
// the custom resource will take care of cleaning this up
this.resource.applyRemovalPolicy(aws_cdk_lib_1.RemovalPolicy.RETAIN);
}
}
exports.default = default_1;