@aws-cdk/aws-ec2
Version:
The CDK Construct Library for AWS::EC2
837 lines • 5.54 MB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66;
Object.defineProperty(exports, "__esModule", { value: true });
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 = 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.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;
const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
// Copyright 2012-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Generated from the AWS CloudFormation Resource Specification
// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html
// @cfn2ts:meta@ {"generated":"2023-06-19T15:15:20.831Z","fingerprint":"F6sNc3cERISzEh+nPn+ov7S5wsov4C0C8Z4jB8Uo+uc="}
/* eslint-disable max-len */ // This is generated code - line lengths are difficult to control
const cdk = require("@aws-cdk/core");
const cfn_parse = require("@aws-cdk/core/lib/helpers-internal");
/**
* Determine whether the given properties match those of a `CfnCapacityReservationProps`
*
* @param properties - the TypeScript properties of a `CfnCapacityReservationProps`
*
* @returns the result of the validation.
*/
function CfnCapacityReservationPropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
}
errors.collect(cdk.propertyValidator('availabilityZone', cdk.requiredValidator)(properties.availabilityZone));
errors.collect(cdk.propertyValidator('availabilityZone', cdk.validateString)(properties.availabilityZone));
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(CfnCapacityReservation_TagSpecificationPropertyValidator))(properties.tagSpecifications));
errors.collect(cdk.propertyValidator('tenancy', cdk.validateString)(properties.tenancy));
return errors.wrap('supplied properties not correct for "CfnCapacityReservationProps"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::CapacityReservation` resource
*
* @param properties - the TypeScript properties of a `CfnCapacityReservationProps`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::CapacityReservation` resource.
*/
// @ts-ignore TS6133
function cfnCapacityReservationPropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnCapacityReservationPropsValidator(properties).assertSuccess();
return {
AvailabilityZone: cdk.stringToCloudFormation(properties.availabilityZone),
InstanceCount: cdk.numberToCloudFormation(properties.instanceCount),
InstancePlatform: cdk.stringToCloudFormation(properties.instancePlatform),
InstanceType: cdk.stringToCloudFormation(properties.instanceType),
EbsOptimized: cdk.booleanToCloudFormation(properties.ebsOptimized),
EndDate: cdk.stringToCloudFormation(properties.endDate),
EndDateType: cdk.stringToCloudFormation(properties.endDateType),
EphemeralStorage: cdk.booleanToCloudFormation(properties.ephemeralStorage),
InstanceMatchCriteria: cdk.stringToCloudFormation(properties.instanceMatchCriteria),
OutPostArn: cdk.stringToCloudFormation(properties.outPostArn),
PlacementGroupArn: cdk.stringToCloudFormation(properties.placementGroupArn),
TagSpecifications: cdk.listMapper(cfnCapacityReservationTagSpecificationPropertyToCloudFormation)(properties.tagSpecifications),
Tenancy: cdk.stringToCloudFormation(properties.tenancy),
};
}
// @ts-ignore TS6133
function CfnCapacityReservationPropsFromCloudFormation(properties) {
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('availabilityZone', 'AvailabilityZone', cfn_parse.FromCloudFormation.getString(properties.AvailabilityZone));
ret.addPropertyResult('instanceCount', 'InstanceCount', cfn_parse.FromCloudFormation.getNumber(properties.InstanceCount));
ret.addPropertyResult('instancePlatform', 'InstancePlatform', cfn_parse.FromCloudFormation.getString(properties.InstancePlatform));
ret.addPropertyResult('instanceType', 'InstanceType', cfn_parse.FromCloudFormation.getString(properties.InstanceType));
ret.addPropertyResult('ebsOptimized', 'EbsOptimized', properties.EbsOptimized != null ? cfn_parse.FromCloudFormation.getBoolean(properties.EbsOptimized) : undefined);
ret.addPropertyResult('endDate', 'EndDate', properties.EndDate != null ? cfn_parse.FromCloudFormation.getString(properties.EndDate) : undefined);
ret.addPropertyResult('endDateType', 'EndDateType', properties.EndDateType != null ? cfn_parse.FromCloudFormation.getString(properties.EndDateType) : undefined);
ret.addPropertyResult('ephemeralStorage', 'EphemeralStorage', properties.EphemeralStorage != null ? cfn_parse.FromCloudFormation.getBoolean(properties.EphemeralStorage) : undefined);
ret.addPropertyResult('instanceMatchCriteria', 'InstanceMatchCriteria', properties.InstanceMatchCriteria != null ? cfn_parse.FromCloudFormation.getString(properties.InstanceMatchCriteria) : undefined);
ret.addPropertyResult('outPostArn', 'OutPostArn', properties.OutPostArn != null ? cfn_parse.FromCloudFormation.getString(properties.OutPostArn) : undefined);
ret.addPropertyResult('placementGroupArn', 'PlacementGroupArn', properties.PlacementGroupArn != null ? cfn_parse.FromCloudFormation.getString(properties.PlacementGroupArn) : undefined);
ret.addPropertyResult('tagSpecifications', 'TagSpecifications', properties.TagSpecifications != null ? cfn_parse.FromCloudFormation.getArray(CfnCapacityReservationTagSpecificationPropertyFromCloudFormation)(properties.TagSpecifications) : undefined);
ret.addPropertyResult('tenancy', 'Tenancy', properties.Tenancy != null ? cfn_parse.FromCloudFormation.getString(properties.Tenancy) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* A CloudFormation `AWS::EC2::CapacityReservation`
*
* Creates a new Capacity Reservation with the specified attributes. For more information, see [Capacity Reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) in the *Amazon EC2 User Guide* .
*
* @cloudformationResource AWS::EC2::CapacityReservation
* @stability external
*
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservation.html
*/
class CfnCapacityReservation extends cdk.CfnResource {
/**
* Create a new `AWS::EC2::CapacityReservation`.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope, id, props) {
super(scope, id, { type: CfnCapacityReservation.CFN_RESOURCE_TYPE_NAME, properties: props });
try {
jsiiDeprecationWarnings._aws_cdk_aws_ec2_CfnCapacityReservationProps(props);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
Error.captureStackTrace(error, CfnCapacityReservation);
}
throw error;
}
cdk.requireProperty(props, 'availabilityZone', this);
cdk.requireProperty(props, 'instanceCount', this);
cdk.requireProperty(props, 'instancePlatform', this);
cdk.requireProperty(props, 'instanceType', this);
this.attrAvailabilityZone = cdk.Token.asString(this.getAtt('AvailabilityZone'));
this.attrAvailableInstanceCount = cdk.Token.asNumber(this.getAtt('AvailableInstanceCount'));
this.attrId = cdk.Token.asString(this.getAtt('Id'));
this.attrInstanceType = cdk.Token.asString(this.getAtt('InstanceType'));
this.attrTenancy = cdk.Token.asString(this.getAtt('Tenancy'));
this.attrTotalInstanceCount = cdk.Token.asNumber(this.getAtt('TotalInstanceCount'));
this.availabilityZone = props.availabilityZone;
this.instanceCount = props.instanceCount;
this.instancePlatform = props.instancePlatform;
this.instanceType = props.instanceType;
this.ebsOptimized = props.ebsOptimized;
this.endDate = props.endDate;
this.endDateType = props.endDateType;
this.ephemeralStorage = props.ephemeralStorage;
this.instanceMatchCriteria = props.instanceMatchCriteria;
this.outPostArn = props.outPostArn;
this.placementGroupArn = props.placementGroupArn;
this.tagSpecifications = props.tagSpecifications;
this.tenancy = props.tenancy;
}
/**
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope, id, resourceAttributes, options) {
resourceAttributes = resourceAttributes || {};
const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
const propsResult = CfnCapacityReservationPropsFromCloudFormation(resourceProperties);
const ret = new CfnCapacityReservation(scope, id, propsResult.value);
for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
ret.addPropertyOverride(propKey, propVal);
}
options.parser.handleAttributes(ret, resourceAttributes, id);
return ret;
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector - tree inspector to collect and process attributes
*
*/
inspect(inspector) {
inspector.addAttribute("aws:cdk:cloudformation:type", CfnCapacityReservation.CFN_RESOURCE_TYPE_NAME);
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
}
get cfnProperties() {
return {
availabilityZone: this.availabilityZone,
instanceCount: this.instanceCount,
instancePlatform: this.instancePlatform,
instanceType: this.instanceType,
ebsOptimized: this.ebsOptimized,
endDate: this.endDate,
endDateType: this.endDateType,
ephemeralStorage: this.ephemeralStorage,
instanceMatchCriteria: this.instanceMatchCriteria,
outPostArn: this.outPostArn,
placementGroupArn: this.placementGroupArn,
tagSpecifications: this.tagSpecifications,
tenancy: this.tenancy,
};
}
renderProperties(props) {
return cfnCapacityReservationPropsToCloudFormation(props);
}
}
exports.CfnCapacityReservation = CfnCapacityReservation;
_a = JSII_RTTI_SYMBOL_1;
CfnCapacityReservation[_a] = { fqn: "@aws-cdk/aws-ec2.CfnCapacityReservation", version: "1.204.0" };
/**
* The CloudFormation resource type name for this resource class.
*/
CfnCapacityReservation.CFN_RESOURCE_TYPE_NAME = "AWS::EC2::CapacityReservation";
/**
* Determine whether the given properties match those of a `TagSpecificationProperty`
*
* @param properties - the TypeScript properties of a `TagSpecificationProperty`
*
* @returns the result of the validation.
*/
function CfnCapacityReservation_TagSpecificationPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
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));
return errors.wrap('supplied properties not correct for "TagSpecificationProperty"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::CapacityReservation.TagSpecification` resource
*
* @param properties - the TypeScript properties of a `TagSpecificationProperty`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::CapacityReservation.TagSpecification` resource.
*/
// @ts-ignore TS6133
function cfnCapacityReservationTagSpecificationPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnCapacityReservation_TagSpecificationPropertyValidator(properties).assertSuccess();
return {
ResourceType: cdk.stringToCloudFormation(properties.resourceType),
Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),
};
}
// @ts-ignore TS6133
function CfnCapacityReservationTagSpecificationPropertyFromCloudFormation(properties) {
if (cdk.isResolvableObject(properties)) {
return new cfn_parse.FromCloudFormationResult(properties);
}
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('resourceType', 'ResourceType', properties.ResourceType != null ? cfn_parse.FromCloudFormation.getString(properties.ResourceType) : undefined);
ret.addPropertyResult('tags', 'Tags', properties.Tags != null ? cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* Determine whether the given properties match those of a `CfnCapacityReservationFleetProps`
*
* @param properties - the TypeScript properties of a `CfnCapacityReservationFleetProps`
*
* @returns the result of the validation.
*/
function CfnCapacityReservationFleetPropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
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(CfnCapacityReservationFleet_InstanceTypeSpecificationPropertyValidator))(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(CfnCapacityReservationFleet_TagSpecificationPropertyValidator))(properties.tagSpecifications));
errors.collect(cdk.propertyValidator('tenancy', cdk.validateString)(properties.tenancy));
errors.collect(cdk.propertyValidator('totalTargetCapacity', cdk.validateNumber)(properties.totalTargetCapacity));
return errors.wrap('supplied properties not correct for "CfnCapacityReservationFleetProps"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::CapacityReservationFleet` resource
*
* @param properties - the TypeScript properties of a `CfnCapacityReservationFleetProps`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::CapacityReservationFleet` resource.
*/
// @ts-ignore TS6133
function cfnCapacityReservationFleetPropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnCapacityReservationFleetPropsValidator(properties).assertSuccess();
return {
AllocationStrategy: cdk.stringToCloudFormation(properties.allocationStrategy),
EndDate: cdk.stringToCloudFormation(properties.endDate),
InstanceMatchCriteria: cdk.stringToCloudFormation(properties.instanceMatchCriteria),
InstanceTypeSpecifications: cdk.listMapper(cfnCapacityReservationFleetInstanceTypeSpecificationPropertyToCloudFormation)(properties.instanceTypeSpecifications),
NoRemoveEndDate: cdk.booleanToCloudFormation(properties.noRemoveEndDate),
RemoveEndDate: cdk.booleanToCloudFormation(properties.removeEndDate),
TagSpecifications: cdk.listMapper(cfnCapacityReservationFleetTagSpecificationPropertyToCloudFormation)(properties.tagSpecifications),
Tenancy: cdk.stringToCloudFormation(properties.tenancy),
TotalTargetCapacity: cdk.numberToCloudFormation(properties.totalTargetCapacity),
};
}
// @ts-ignore TS6133
function CfnCapacityReservationFleetPropsFromCloudFormation(properties) {
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('allocationStrategy', 'AllocationStrategy', properties.AllocationStrategy != null ? cfn_parse.FromCloudFormation.getString(properties.AllocationStrategy) : undefined);
ret.addPropertyResult('endDate', 'EndDate', properties.EndDate != null ? cfn_parse.FromCloudFormation.getString(properties.EndDate) : undefined);
ret.addPropertyResult('instanceMatchCriteria', 'InstanceMatchCriteria', properties.InstanceMatchCriteria != null ? cfn_parse.FromCloudFormation.getString(properties.InstanceMatchCriteria) : undefined);
ret.addPropertyResult('instanceTypeSpecifications', 'InstanceTypeSpecifications', properties.InstanceTypeSpecifications != null ? cfn_parse.FromCloudFormation.getArray(CfnCapacityReservationFleetInstanceTypeSpecificationPropertyFromCloudFormation)(properties.InstanceTypeSpecifications) : undefined);
ret.addPropertyResult('noRemoveEndDate', 'NoRemoveEndDate', properties.NoRemoveEndDate != null ? cfn_parse.FromCloudFormation.getBoolean(properties.NoRemoveEndDate) : undefined);
ret.addPropertyResult('removeEndDate', 'RemoveEndDate', properties.RemoveEndDate != null ? cfn_parse.FromCloudFormation.getBoolean(properties.RemoveEndDate) : undefined);
ret.addPropertyResult('tagSpecifications', 'TagSpecifications', properties.TagSpecifications != null ? cfn_parse.FromCloudFormation.getArray(CfnCapacityReservationFleetTagSpecificationPropertyFromCloudFormation)(properties.TagSpecifications) : undefined);
ret.addPropertyResult('tenancy', 'Tenancy', properties.Tenancy != null ? cfn_parse.FromCloudFormation.getString(properties.Tenancy) : undefined);
ret.addPropertyResult('totalTargetCapacity', 'TotalTargetCapacity', properties.TotalTargetCapacity != null ? cfn_parse.FromCloudFormation.getNumber(properties.TotalTargetCapacity) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* A CloudFormation `AWS::EC2::CapacityReservationFleet`
*
* Creates a new Capacity Reservation Fleet with the specified attributes. For more information, see [Capacity Reservation Fleets](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-fleets.html) in the *Amazon EC2 User Guide* .
*
* @cloudformationResource AWS::EC2::CapacityReservationFleet
* @stability external
*
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html
*/
class CfnCapacityReservationFleet extends cdk.CfnResource {
/**
* Create a new `AWS::EC2::CapacityReservationFleet`.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope, id, props = {}) {
super(scope, id, { type: CfnCapacityReservationFleet.CFN_RESOURCE_TYPE_NAME, properties: props });
try {
jsiiDeprecationWarnings._aws_cdk_aws_ec2_CfnCapacityReservationFleetProps(props);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
Error.captureStackTrace(error, CfnCapacityReservationFleet);
}
throw error;
}
this.attrCapacityReservationFleetId = cdk.Token.asString(this.getAtt('CapacityReservationFleetId'));
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;
}
/**
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope, id, resourceAttributes, options) {
resourceAttributes = resourceAttributes || {};
const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
const propsResult = CfnCapacityReservationFleetPropsFromCloudFormation(resourceProperties);
const ret = new CfnCapacityReservationFleet(scope, id, propsResult.value);
for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
ret.addPropertyOverride(propKey, propVal);
}
options.parser.handleAttributes(ret, resourceAttributes, id);
return ret;
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector - tree inspector to collect and process attributes
*
*/
inspect(inspector) {
inspector.addAttribute("aws:cdk:cloudformation:type", CfnCapacityReservationFleet.CFN_RESOURCE_TYPE_NAME);
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
}
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,
};
}
renderProperties(props) {
return cfnCapacityReservationFleetPropsToCloudFormation(props);
}
}
exports.CfnCapacityReservationFleet = CfnCapacityReservationFleet;
_b = JSII_RTTI_SYMBOL_1;
CfnCapacityReservationFleet[_b] = { fqn: "@aws-cdk/aws-ec2.CfnCapacityReservationFleet", version: "1.204.0" };
/**
* The CloudFormation resource type name for this resource class.
*/
CfnCapacityReservationFleet.CFN_RESOURCE_TYPE_NAME = "AWS::EC2::CapacityReservationFleet";
/**
* Determine whether the given properties match those of a `InstanceTypeSpecificationProperty`
*
* @param properties - the TypeScript properties of a `InstanceTypeSpecificationProperty`
*
* @returns the result of the validation.
*/
function CfnCapacityReservationFleet_InstanceTypeSpecificationPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
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));
return errors.wrap('supplied properties not correct for "InstanceTypeSpecificationProperty"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::CapacityReservationFleet.InstanceTypeSpecification` resource
*
* @param properties - the TypeScript properties of a `InstanceTypeSpecificationProperty`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::CapacityReservationFleet.InstanceTypeSpecification` resource.
*/
// @ts-ignore TS6133
function cfnCapacityReservationFleetInstanceTypeSpecificationPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnCapacityReservationFleet_InstanceTypeSpecificationPropertyValidator(properties).assertSuccess();
return {
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),
};
}
// @ts-ignore TS6133
function CfnCapacityReservationFleetInstanceTypeSpecificationPropertyFromCloudFormation(properties) {
if (cdk.isResolvableObject(properties)) {
return new cfn_parse.FromCloudFormationResult(properties);
}
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('availabilityZone', 'AvailabilityZone', properties.AvailabilityZone != null ? cfn_parse.FromCloudFormation.getString(properties.AvailabilityZone) : undefined);
ret.addPropertyResult('availabilityZoneId', 'AvailabilityZoneId', properties.AvailabilityZoneId != null ? cfn_parse.FromCloudFormation.getString(properties.AvailabilityZoneId) : undefined);
ret.addPropertyResult('ebsOptimized', 'EbsOptimized', properties.EbsOptimized != null ? cfn_parse.FromCloudFormation.getBoolean(properties.EbsOptimized) : undefined);
ret.addPropertyResult('instancePlatform', 'InstancePlatform', properties.InstancePlatform != null ? cfn_parse.FromCloudFormation.getString(properties.InstancePlatform) : undefined);
ret.addPropertyResult('instanceType', 'InstanceType', properties.InstanceType != null ? cfn_parse.FromCloudFormation.getString(properties.InstanceType) : undefined);
ret.addPropertyResult('priority', 'Priority', properties.Priority != null ? cfn_parse.FromCloudFormation.getNumber(properties.Priority) : undefined);
ret.addPropertyResult('weight', 'Weight', properties.Weight != null ? cfn_parse.FromCloudFormation.getNumber(properties.Weight) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* Determine whether the given properties match those of a `TagSpecificationProperty`
*
* @param properties - the TypeScript properties of a `TagSpecificationProperty`
*
* @returns the result of the validation.
*/
function CfnCapacityReservationFleet_TagSpecificationPropertyValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
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));
return errors.wrap('supplied properties not correct for "TagSpecificationProperty"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::CapacityReservationFleet.TagSpecification` resource
*
* @param properties - the TypeScript properties of a `TagSpecificationProperty`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::CapacityReservationFleet.TagSpecification` resource.
*/
// @ts-ignore TS6133
function cfnCapacityReservationFleetTagSpecificationPropertyToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnCapacityReservationFleet_TagSpecificationPropertyValidator(properties).assertSuccess();
return {
ResourceType: cdk.stringToCloudFormation(properties.resourceType),
Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),
};
}
// @ts-ignore TS6133
function CfnCapacityReservationFleetTagSpecificationPropertyFromCloudFormation(properties) {
if (cdk.isResolvableObject(properties)) {
return new cfn_parse.FromCloudFormationResult(properties);
}
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('resourceType', 'ResourceType', properties.ResourceType != null ? cfn_parse.FromCloudFormation.getString(properties.ResourceType) : undefined);
ret.addPropertyResult('tags', 'Tags', properties.Tags != null ? cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* Determine whether the given properties match those of a `CfnCarrierGatewayProps`
*
* @param properties - the TypeScript properties of a `CfnCarrierGatewayProps`
*
* @returns the result of the validation.
*/
function CfnCarrierGatewayPropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
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));
return errors.wrap('supplied properties not correct for "CfnCarrierGatewayProps"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::CarrierGateway` resource
*
* @param properties - the TypeScript properties of a `CfnCarrierGatewayProps`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::CarrierGateway` resource.
*/
// @ts-ignore TS6133
function cfnCarrierGatewayPropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnCarrierGatewayPropsValidator(properties).assertSuccess();
return {
VpcId: cdk.stringToCloudFormation(properties.vpcId),
Tags: cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),
};
}
// @ts-ignore TS6133
function CfnCarrierGatewayPropsFromCloudFormation(properties) {
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('vpcId', 'VpcId', cfn_parse.FromCloudFormation.getString(properties.VpcId));
ret.addPropertyResult('tags', 'Tags', properties.Tags != null ? cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* A CloudFormation `AWS::EC2::CarrierGateway`
*
* Creates a carrier gateway. For more information about carrier gateways, see [Carrier gateways](https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#wavelength-carrier-gateway) in the *AWS Wavelength Developer Guide* .
*
* @cloudformationResource AWS::EC2::CarrierGateway
* @stability external
*
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-carriergateway.html
*/
class CfnCarrierGateway extends cdk.CfnResource {
/**
* Create a new `AWS::EC2::CarrierGateway`.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope, id, props) {
super(scope, id, { type: CfnCarrierGateway.CFN_RESOURCE_TYPE_NAME, properties: props });
try {
jsiiDeprecationWarnings._aws_cdk_aws_ec2_CfnCarrierGatewayProps(props);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
Error.captureStackTrace(error, CfnCarrierGateway);
}
throw error;
}
cdk.requireProperty(props, 'vpcId', this);
this.attrCarrierGatewayId = cdk.Token.asString(this.getAtt('CarrierGatewayId'));
this.attrOwnerId = cdk.Token.asString(this.getAtt('OwnerId'));
this.attrState = cdk.Token.asString(this.getAtt('State'));
this.vpcId = props.vpcId;
this.tags = new cdk.TagManager(cdk.TagType.STANDARD, "AWS::EC2::CarrierGateway", props.tags, { tagPropertyName: 'tags' });
}
/**
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope, id, resourceAttributes, options) {
resourceAttributes = resourceAttributes || {};
const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
const propsResult = CfnCarrierGatewayPropsFromCloudFormation(resourceProperties);
const ret = new CfnCarrierGateway(scope, id, propsResult.value);
for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
ret.addPropertyOverride(propKey, propVal);
}
options.parser.handleAttributes(ret, resourceAttributes, id);
return ret;
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector - tree inspector to collect and process attributes
*
*/
inspect(inspector) {
inspector.addAttribute("aws:cdk:cloudformation:type", CfnCarrierGateway.CFN_RESOURCE_TYPE_NAME);
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
}
get cfnProperties() {
return {
vpcId: this.vpcId,
tags: this.tags.renderTags(),
};
}
renderProperties(props) {
return cfnCarrierGatewayPropsToCloudFormation(props);
}
}
exports.CfnCarrierGateway = CfnCarrierGateway;
_c = JSII_RTTI_SYMBOL_1;
CfnCarrierGateway[_c] = { fqn: "@aws-cdk/aws-ec2.CfnCarrierGateway", version: "1.204.0" };
/**
* The CloudFormation resource type name for this resource class.
*/
CfnCarrierGateway.CFN_RESOURCE_TYPE_NAME = "AWS::EC2::CarrierGateway";
/**
* Determine whether the given properties match those of a `CfnClientVpnAuthorizationRuleProps`
*
* @param properties - the TypeScript properties of a `CfnClientVpnAuthorizationRuleProps`
*
* @returns the result of the validation.
*/
function CfnClientVpnAuthorizationRulePropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
}
errors.collect(cdk.propertyValidator('accessGroupId', cdk.validateString)(properties.accessGroupId));
errors.collect(cdk.propertyValidator('authorizeAllGroups', cdk.validateBoolean)(properties.authorizeAllGroups));
errors.collect(cdk.propertyValidator('clientVpnEndpointId', cdk.requiredValidator)(properties.clientVpnEndpointId));
errors.collect(cdk.propertyValidator('clientVpnEndpointId', cdk.validateString)(properties.clientVpnEndpointId));
errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));
errors.collect(cdk.propertyValidator('targetNetworkCidr', cdk.requiredValidator)(properties.targetNetworkCidr));
errors.collect(cdk.propertyValidator('targetNetworkCidr', cdk.validateString)(properties.targetNetworkCidr));
return errors.wrap('supplied properties not correct for "CfnClientVpnAuthorizationRuleProps"');
}
/**
* Renders the AWS CloudFormation properties of an `AWS::EC2::ClientVpnAuthorizationRule` resource
*
* @param properties - the TypeScript properties of a `CfnClientVpnAuthorizationRuleProps`
*
* @returns the AWS CloudFormation properties of an `AWS::EC2::ClientVpnAuthorizationRule` resource.
*/
// @ts-ignore TS6133
function cfnClientVpnAuthorizationRulePropsToCloudFormation(properties) {
if (!cdk.canInspect(properties)) {
return properties;
}
CfnClientVpnAuthorizationRulePropsValidator(properties).assertSuccess();
return {
ClientVpnEndpointId: cdk.stringToCloudFormation(properties.clientVpnEndpointId),
TargetNetworkCidr: cdk.stringToCloudFormation(properties.targetNetworkCidr),
AccessGroupId: cdk.stringToCloudFormation(properties.accessGroupId),
AuthorizeAllGroups: cdk.booleanToCloudFormation(properties.authorizeAllGroups),
Description: cdk.stringToCloudFormation(properties.description),
};
}
// @ts-ignore TS6133
function CfnClientVpnAuthorizationRulePropsFromCloudFormation(properties) {
properties = properties == null ? {} : properties;
if (typeof properties !== 'object') {
return new cfn_parse.FromCloudFormationResult(properties);
}
const ret = new cfn_parse.FromCloudFormationPropertyObject();
ret.addPropertyResult('clientVpnEndpointId', 'ClientVpnEndpointId', cfn_parse.FromCloudFormation.getString(properties.ClientVpnEndpointId));
ret.addPropertyResult('targetNetworkCidr', 'TargetNetworkCidr', cfn_parse.FromCloudFormation.getString(properties.TargetNetworkCidr));
ret.addPropertyResult('accessGroupId', 'AccessGroupId', properties.AccessGroupId != null ? cfn_parse.FromCloudFormation.getString(properties.AccessGroupId) : undefined);
ret.addPropertyResult('authorizeAllGroups', 'AuthorizeAllGroups', properties.AuthorizeAllGroups != null ? cfn_parse.FromCloudFormation.getBoolean(properties.AuthorizeAllGroups) : undefined);
ret.addPropertyResult('description', 'Description', properties.Description != null ? cfn_parse.FromCloudFormation.getString(properties.Description) : undefined);
ret.addUnrecognizedPropertiesAsExtra(properties);
return ret;
}
/**
* A CloudFormation `AWS::EC2::ClientVpnAuthorizationRule`
*
* Specifies an ingress authorization rule to add to a Client VPN endpoint. Ingress authorization rules act as firewall rules that grant access to networks. You must configure ingress authorization rules to enable clients to access resources in AWS or on-premises networks.
*
* @cloudformationResource AWS::EC2::ClientVpnAuthorizationRule
* @stability external
*
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html
*/
class CfnClientVpnAuthorizationRule extends cdk.CfnResource {
/**
* Create a new `AWS::EC2::ClientVpnAuthorizationRule`.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope, id, props) {
super(scope, id, { type: CfnClientVpnAuthorizationRule.CFN_RESOURCE_TYPE_NAME, properties: props });
try {
jsiiDeprecationWarnings._aws_cdk_aws_ec2_CfnClientVpnAuthorizationRuleProps(props);
}
catch (error) {
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
Error.captureStackTrace(error, CfnClientVpnAuthorizationRule);
}
throw error;
}
cdk.requireProperty(props, 'clientVpnEndpointId', this);
cdk.requireProperty(props, 'targetNetworkCidr', this);
this.clientVpnEndpointId = props.clientVpnEndpointId;
this.targetNetworkCidr = props.targetNetworkCidr;
this.accessGroupId = props.accessGroupId;
this.authorizeAllGroups = props.authorizeAllGroups;
this.description = props.description;
}
/**
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope, id, resourceAttributes, options) {
resourceAttributes = resourceAttributes || {};
const resourceProperties = options.parser.parseValue(resourceAttributes.Properties);
const propsResult = CfnClientVpnAuthorizationRulePropsFromCloudFormation(resourceProperties);
const ret = new CfnClientVpnAuthorizationRule(scope, id, propsResult.value);
for (const [propKey, propVal] of Object.entries(propsResult.extraProperties)) {
ret.addPropertyOverride(propKey, propVal);
}
options.parser.handleAttributes(ret, resourceAttributes, id);
return ret;
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector - tree inspector to collect and process attributes
*
*/
inspect(inspector) {
inspector.addAttribute("aws:cdk:cloudformation:type", CfnClientVpnAuthorizationRule.CFN_RESOURCE_TYPE_NAME);
inspector.addAttribute("aws:cdk:cloudformation:props", this.cfnProperties);
}
get cfnProperties() {
return {
clientVpnEndpointId: this.clientVpnEndpointId,
targetNetworkCidr: this.targetNetworkCidr,
accessGroupId: this.accessGroupId,
authorizeAllGroups: this.authorizeAllGroups,
description: this.description,
};
}
renderProperties(props) {
return cfnClientVpnAuthorizationRulePropsToCloudFormation(props);
}
}
exports.CfnClientVpnAuthorizationRule = CfnClientVpnAuthorizationRule;
_d = JSII_RTTI_SYMBOL_1;
CfnClientVpnAuthorizationRule[_d] = { fqn: "@aws-cdk/aws-ec2.CfnClientVpnAuthorizationRule", version: "1.204.0" };
/**
* The CloudFormation resource type name for this resource class.
*/
CfnClientVpnAuthorizationRule.CFN_RESOURCE_TYPE_NAME = "AWS::EC2::ClientVpnAuthorizationRule";
/**
* Determine whether the given properties match those of a `CfnClientVpnEndpointProps`
*
* @param properties - the TypeScript properties of a `CfnClientVpnEndpointProps`
*
* @returns the result of the validation.
*/
function CfnClientVpnEndpointPropsValidator(properties) {
if (!cdk.canInspect(properties)) {
return cdk.VALIDATION_SUCCESS;
}
const errors = new cdk.ValidationResults();
if (typeof properties !== 'object') {
errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));
}
errors.collect(cdk.propertyValidator('authenticationOptions', cdk.requiredValidator)(properties.authenticationOptions));
errors.collect(cdk.propertyValidator('authenticationOptions', cdk.listValidator(CfnClientVpnEndpoint_ClientAuthenticationRequestPropertyValidator))(properties.authenticationOptions));
errors.collect(cdk.propertyValidator('clientCidrBlock', cdk.requiredValidator)(properties.clientCidrBlock));
errors.collect(cdk.propertyValidator('clientCidrBlock', cdk.validateString)(properties.clientCidrBlock));
errors.collect(cdk.propertyValidator('clientConnectOptions', CfnClientVpnEndpoint_ClientConnectOptionsPropertyValidator)(properties.clientConnectOptions));