"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RegionInfo=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_entities_1=()=>{var tmp=require("./aws-entities");return aws_entities_1=()=>tmp,tmp},fact_1=()=>{var tmp=require("./fact");return fact_1=()=>tmp,tmp};class RegionInfo{static get regions(){return fact_1().Fact.regions.map(RegionInfo.get)}static regionMap(factName){const ret={};for(const regionInfo of RegionInfo.regions){const fact=fact_1().Fact.find(regionInfo.name,factName);fact&&(ret[regionInfo.name]=fact)}return ret}static limitedRegionMap(factName,partitions){const ret={};for(const[region,value]of Object.entries(RegionInfo.regionMap(factName)))partitions.includes((0,aws_entities_1().partitionInformation)(region).partition)&&(ret[region]=value);return ret}static get(name){return new RegionInfo(name)}constructor(name){this.name=name}get cdkMetadataResourceAvailable(){return fact_1().Fact.find(this.name,fact_1().FactName.CDK_METADATA_RESOURCE_AVAILABLE)==="YES"}get isOptInRegion(){return fact_1().Fact.find(this.name,fact_1().FactName.IS_OPT_IN_REGION)==="YES"}get domainSuffix(){return fact_1().Fact.find(this.name,fact_1().FactName.DOMAIN_SUFFIX)}get partition(){return fact_1().Fact.find(this.name,fact_1().FactName.PARTITION)}get s3StaticWebsiteEndpoint(){return fact_1().Fact.find(this.name,fact_1().FactName.S3_STATIC_WEBSITE_ENDPOINT)}get s3StaticWebsiteHostedZoneId(){return fact_1().Fact.find(this.name,fact_1().FactName.S3_STATIC_WEBSITE_ZONE_53_HOSTED_ZONE_ID)}get ebsEnvEndpointHostedZoneId(){return fact_1().Fact.find(this.name,fact_1().FactName.EBS_ENV_ENDPOINT_HOSTED_ZONE_ID)}get vpcEndpointServiceNamePrefix(){return fact_1().Fact.find(this.name,fact_1().FactName.VPC_ENDPOINT_SERVICE_NAME_PREFIX)}servicePrincipal(service){try{jsiiDeprecationWarnings().print("aws-cdk-lib.region_info.RegionInfo#servicePrincipal","- Use `iam.ServicePrincipal.servicePrincipalName()` instead.")}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.servicePrincipal),error}return`${service.replace(/\.amazonaws\.com(\.cn)?$/,"")}.amazonaws.com`}get elbv2Account(){return fact_1().Fact.find(this.name,fact_1().FactName.ELBV2_ACCOUNT)}get dlcRepositoryAccount(){return fact_1().Fact.find(this.name,fact_1().FactName.DLC_REPOSITORY_ACCOUNT)}cloudwatchLambdaInsightsArn(insightsVersion,architecture){return fact_1().Fact.find(this.name,fact_1().FactName.cloudwatchLambdaInsightsVersion(insightsVersion,architecture))}appConfigLambdaArn(layerVersion,architecture){return fact_1().Fact.find(this.name,fact_1().FactName.appConfigLambdaLayerVersion(layerVersion,architecture))}get appMeshRepositoryAccount(){return fact_1().Fact.find(this.name,fact_1().FactName.APPMESH_ECR_ACCOUNT)}get firehoseCidrBlock(){return fact_1().Fact.find(this.name,fact_1().FactName.FIREHOSE_CIDR_BLOCK)}adotLambdaLayerArn(type,version,architecture){return fact_1().Fact.find(this.name,fact_1().FactName.adotLambdaLayer(type,version,architecture))}paramsAndSecretsLambdaLayerArn(version,architecture){return fact_1().Fact.find(this.name,fact_1().FactName.paramsAndSecretsLambdaLayer(version,architecture))}get samlSignOnUrl(){return fact_1().Fact.find(this.name,fact_1().FactName.SAML_SIGN_ON_URL)}}exports.RegionInfo=RegionInfo,_a=JSII_RTTI_SYMBOL_1,RegionInfo[_a]={fqn:"aws-cdk-lib.region_info.RegionInfo",version:"2.159.0"};
