UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 2.56 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toIServerApplication=toIServerApplication,exports.toIEcsApplication=toIEcsApplication,exports.toILambdaApplication=toILambdaApplication,exports.toIServerDeploymentConfig=toIServerDeploymentConfig,exports.toIEcsDeploymentConfig=toIEcsDeploymentConfig,exports.toIBaseDeploymentConfig=toIBaseDeploymentConfig;var core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function toIServerApplication(app){if(!("applicationArn"in app)||!("applicationName"in app))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ApplicationInstanceShouldImplement`,`'application' instance should implement IServerApplication, but doesn't: ${app.constructor.name}`);return app}function toIEcsApplication(app){if(!("applicationArn"in app)||!("applicationName"in app))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ApplicationInstanceShouldImplement`,`'application' instance should implement IEcsApplication, but doesn't: ${app.constructor.name}`);return app}function toILambdaApplication(app){if(!("applicationArn"in app)||!("applicationName"in app))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`ApplicationInstanceShouldImplement`,`'application' instance should implement ILambdaApplication, but doesn't: ${app.constructor.name}`);return app}function toIServerDeploymentConfig(config){if(!("deploymentConfigArn"in config)||!("deploymentConfigName"in config))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DeploymentConfigInstanceImplementServer`,`'deploymentConfig' instance should implement IServerDeploymentConfig, but doesn't: ${config.constructor.name}`);return config}function toIEcsDeploymentConfig(config){if(!("deploymentConfigArn"in config)||!("deploymentConfigName"in config))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DeploymentConfigInstanceImplementEcs`,`'deploymentConfig' instance should implement IEcsDeploymentConfig, but doesn't: ${config.constructor.name}`);return config}function toIBaseDeploymentConfig(config){if(!("deploymentConfigArn"in config)||!("deploymentConfigName"in config))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`DeploymentConfigInstanceImplementLambda`,`'deploymentConfig' instance should implement ILambdaDeploymentConfig, but doesn't: ${config.constructor.name}`);return config}