UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 2.96 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimeBasedLinearTrafficRouting=exports.TimeBasedCanaryTrafficRouting=exports.AllAtOnceTrafficRouting=exports.TrafficRouting=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class TrafficRouting{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codedeploy.TrafficRouting",version:"2.233.0"};static allAtOnce(){return new AllAtOnceTrafficRouting}static timeBasedCanary(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codedeploy_TimeBasedCanaryTrafficRoutingProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.timeBasedCanary),error}return new TimeBasedCanaryTrafficRouting(props)}static timeBasedLinear(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codedeploy_TimeBasedLinearTrafficRoutingProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.timeBasedLinear),error}return new TimeBasedLinearTrafficRouting(props)}}exports.TrafficRouting=TrafficRouting;class AllAtOnceTrafficRouting extends TrafficRouting{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codedeploy.AllAtOnceTrafficRouting",version:"2.233.0"};constructor(){super()}bind(_scope){return{type:"AllAtOnce"}}}exports.AllAtOnceTrafficRouting=AllAtOnceTrafficRouting;class TimeBasedCanaryTrafficRouting extends TrafficRouting{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codedeploy.TimeBasedCanaryTrafficRouting",version:"2.233.0"};interval;percentage;constructor(props){super();try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codedeploy_TimeBasedCanaryTrafficRoutingProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,TimeBasedCanaryTrafficRouting),error}this.interval=props.interval,this.percentage=props.percentage}bind(_scope){return{type:"TimeBasedCanary",timeBasedCanary:{canaryInterval:this.interval.toMinutes(),canaryPercentage:this.percentage}}}}exports.TimeBasedCanaryTrafficRouting=TimeBasedCanaryTrafficRouting;class TimeBasedLinearTrafficRouting extends TrafficRouting{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codedeploy.TimeBasedLinearTrafficRouting",version:"2.233.0"};interval;percentage;constructor(props){super();try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codedeploy_TimeBasedLinearTrafficRoutingProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,TimeBasedLinearTrafficRouting),error}this.interval=props.interval,this.percentage=props.percentage}bind(_scope){return{type:"TimeBasedLinear",timeBasedLinear:{linearInterval:this.interval.toMinutes(),linearPercentage:this.percentage}}}}exports.TimeBasedLinearTrafficRouting=TimeBasedLinearTrafficRouting;