aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 526 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateSecondsInRangeOrUndefined=validateSecondsInRangeOrUndefined;var cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp};function validateSecondsInRangeOrUndefined(name,min,max,duration){if(duration===void 0)return;const value=duration.toSeconds();if(!Number.isInteger(value)||value<min||value>max)throw new(cdk()).UnscopedValidationError(`${name}: Must be an int between ${min} and ${max} seconds (inclusive); received ${value}.`)}
;