UNPKG

@amaabca/aws-lex-custom-resources

Version:
31 lines (30 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const constructs_1 = require("constructs"); const aws_cdk_lib_1 = require("aws-cdk-lib"); const aws_sam_1 = require("aws-cdk-lib/aws-sam"); class default_1 extends constructs_1.Construct { constructor(scope, id, props) { var _a; super(scope, id); this.application = new aws_sam_1.CfnApplication(this, id, { location: { applicationId: 'arn:aws:serverlessrepo:us-east-1:777566285978:applications/lex-v2-cfn-cr', semanticVersion: props.semanticVersion, }, parameters: { LogLevel: (_a = props.logLevel) !== null && _a !== void 0 ? _a : 'INFO', }, }); } serviceToken() { return this.application.getAtt('Outputs.LexV2CfnCrFunctionArn'); } serviceLinkedRoleArn() { return this.application.getAtt('Outputs.LexServiceLinkedRole'); } serviceLinkedRoleName() { return aws_cdk_lib_1.Fn.select(2, aws_cdk_lib_1.Fn.split('/', aws_cdk_lib_1.Fn.select(5, aws_cdk_lib_1.Fn.split(':', this.serviceLinkedRoleArn().toString())))); } } exports.default = default_1;