UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 1.75 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CidrRoutingConfig=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class CidrRoutingConfig{static create(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_route53_CidrRoutingConfigProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.create),error}return new CidrRoutingConfig(props)}static withDefaultLocationName(collectionId){return new CidrRoutingConfig({collectionId,locationName:"*"})}constructor(props){const COLLECTION_ID_REGEX=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/,LOCATION_NAME_REGEX=/^[0-9A-Za-z_\-\*]{1,16}$/;if(!core_1().Token.isUnresolved(props.collectionId)&&!COLLECTION_ID_REGEX.test(props.collectionId))throw new(core_1()).UnscopedValidationError(`collectionId(${props.collectionId}) is required and must be a valid UUID in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx(8-4-4-4-12 hexadecimal digits)`);if(!core_1().Token.isUnresolved(props.locationName)&&(!props.locationName||!LOCATION_NAME_REGEX.test(props.locationName)))throw new(core_1()).UnscopedValidationError(`locationName(${props.locationName}) is required and must be 1-16 characters long, containing only letters, numbers, underscores, hyphens, or asterisks`);this.collectionId=props.collectionId,this.locationName=props.locationName??"*"}}exports.CidrRoutingConfig=CidrRoutingConfig,_a=JSII_RTTI_SYMBOL_1,CidrRoutingConfig[_a]={fqn:"aws-cdk-lib.aws_route53.CidrRoutingConfig",version:"2.211.0"};