aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1 lines • 1.57 MB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnSecurityGroupEgress=exports.CfnSecurityGroup=exports.CfnRouteTable=exports.CfnRoute=exports.CfnPrefixList=exports.CfnPlacementGroup=exports.CfnNetworkPerformanceMetricSubscription=exports.CfnNetworkInterfacePermission=exports.CfnNetworkInterfaceAttachment=exports.CfnNetworkInterface=exports.CfnNetworkInsightsPath=exports.CfnNetworkInsightsAnalysis=exports.CfnNetworkInsightsAccessScopeAnalysis=exports.CfnNetworkInsightsAccessScope=exports.CfnNetworkAclEntry=exports.CfnNetworkAcl=exports.CfnNatGateway=exports.CfnLocalGatewayRouteTableVirtualInterfaceGroupAssociation=exports.CfnLocalGatewayRouteTableVPCAssociation=exports.CfnLocalGatewayRouteTable=exports.CfnLocalGatewayRoute=exports.CfnLaunchTemplate=exports.CfnKeyPair=exports.CfnInternetGateway=exports.CfnInstanceConnectEndpoint=exports.CfnInstance=exports.CfnIPAMScope=exports.CfnIPAMResourceDiscoveryAssociation=exports.CfnIPAMResourceDiscovery=exports.CfnIPAMPoolCidr=exports.CfnIPAMPool=exports.CfnIPAMAllocation=exports.CfnIPAM=exports.CfnHost=exports.CfnGatewayRouteTableAssociation=exports.CfnFlowLog=exports.CfnEnclaveCertificateIamRoleAssociation=exports.CfnEgressOnlyInternetGateway=exports.CfnEIPAssociation=exports.CfnEIP=exports.CfnEC2Fleet=exports.CfnDHCPOptions=exports.CfnCustomerGateway=exports.CfnClientVpnTargetNetworkAssociation=exports.CfnClientVpnRoute=exports.CfnClientVpnEndpoint=exports.CfnClientVpnAuthorizationRule=exports.CfnCarrierGateway=exports.CfnCapacityReservationFleet=exports.CfnCapacityReservation=void 0,exports.CfnRouteServerAssociation=exports.CfnRouteServer=exports.CfnLocalGatewayVirtualInterfaceGroup=exports.CfnLocalGatewayVirtualInterface=exports.CfnIpPoolRouteTableAssociation=exports.CfnIPAMPrefixListResolverTarget=exports.CfnIPAMPrefixListResolver=exports.CfnCapacityManagerDataExport=exports.CfnVolumeAttachment=exports.CfnVolume=exports.CfnVerifiedAccessTrustProvider=exports.CfnVerifiedAccessInstance=exports.CfnVerifiedAccessGroup=exports.CfnVerifiedAccessEndpoint=exports.CfnVPNGatewayRoutePropagation=exports.CfnVPNGateway=exports.CfnVPNConnectionRoute=exports.CfnVPNConnection=exports.CfnVPCPeeringConnection=exports.CfnVPCGatewayAttachment=exports.CfnVPCEndpointServicePermissions=exports.CfnVPCEndpointService=exports.CfnVPCEndpointConnectionNotification=exports.CfnVPCEndpoint=exports.CfnVPCDHCPOptionsAssociation=exports.CfnVPCCidrBlock=exports.CfnVPC=exports.CfnTransitGatewayVpcAttachment=exports.CfnTransitGatewayRouteTablePropagation=exports.CfnTransitGatewayRouteTableAssociation=exports.CfnTransitGatewayRouteTable=exports.CfnTransitGatewayRoute=exports.CfnTransitGatewayPeeringAttachment=exports.CfnTransitGatewayMulticastGroupSource=exports.CfnTransitGatewayMulticastGroupMember=exports.CfnTransitGatewayMulticastDomainAssociation=exports.CfnTransitGatewayMulticastDomain=exports.CfnTransitGatewayConnect=exports.CfnTransitGatewayAttachment=exports.CfnTransitGateway=exports.CfnTrafficMirrorTarget=exports.CfnTrafficMirrorSession=exports.CfnTrafficMirrorFilterRule=exports.CfnTrafficMirrorFilter=exports.CfnSubnetRouteTableAssociation=exports.CfnSubnetNetworkAclAssociation=exports.CfnSubnetCidrBlock=exports.CfnSubnet=exports.CfnSpotFleet=exports.CfnSecurityGroupIngress=void 0,exports.CfnVPNConcentrator=exports.CfnVPCEncryptionControl=exports.CfnVPCBlockPublicAccessOptions=exports.CfnVPCBlockPublicAccessExclusion=exports.CfnTransitGatewayMeteringPolicyEntry=exports.CfnTransitGatewayMeteringPolicy=exports.CfnTransitGatewayConnectPeer=exports.CfnSqlHaStandbyDetectedInstance=exports.CfnSnapshotBlockPublicAccess=exports.CfnSecurityGroupVpcAssociation=exports.CfnRouteServerPropagation=exports.CfnRouteServerPeer=exports.CfnRouteServerEndpoint=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../core/lib");return cdk=()=>tmp,tmp},cfn_parse=()=>{var tmp=require("../../core/lib/helpers-internal");return cfn_parse=()=>tmp,tmp},cdk_errors=()=>{var tmp=require("../../core/lib/errors");return cdk_errors=()=>tmp,tmp};class CfnCapacityReservation extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.CfnCapacityReservation",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::EC2::CapacityReservation";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCapacityReservationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnCapacityReservation(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnCapacityReservation(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnCapacityReservation.CFN_RESOURCE_TYPE_NAME}static fromCapacityReservationArn(scope,id,arn){class Import extends cdk().Resource{capacityReservationRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/${CapacityReservationId}").parse(arn2);this.capacityReservationRef={capacityReservationId:variables.CapacityReservationId,capacityReservationArn:arn2}}}return new Import(scope,id,arn)}static fromCapacityReservationId(scope,id,capacityReservationId){class Import extends cdk().Resource{capacityReservationRef;constructor(scope2,id2,capacityReservationId2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/${CapacityReservationId}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,CapacityReservationId:capacityReservationId2});super(scope2,id2,{environmentFromArn:arn}),this.capacityReservationRef={capacityReservationId:capacityReservationId2,capacityReservationArn:arn}}}return new Import(scope,id,capacityReservationId)}static arnForCapacityReservation(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_ec2_ICapacityReservationRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForCapacityReservation),error}return resource.capacityReservationRef.capacityReservationArn}_availabilityZone;_availabilityZoneId;_ebsOptimized;_endDate;_endDateType;_ephemeralStorage;_instanceCount;_instanceMatchCriteria;_instancePlatform;_instanceType;_outPostArn;_placementGroupArn;_tagSpecifications;_tenancy;_unusedReservationBillingOwnerId;constructor(scope,id,props){super(scope,id,{type:CfnCapacityReservation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_CfnCapacityReservationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCapacityReservation),error}cdk().requireProperty(props,"instanceCount",this),cdk().requireProperty(props,"instancePlatform",this),cdk().requireProperty(props,"instanceType",this),this._availabilityZone=props.availabilityZone,this._availabilityZoneId=props.availabilityZoneId,this._ebsOptimized=props.ebsOptimized,this._endDate=props.endDate,this._endDateType=props.endDateType,this._ephemeralStorage=props.ephemeralStorage,this._instanceCount=props.instanceCount,this._instanceMatchCriteria=props.instanceMatchCriteria,this._instancePlatform=props.instancePlatform,this._instanceType=props.instanceType,this._outPostArn=props.outPostArn,this._placementGroupArn=props.placementGroupArn,this._tagSpecifications=props.tagSpecifications,this._tenancy=props.tenancy,this._unusedReservationBillingOwnerId=props.unusedReservationBillingOwnerId}get capacityReservationRef(){return{capacityReservationId:this.ref,capacityReservationArn:this.attrCapacityReservationArn}}get availabilityZone(){return this._availabilityZone}set availabilityZone(value){cdk().traceProperty(this.node,"AvailabilityZone"),this._availabilityZone=value}get availabilityZoneId(){return this._availabilityZoneId}set availabilityZoneId(value){cdk().traceProperty(this.node,"AvailabilityZoneId"),this._availabilityZoneId=value}get ebsOptimized(){return this._ebsOptimized}set ebsOptimized(value){cdk().traceProperty(this.node,"EbsOptimized"),this._ebsOptimized=value}get endDate(){return this._endDate}set endDate(value){cdk().traceProperty(this.node,"EndDate"),this._endDate=value}get endDateType(){return this._endDateType}set endDateType(value){cdk().traceProperty(this.node,"EndDateType"),this._endDateType=value}get ephemeralStorage(){return this._ephemeralStorage}set ephemeralStorage(value){cdk().traceProperty(this.node,"EphemeralStorage"),this._ephemeralStorage=value}get instanceCount(){return this._instanceCount}set instanceCount(value){cdk().traceProperty(this.node,"InstanceCount"),this._instanceCount=value}get instanceMatchCriteria(){return this._instanceMatchCriteria}set instanceMatchCriteria(value){cdk().traceProperty(this.node,"InstanceMatchCriteria"),this._instanceMatchCriteria=value}get instancePlatform(){return this._instancePlatform}set instancePlatform(value){cdk().traceProperty(this.node,"InstancePlatform"),this._instancePlatform=value}get instanceType(){return this._instanceType}set instanceType(value){cdk().traceProperty(this.node,"InstanceType"),this._instanceType=value}get outPostArn(){return this._outPostArn}set outPostArn(value){cdk().traceProperty(this.node,"OutPostArn"),this._outPostArn=value}get placementGroupArn(){return this._placementGroupArn}set placementGroupArn(value){cdk().traceProperty(this.node,"PlacementGroupArn"),this._placementGroupArn=value}get tagSpecifications(){return this._tagSpecifications}set tagSpecifications(value){cdk().traceProperty(this.node,"TagSpecifications"),this._tagSpecifications=value}get tenancy(){return this._tenancy}set tenancy(value){cdk().traceProperty(this.node,"Tenancy"),this._tenancy=value}get unusedReservationBillingOwnerId(){return this._unusedReservationBillingOwnerId}set unusedReservationBillingOwnerId(value){cdk().traceProperty(this.node,"UnusedReservationBillingOwnerId"),this._unusedReservationBillingOwnerId=value}get attrAvailabilityZone(){return cdk().Token.asString(this.getAtt("AvailabilityZone",cdk().ResolutionTypeHint.STRING))}get attrAvailableInstanceCount(){return cdk().Token.asNumber(this.getAtt("AvailableInstanceCount",cdk().ResolutionTypeHint.NUMBER))}get attrCapacityAllocationSet(){return this.getAtt("CapacityAllocationSet")}get attrCapacityReservationArn(){return cdk().Token.asString(this.getAtt("CapacityReservationArn",cdk().ResolutionTypeHint.STRING))}get attrCapacityReservationFleetId(){return cdk().Token.asString(this.getAtt("CapacityReservationFleetId",cdk().ResolutionTypeHint.STRING))}get attrCommitmentInfo(){return this.getAtt("CommitmentInfo")}get attrCreateDate(){return cdk().Token.asString(this.getAtt("CreateDate",cdk().ResolutionTypeHint.STRING))}get attrDeliveryPreference(){return cdk().Token.asString(this.getAtt("DeliveryPreference",cdk().ResolutionTypeHint.STRING))}get attrId(){return cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING))}get attrInstanceType(){return cdk().Token.asString(this.getAtt("InstanceType",cdk().ResolutionTypeHint.STRING))}get attrOwnerId(){return cdk().Token.asString(this.getAtt("OwnerId",cdk().ResolutionTypeHint.STRING))}get attrReservationType(){return cdk().Token.asString(this.getAtt("ReservationType",cdk().ResolutionTypeHint.STRING))}get attrStartDate(){return cdk().Token.asString(this.getAtt("StartDate",cdk().ResolutionTypeHint.STRING))}get attrState(){return cdk().Token.asString(this.getAtt("State",cdk().ResolutionTypeHint.STRING))}get attrTenancy(){return cdk().Token.asString(this.getAtt("Tenancy",cdk().ResolutionTypeHint.STRING))}get attrTotalInstanceCount(){return cdk().Token.asNumber(this.getAtt("TotalInstanceCount",cdk().ResolutionTypeHint.NUMBER))}get cfnProperties(){return{availabilityZone:this._availabilityZone,availabilityZoneId:this._availabilityZoneId,ebsOptimized:this._ebsOptimized,endDate:this._endDate,endDateType:this._endDateType,ephemeralStorage:this._ephemeralStorage,instanceCount:this._instanceCount,instanceMatchCriteria:this._instanceMatchCriteria,instancePlatform:this._instancePlatform,instanceType:this._instanceType,outPostArn:this._outPostArn,placementGroupArn:this._placementGroupArn,tagSpecifications:this._tagSpecifications,tenancy:this._tenancy,unusedReservationBillingOwnerId:this._unusedReservationBillingOwnerId}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnCapacityReservation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnCapacityReservationPropsToCloudFormation(props)}}exports.CfnCapacityReservation=CfnCapacityReservation;function CfnCapacityReservationTagSpecificationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("resourceType",cdk().validateString)(properties.resourceType)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "TagSpecificationProperty"')}function convertCfnCapacityReservationTagSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationTagSpecificationPropertyValidator(properties).assertSuccess(),{ResourceType:cdk().stringToCloudFormation(properties.resourceType),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnCapacityReservationTagSpecificationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("resourceType","ResourceType",properties.ResourceType!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceType):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCapacityReservationCapacityAllocationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("allocationType",cdk().validateString)(properties.allocationType)),errors.collect(cdk().propertyValidator("count",cdk().validateNumber)(properties.count)),errors.wrap('supplied properties not correct for "CapacityAllocationProperty"')}function convertCfnCapacityReservationCapacityAllocationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationCapacityAllocationPropertyValidator(properties).assertSuccess(),{AllocationType:cdk().stringToCloudFormation(properties.allocationType),Count:cdk().numberToCloudFormation(properties.count)}):properties}function CfnCapacityReservationCapacityAllocationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("allocationType","AllocationType",properties.AllocationType!=null?cfn_parse().FromCloudFormation.getString(properties.AllocationType):void 0),ret.addPropertyResult("count","Count",properties.Count!=null?cfn_parse().FromCloudFormation.getNumber(properties.Count):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCapacityReservationCommitmentInfoPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("commitmentEndDate",cdk().validateString)(properties.commitmentEndDate)),errors.collect(cdk().propertyValidator("committedInstanceCount",cdk().validateNumber)(properties.committedInstanceCount)),errors.wrap('supplied properties not correct for "CommitmentInfoProperty"')}function convertCfnCapacityReservationCommitmentInfoPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationCommitmentInfoPropertyValidator(properties).assertSuccess(),{CommitmentEndDate:cdk().stringToCloudFormation(properties.commitmentEndDate),CommittedInstanceCount:cdk().numberToCloudFormation(properties.committedInstanceCount)}):properties}function CfnCapacityReservationCommitmentInfoPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("commitmentEndDate","CommitmentEndDate",properties.CommitmentEndDate!=null?cfn_parse().FromCloudFormation.getString(properties.CommitmentEndDate):void 0),ret.addPropertyResult("committedInstanceCount","CommittedInstanceCount",properties.CommittedInstanceCount!=null?cfn_parse().FromCloudFormation.getNumber(properties.CommittedInstanceCount):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCapacityReservationPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("availabilityZone",cdk().validateString)(properties.availabilityZone)),errors.collect(cdk().propertyValidator("availabilityZoneId",cdk().validateString)(properties.availabilityZoneId)),errors.collect(cdk().propertyValidator("ebsOptimized",cdk().validateBoolean)(properties.ebsOptimized)),errors.collect(cdk().propertyValidator("endDate",cdk().validateString)(properties.endDate)),errors.collect(cdk().propertyValidator("endDateType",cdk().validateString)(properties.endDateType)),errors.collect(cdk().propertyValidator("ephemeralStorage",cdk().validateBoolean)(properties.ephemeralStorage)),errors.collect(cdk().propertyValidator("instanceCount",cdk().requiredValidator)(properties.instanceCount)),errors.collect(cdk().propertyValidator("instanceCount",cdk().validateNumber)(properties.instanceCount)),errors.collect(cdk().propertyValidator("instanceMatchCriteria",cdk().validateString)(properties.instanceMatchCriteria)),errors.collect(cdk().propertyValidator("instancePlatform",cdk().requiredValidator)(properties.instancePlatform)),errors.collect(cdk().propertyValidator("instancePlatform",cdk().validateString)(properties.instancePlatform)),errors.collect(cdk().propertyValidator("instanceType",cdk().requiredValidator)(properties.instanceType)),errors.collect(cdk().propertyValidator("instanceType",cdk().validateString)(properties.instanceType)),errors.collect(cdk().propertyValidator("outPostArn",cdk().validateString)(properties.outPostArn)),errors.collect(cdk().propertyValidator("placementGroupArn",cdk().validateString)(properties.placementGroupArn)),errors.collect(cdk().propertyValidator("tagSpecifications",cdk().listValidator(CfnCapacityReservationTagSpecificationPropertyValidator))(properties.tagSpecifications)),errors.collect(cdk().propertyValidator("tenancy",cdk().validateString)(properties.tenancy)),errors.collect(cdk().propertyValidator("unusedReservationBillingOwnerId",cdk().validateString)(properties.unusedReservationBillingOwnerId)),errors.wrap('supplied properties not correct for "CfnCapacityReservationProps"')}function convertCfnCapacityReservationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationPropsValidator(properties).assertSuccess(),{AvailabilityZone:cdk().stringToCloudFormation(properties.availabilityZone),AvailabilityZoneId:cdk().stringToCloudFormation(properties.availabilityZoneId),EbsOptimized:cdk().booleanToCloudFormation(properties.ebsOptimized),EndDate:cdk().stringToCloudFormation(properties.endDate),EndDateType:cdk().stringToCloudFormation(properties.endDateType),EphemeralStorage:cdk().booleanToCloudFormation(properties.ephemeralStorage),InstanceCount:cdk().numberToCloudFormation(properties.instanceCount),InstanceMatchCriteria:cdk().stringToCloudFormation(properties.instanceMatchCriteria),InstancePlatform:cdk().stringToCloudFormation(properties.instancePlatform),InstanceType:cdk().stringToCloudFormation(properties.instanceType),OutPostArn:cdk().stringToCloudFormation(properties.outPostArn),PlacementGroupArn:cdk().stringToCloudFormation(properties.placementGroupArn),TagSpecifications:cdk().listMapper(convertCfnCapacityReservationTagSpecificationPropertyToCloudFormation)(properties.tagSpecifications),Tenancy:cdk().stringToCloudFormation(properties.tenancy),UnusedReservationBillingOwnerId:cdk().stringToCloudFormation(properties.unusedReservationBillingOwnerId)}):properties}function CfnCapacityReservationPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("availabilityZone","AvailabilityZone",properties.AvailabilityZone!=null?cfn_parse().FromCloudFormation.getString(properties.AvailabilityZone):void 0),ret.addPropertyResult("availabilityZoneId","AvailabilityZoneId",properties.AvailabilityZoneId!=null?cfn_parse().FromCloudFormation.getString(properties.AvailabilityZoneId):void 0),ret.addPropertyResult("ebsOptimized","EbsOptimized",properties.EbsOptimized!=null?cfn_parse().FromCloudFormation.getBoolean(properties.EbsOptimized):void 0),ret.addPropertyResult("endDate","EndDate",properties.EndDate!=null?cfn_parse().FromCloudFormation.getString(properties.EndDate):void 0),ret.addPropertyResult("endDateType","EndDateType",properties.EndDateType!=null?cfn_parse().FromCloudFormation.getString(properties.EndDateType):void 0),ret.addPropertyResult("ephemeralStorage","EphemeralStorage",properties.EphemeralStorage!=null?cfn_parse().FromCloudFormation.getBoolean(properties.EphemeralStorage):void 0),ret.addPropertyResult("instanceCount","InstanceCount",properties.InstanceCount!=null?cfn_parse().FromCloudFormation.getNumber(properties.InstanceCount):void 0),ret.addPropertyResult("instanceMatchCriteria","InstanceMatchCriteria",properties.InstanceMatchCriteria!=null?cfn_parse().FromCloudFormation.getString(properties.InstanceMatchCriteria):void 0),ret.addPropertyResult("instancePlatform","InstancePlatform",properties.InstancePlatform!=null?cfn_parse().FromCloudFormation.getString(properties.InstancePlatform):void 0),ret.addPropertyResult("instanceType","InstanceType",properties.InstanceType!=null?cfn_parse().FromCloudFormation.getString(properties.InstanceType):void 0),ret.addPropertyResult("outPostArn","OutPostArn",properties.OutPostArn!=null?cfn_parse().FromCloudFormation.getString(properties.OutPostArn):void 0),ret.addPropertyResult("placementGroupArn","PlacementGroupArn",properties.PlacementGroupArn!=null?cfn_parse().FromCloudFormation.getString(properties.PlacementGroupArn):void 0),ret.addPropertyResult("tagSpecifications","TagSpecifications",properties.TagSpecifications!=null?cfn_parse().FromCloudFormation.getArray(CfnCapacityReservationTagSpecificationPropertyFromCloudFormation)(properties.TagSpecifications):void 0),ret.addPropertyResult("tenancy","Tenancy",properties.Tenancy!=null?cfn_parse().FromCloudFormation.getString(properties.Tenancy):void 0),ret.addPropertyResult("unusedReservationBillingOwnerId","UnusedReservationBillingOwnerId",properties.UnusedReservationBillingOwnerId!=null?cfn_parse().FromCloudFormation.getString(properties.UnusedReservationBillingOwnerId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnCapacityReservationFleet extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.CfnCapacityReservationFleet",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::EC2::CapacityReservationFleet";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCapacityReservationFleetPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnCapacityReservationFleet(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnCapacityReservationFleet(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnCapacityReservationFleet.CFN_RESOURCE_TYPE_NAME}static fromCapacityReservationFleetId(scope,id,capacityReservationFleetId){class Import extends cdk().Resource{capacityReservationFleetRef;constructor(scope2,id2,capacityReservationFleetId2){super(scope2,id2),this.capacityReservationFleetRef={capacityReservationFleetId:capacityReservationFleetId2}}}return new Import(scope,id,capacityReservationFleetId)}static arnForCapacityReservationFleet(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_ec2_ICapacityReservationFleetRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForCapacityReservationFleet),error}return new(cfn_parse()).TemplateString("arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-fleet/${CapacityReservationFleetId}").interpolate({Partition:cdk().Stack.of(resource).partition,Region:resource.env.region,Account:resource.env.account,CapacityReservationFleetId:resource.capacityReservationFleetRef.capacityReservationFleetId})}_allocationStrategy;_endDate;_instanceMatchCriteria;_instanceTypeSpecifications;_noRemoveEndDate;_removeEndDate;_tagSpecifications;_tenancy;_totalTargetCapacity;constructor(scope,id,props={}){super(scope,id,{type:CfnCapacityReservationFleet.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_CfnCapacityReservationFleetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCapacityReservationFleet),error}this._allocationStrategy=props.allocationStrategy,this._endDate=props.endDate,this._instanceMatchCriteria=props.instanceMatchCriteria,this._instanceTypeSpecifications=props.instanceTypeSpecifications,this._noRemoveEndDate=props.noRemoveEndDate,this._removeEndDate=props.removeEndDate,this._tagSpecifications=props.tagSpecifications,this._tenancy=props.tenancy,this._totalTargetCapacity=props.totalTargetCapacity}get capacityReservationFleetRef(){return{capacityReservationFleetId:this.ref}}get allocationStrategy(){return this._allocationStrategy}set allocationStrategy(value){cdk().traceProperty(this.node,"AllocationStrategy"),this._allocationStrategy=value}get endDate(){return this._endDate}set endDate(value){cdk().traceProperty(this.node,"EndDate"),this._endDate=value}get instanceMatchCriteria(){return this._instanceMatchCriteria}set instanceMatchCriteria(value){cdk().traceProperty(this.node,"InstanceMatchCriteria"),this._instanceMatchCriteria=value}get instanceTypeSpecifications(){return this._instanceTypeSpecifications}set instanceTypeSpecifications(value){cdk().traceProperty(this.node,"InstanceTypeSpecifications"),this._instanceTypeSpecifications=value}get noRemoveEndDate(){return this._noRemoveEndDate}set noRemoveEndDate(value){cdk().traceProperty(this.node,"NoRemoveEndDate"),this._noRemoveEndDate=value}get removeEndDate(){return this._removeEndDate}set removeEndDate(value){cdk().traceProperty(this.node,"RemoveEndDate"),this._removeEndDate=value}get tagSpecifications(){return this._tagSpecifications}set tagSpecifications(value){cdk().traceProperty(this.node,"TagSpecifications"),this._tagSpecifications=value}get tenancy(){return this._tenancy}set tenancy(value){cdk().traceProperty(this.node,"Tenancy"),this._tenancy=value}get totalTargetCapacity(){return this._totalTargetCapacity}set totalTargetCapacity(value){cdk().traceProperty(this.node,"TotalTargetCapacity"),this._totalTargetCapacity=value}get attrCapacityReservationFleetId(){return cdk().Token.asString(this.getAtt("CapacityReservationFleetId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{allocationStrategy:this._allocationStrategy,endDate:this._endDate,instanceMatchCriteria:this._instanceMatchCriteria,instanceTypeSpecifications:this._instanceTypeSpecifications,noRemoveEndDate:this._noRemoveEndDate,removeEndDate:this._removeEndDate,tagSpecifications:this._tagSpecifications,tenancy:this._tenancy,totalTargetCapacity:this._totalTargetCapacity}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnCapacityReservationFleet.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnCapacityReservationFleetPropsToCloudFormation(props)}}exports.CfnCapacityReservationFleet=CfnCapacityReservationFleet;function CfnCapacityReservationFleetTagSpecificationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("resourceType",cdk().validateString)(properties.resourceType)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "TagSpecificationProperty"')}function convertCfnCapacityReservationFleetTagSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationFleetTagSpecificationPropertyValidator(properties).assertSuccess(),{ResourceType:cdk().stringToCloudFormation(properties.resourceType),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnCapacityReservationFleetTagSpecificationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("resourceType","ResourceType",properties.ResourceType!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceType):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCapacityReservationFleetInstanceTypeSpecificationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("availabilityZone",cdk().validateString)(properties.availabilityZone)),errors.collect(cdk().propertyValidator("availabilityZoneId",cdk().validateString)(properties.availabilityZoneId)),errors.collect(cdk().propertyValidator("ebsOptimized",cdk().validateBoolean)(properties.ebsOptimized)),errors.collect(cdk().propertyValidator("instancePlatform",cdk().validateString)(properties.instancePlatform)),errors.collect(cdk().propertyValidator("instanceType",cdk().validateString)(properties.instanceType)),errors.collect(cdk().propertyValidator("priority",cdk().validateNumber)(properties.priority)),errors.collect(cdk().propertyValidator("weight",cdk().validateNumber)(properties.weight)),errors.wrap('supplied properties not correct for "InstanceTypeSpecificationProperty"')}function convertCfnCapacityReservationFleetInstanceTypeSpecificationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationFleetInstanceTypeSpecificationPropertyValidator(properties).assertSuccess(),{AvailabilityZone:cdk().stringToCloudFormation(properties.availabilityZone),AvailabilityZoneId:cdk().stringToCloudFormation(properties.availabilityZoneId),EbsOptimized:cdk().booleanToCloudFormation(properties.ebsOptimized),InstancePlatform:cdk().stringToCloudFormation(properties.instancePlatform),InstanceType:cdk().stringToCloudFormation(properties.instanceType),Priority:cdk().numberToCloudFormation(properties.priority),Weight:cdk().numberToCloudFormation(properties.weight)}):properties}function CfnCapacityReservationFleetInstanceTypeSpecificationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("availabilityZone","AvailabilityZone",properties.AvailabilityZone!=null?cfn_parse().FromCloudFormation.getString(properties.AvailabilityZone):void 0),ret.addPropertyResult("availabilityZoneId","AvailabilityZoneId",properties.AvailabilityZoneId!=null?cfn_parse().FromCloudFormation.getString(properties.AvailabilityZoneId):void 0),ret.addPropertyResult("ebsOptimized","EbsOptimized",properties.EbsOptimized!=null?cfn_parse().FromCloudFormation.getBoolean(properties.EbsOptimized):void 0),ret.addPropertyResult("instancePlatform","InstancePlatform",properties.InstancePlatform!=null?cfn_parse().FromCloudFormation.getString(properties.InstancePlatform):void 0),ret.addPropertyResult("instanceType","InstanceType",properties.InstanceType!=null?cfn_parse().FromCloudFormation.getString(properties.InstanceType):void 0),ret.addPropertyResult("priority","Priority",properties.Priority!=null?cfn_parse().FromCloudFormation.getNumber(properties.Priority):void 0),ret.addPropertyResult("weight","Weight",properties.Weight!=null?cfn_parse().FromCloudFormation.getNumber(properties.Weight):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCapacityReservationFleetPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("allocationStrategy",cdk().validateString)(properties.allocationStrategy)),errors.collect(cdk().propertyValidator("endDate",cdk().validateString)(properties.endDate)),errors.collect(cdk().propertyValidator("instanceMatchCriteria",cdk().validateString)(properties.instanceMatchCriteria)),errors.collect(cdk().propertyValidator("instanceTypeSpecifications",cdk().listValidator(CfnCapacityReservationFleetInstanceTypeSpecificationPropertyValidator))(properties.instanceTypeSpecifications)),errors.collect(cdk().propertyValidator("noRemoveEndDate",cdk().validateBoolean)(properties.noRemoveEndDate)),errors.collect(cdk().propertyValidator("removeEndDate",cdk().validateBoolean)(properties.removeEndDate)),errors.collect(cdk().propertyValidator("tagSpecifications",cdk().listValidator(CfnCapacityReservationFleetTagSpecificationPropertyValidator))(properties.tagSpecifications)),errors.collect(cdk().propertyValidator("tenancy",cdk().validateString)(properties.tenancy)),errors.collect(cdk().propertyValidator("totalTargetCapacity",cdk().validateNumber)(properties.totalTargetCapacity)),errors.wrap('supplied properties not correct for "CfnCapacityReservationFleetProps"')}function convertCfnCapacityReservationFleetPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCapacityReservationFleetPropsValidator(properties).assertSuccess(),{AllocationStrategy:cdk().stringToCloudFormation(properties.allocationStrategy),EndDate:cdk().stringToCloudFormation(properties.endDate),InstanceMatchCriteria:cdk().stringToCloudFormation(properties.instanceMatchCriteria),InstanceTypeSpecifications:cdk().listMapper(convertCfnCapacityReservationFleetInstanceTypeSpecificationPropertyToCloudFormation)(properties.instanceTypeSpecifications),NoRemoveEndDate:cdk().booleanToCloudFormation(properties.noRemoveEndDate),RemoveEndDate:cdk().booleanToCloudFormation(properties.removeEndDate),TagSpecifications:cdk().listMapper(convertCfnCapacityReservationFleetTagSpecificationPropertyToCloudFormation)(properties.tagSpecifications),Tenancy:cdk().stringToCloudFormation(properties.tenancy),TotalTargetCapacity:cdk().numberToCloudFormation(properties.totalTargetCapacity)}):properties}function CfnCapacityReservationFleetPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("allocationStrategy","AllocationStrategy",properties.AllocationStrategy!=null?cfn_parse().FromCloudFormation.getString(properties.AllocationStrategy):void 0),ret.addPropertyResult("endDate","EndDate",properties.EndDate!=null?cfn_parse().FromCloudFormation.getString(properties.EndDate):void 0),ret.addPropertyResult("instanceMatchCriteria","InstanceMatchCriteria",properties.InstanceMatchCriteria!=null?cfn_parse().FromCloudFormation.getString(properties.InstanceMatchCriteria):void 0),ret.addPropertyResult("instanceTypeSpecifications","InstanceTypeSpecifications",properties.InstanceTypeSpecifications!=null?cfn_parse().FromCloudFormation.getArray(CfnCapacityReservationFleetInstanceTypeSpecificationPropertyFromCloudFormation)(properties.InstanceTypeSpecifications):void 0),ret.addPropertyResult("noRemoveEndDate","NoRemoveEndDate",properties.NoRemoveEndDate!=null?cfn_parse().FromCloudFormation.getBoolean(properties.NoRemoveEndDate):void 0),ret.addPropertyResult("removeEndDate","RemoveEndDate",properties.RemoveEndDate!=null?cfn_parse().FromCloudFormation.getBoolean(properties.RemoveEndDate):void 0),ret.addPropertyResult("tagSpecifications","TagSpecifications",properties.TagSpecifications!=null?cfn_parse().FromCloudFormation.getArray(CfnCapacityReservationFleetTagSpecificationPropertyFromCloudFormation)(properties.TagSpecifications):void 0),ret.addPropertyResult("tenancy","Tenancy",properties.Tenancy!=null?cfn_parse().FromCloudFormation.getString(properties.Tenancy):void 0),ret.addPropertyResult("totalTargetCapacity","TotalTargetCapacity",properties.TotalTargetCapacity!=null?cfn_parse().FromCloudFormation.getNumber(properties.TotalTargetCapacity):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnCarrierGateway extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.CfnCarrierGateway",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::EC2::CarrierGateway";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCarrierGatewayPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnCarrierGateway(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnCarrierGateway(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnCarrierGateway.CFN_RESOURCE_TYPE_NAME}static fromCarrierGatewayId(scope,id,carrierGatewayId){class Import extends cdk().Resource{carrierGatewayRef;constructor(scope2,id2,carrierGatewayId2){super(scope2,id2),this.carrierGatewayRef={carrierGatewayId:carrierGatewayId2}}}return new Import(scope,id,carrierGatewayId)}static arnForCarrierGateway(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_ec2_ICarrierGatewayRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForCarrierGateway),error}return new(cfn_parse()).TemplateString("arn:${Partition}:ec2:${Region}:${Account}:carrier-gateway/${CarrierGatewayId}").interpolate({Partition:cdk().Stack.of(resource).partition,Region:resource.env.region,Account:resource.env.account,CarrierGatewayId:resource.carrierGatewayRef.carrierGatewayId})}tags;_tagsRaw;_vpcId;constructor(scope,id,props){super(scope,id,{type:CfnCarrierGateway.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_CfnCarrierGatewayProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCarrierGateway),error}cdk().requireProperty(props,"vpcId",this),this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::EC2::CarrierGateway",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._vpcId=cdk().getRefProperty(props.vpcId?.vpcRef,"vpcId")??cdk().ensureStringOrUndefined(props.vpcId,"vpcId","ec2.IVPCRef | string")}get carrierGatewayRef(){return{carrierGatewayId:this.ref}}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get vpcId(){return this._vpcId}set vpcId(value){cdk().traceProperty(this.node,"VpcId"),this._vpcId=value}get attrCarrierGatewayId(){return cdk().Token.asString(this.getAtt("CarrierGatewayId",cdk().ResolutionTypeHint.STRING))}get attrOwnerId(){return cdk().Token.asString(this.getAtt("OwnerId",cdk().ResolutionTypeHint.STRING))}get attrState(){return cdk().Token.asString(this.getAtt("State",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{tags:this.tags.renderTags(),vpcId:this._vpcId}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnCarrierGateway.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnCarrierGatewayPropsToCloudFormation(props)}}exports.CfnCarrierGateway=CfnCarrierGateway;function CfnCarrierGatewayPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("vpcId",cdk().requiredValidator)(properties.vpcId)),errors.collect(cdk().propertyValidator("vpcId",cdk().validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "CfnCarrierGatewayProps"')}function convertCfnCarrierGatewayPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnCarrierGatewayPropsValidator(properties).assertSuccess(),{Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),VpcId:cdk().stringToCloudFormation(properties.vpcId)}):properties}function CfnCarrierGatewayPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("vpcId","VpcId",properties.VpcId!=null?cfn_parse().FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnClientVpnAuthorizationRule extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_ec2.CfnClientVpnAuthorizationRule",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::EC2::ClientVpnAuthorizationRule";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnClientVpnAuthorizationRulePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnClientVpnAuthorizationRule(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnClientVpnAuthorizationRule(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnClientVpnAuthorizationRule.CFN_RESOURCE_TYPE_NAME}_accessGroupId;_authorizeAllGroups;_clientVpnEndpointId;_description;_targetNetworkCidr;constructor(scope,id,props){super(scope,id,{type:CfnClientVpnAuthorizationRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_CfnClientVpnAuthorizationRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnClientVpnAuthorizationRule),error}cdk().requireProperty(props,"clientVpnEndpointId",this),cdk().requireProperty(props,"targetNetworkCidr",this),this._accessGroupId=props.accessGroupId,this._authorizeAllGroups=props.authorizeAllGroups,this._clientVpnEndpointId=props.clientVpnEndpointId,this._description=props.description,this._targetNetworkCidr=props.targetNetworkCidr}get clientVpnAuthorizationRuleRef(){return{clientVpnAuthorizationRuleId:this.ref}}get accessGroupId(){return this._accessGroupId}set accessGroupId(value){cdk().traceProperty(this.node,"AccessGroupId"),this._accessGroupId=value}get authorizeAllGroups(){return this._authorizeAllGroups}set authorizeAllGroups(value){cdk().traceProperty(this.node,"AuthorizeAllGroups"),this._authorizeAllGroups=value}get clientVpnEndpointId(){return this._clientVpnEndpointId}set clientVpnEndpointId(value){cdk().traceProperty(this.node,"ClientVpnEndpointId"),this._clientVpnEndpointId=value}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get targetNetworkCidr(){return this._targetNetworkCidr}set targetNetworkCidr(value){cdk().traceProperty(this.node,"TargetNetworkCidr"),this._targetNetworkCidr=value}get attrId(){return cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{accessGroupId:this._accessGroupId,authorizeAllGroups:this.