UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 28.9 kB
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnGroup=exports.CfnCanary=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),cfn_parse=require("../../core/lib/helpers-internal");function CfnCanaryPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("artifactConfig",CfnCanary_ArtifactConfigPropertyValidator)(properties.artifactConfig)),errors.collect(cdk.propertyValidator("artifactS3Location",cdk.requiredValidator)(properties.artifactS3Location)),errors.collect(cdk.propertyValidator("artifactS3Location",cdk.validateString)(properties.artifactS3Location)),errors.collect(cdk.propertyValidator("code",cdk.requiredValidator)(properties.code)),errors.collect(cdk.propertyValidator("code",CfnCanary_CodePropertyValidator)(properties.code)),errors.collect(cdk.propertyValidator("deleteLambdaResourcesOnCanaryDeletion",cdk.validateBoolean)(properties.deleteLambdaResourcesOnCanaryDeletion)),errors.collect(cdk.propertyValidator("executionRoleArn",cdk.requiredValidator)(properties.executionRoleArn)),errors.collect(cdk.propertyValidator("executionRoleArn",cdk.validateString)(properties.executionRoleArn)),errors.collect(cdk.propertyValidator("failureRetentionPeriod",cdk.validateNumber)(properties.failureRetentionPeriod)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("runConfig",CfnCanary_RunConfigPropertyValidator)(properties.runConfig)),errors.collect(cdk.propertyValidator("runtimeVersion",cdk.requiredValidator)(properties.runtimeVersion)),errors.collect(cdk.propertyValidator("runtimeVersion",cdk.validateString)(properties.runtimeVersion)),errors.collect(cdk.propertyValidator("schedule",cdk.requiredValidator)(properties.schedule)),errors.collect(cdk.propertyValidator("schedule",CfnCanary_SchedulePropertyValidator)(properties.schedule)),errors.collect(cdk.propertyValidator("startCanaryAfterCreation",cdk.requiredValidator)(properties.startCanaryAfterCreation)),errors.collect(cdk.propertyValidator("startCanaryAfterCreation",cdk.validateBoolean)(properties.startCanaryAfterCreation)),errors.collect(cdk.propertyValidator("successRetentionPeriod",cdk.validateNumber)(properties.successRetentionPeriod)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("vpcConfig",CfnCanary_VPCConfigPropertyValidator)(properties.vpcConfig)),errors.collect(cdk.propertyValidator("visualReference",CfnCanary_VisualReferencePropertyValidator)(properties.visualReference)),errors.wrap('supplied properties not correct for "CfnCanaryProps"')}function cfnCanaryPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanaryPropsValidator(properties).assertSuccess(),{ArtifactS3Location:cdk.stringToCloudFormation(properties.artifactS3Location),Code:cfnCanaryCodePropertyToCloudFormation(properties.code),ExecutionRoleArn:cdk.stringToCloudFormation(properties.executionRoleArn),Name:cdk.stringToCloudFormation(properties.name),RuntimeVersion:cdk.stringToCloudFormation(properties.runtimeVersion),Schedule:cfnCanarySchedulePropertyToCloudFormation(properties.schedule),StartCanaryAfterCreation:cdk.booleanToCloudFormation(properties.startCanaryAfterCreation),ArtifactConfig:cfnCanaryArtifactConfigPropertyToCloudFormation(properties.artifactConfig),DeleteLambdaResourcesOnCanaryDeletion:cdk.booleanToCloudFormation(properties.deleteLambdaResourcesOnCanaryDeletion),FailureRetentionPeriod:cdk.numberToCloudFormation(properties.failureRetentionPeriod),RunConfig:cfnCanaryRunConfigPropertyToCloudFormation(properties.runConfig),SuccessRetentionPeriod:cdk.numberToCloudFormation(properties.successRetentionPeriod),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),VisualReference:cfnCanaryVisualReferencePropertyToCloudFormation(properties.visualReference),VPCConfig:cfnCanaryVPCConfigPropertyToCloudFormation(properties.vpcConfig)}):properties}function CfnCanaryPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("artifactS3Location","ArtifactS3Location",cfn_parse.FromCloudFormation.getString(properties.ArtifactS3Location)),ret.addPropertyResult("code","Code",CfnCanaryCodePropertyFromCloudFormation(properties.Code)),ret.addPropertyResult("executionRoleArn","ExecutionRoleArn",cfn_parse.FromCloudFormation.getString(properties.ExecutionRoleArn)),ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("runtimeVersion","RuntimeVersion",cfn_parse.FromCloudFormation.getString(properties.RuntimeVersion)),ret.addPropertyResult("schedule","Schedule",CfnCanarySchedulePropertyFromCloudFormation(properties.Schedule)),ret.addPropertyResult("startCanaryAfterCreation","StartCanaryAfterCreation",cfn_parse.FromCloudFormation.getBoolean(properties.StartCanaryAfterCreation)),ret.addPropertyResult("artifactConfig","ArtifactConfig",properties.ArtifactConfig!=null?CfnCanaryArtifactConfigPropertyFromCloudFormation(properties.ArtifactConfig):void 0),ret.addPropertyResult("deleteLambdaResourcesOnCanaryDeletion","DeleteLambdaResourcesOnCanaryDeletion",properties.DeleteLambdaResourcesOnCanaryDeletion!=null?cfn_parse.FromCloudFormation.getBoolean(properties.DeleteLambdaResourcesOnCanaryDeletion):void 0),ret.addPropertyResult("failureRetentionPeriod","FailureRetentionPeriod",properties.FailureRetentionPeriod!=null?cfn_parse.FromCloudFormation.getNumber(properties.FailureRetentionPeriod):void 0),ret.addPropertyResult("runConfig","RunConfig",properties.RunConfig!=null?CfnCanaryRunConfigPropertyFromCloudFormation(properties.RunConfig):void 0),ret.addPropertyResult("successRetentionPeriod","SuccessRetentionPeriod",properties.SuccessRetentionPeriod!=null?cfn_parse.FromCloudFormation.getNumber(properties.SuccessRetentionPeriod):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("visualReference","VisualReference",properties.VisualReference!=null?CfnCanaryVisualReferencePropertyFromCloudFormation(properties.VisualReference):void 0),ret.addPropertyResult("vpcConfig","VPCConfig",properties.VPCConfig!=null?CfnCanaryVPCConfigPropertyFromCloudFormation(properties.VPCConfig):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnCanary extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnCanary.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_synthetics_CfnCanaryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCanary),error}cdk.requireProperty(props,"artifactS3Location",this),cdk.requireProperty(props,"code",this),cdk.requireProperty(props,"executionRoleArn",this),cdk.requireProperty(props,"name",this),cdk.requireProperty(props,"runtimeVersion",this),cdk.requireProperty(props,"schedule",this),cdk.requireProperty(props,"startCanaryAfterCreation",this),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.attrState=cdk.Token.asString(this.getAtt("State",cdk.ResolutionTypeHint.STRING)),this.artifactS3Location=props.artifactS3Location,this.code=props.code,this.executionRoleArn=props.executionRoleArn,this.name=props.name,this.runtimeVersion=props.runtimeVersion,this.schedule=props.schedule,this.startCanaryAfterCreation=props.startCanaryAfterCreation,this.artifactConfig=props.artifactConfig,this.deleteLambdaResourcesOnCanaryDeletion=props.deleteLambdaResourcesOnCanaryDeletion,this.failureRetentionPeriod=props.failureRetentionPeriod,this.runConfig=props.runConfig,this.successRetentionPeriod=props.successRetentionPeriod,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::Synthetics::Canary",props.tags,{tagPropertyName:"tags"}),this.visualReference=props.visualReference,this.vpcConfig=props.vpcConfig}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCanaryPropsFromCloudFormation(resourceProperties),ret=new CfnCanary(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}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",CfnCanary.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{artifactS3Location:this.artifactS3Location,code:this.code,executionRoleArn:this.executionRoleArn,name:this.name,runtimeVersion:this.runtimeVersion,schedule:this.schedule,startCanaryAfterCreation:this.startCanaryAfterCreation,artifactConfig:this.artifactConfig,deleteLambdaResourcesOnCanaryDeletion:this.deleteLambdaResourcesOnCanaryDeletion,failureRetentionPeriod:this.failureRetentionPeriod,runConfig:this.runConfig,successRetentionPeriod:this.successRetentionPeriod,tags:this.tags.renderTags(),visualReference:this.visualReference,vpcConfig:this.vpcConfig}}renderProperties(props){return cfnCanaryPropsToCloudFormation(props)}}exports.CfnCanary=CfnCanary,_a=JSII_RTTI_SYMBOL_1,CfnCanary[_a]={fqn:"aws-cdk-lib.aws_synthetics.CfnCanary",version:"2.70.0"},CfnCanary.CFN_RESOURCE_TYPE_NAME="AWS::Synthetics::Canary";function CfnCanary_ArtifactConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("s3Encryption",CfnCanary_S3EncryptionPropertyValidator)(properties.s3Encryption)),errors.wrap('supplied properties not correct for "ArtifactConfigProperty"')}function cfnCanaryArtifactConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_ArtifactConfigPropertyValidator(properties).assertSuccess(),{S3Encryption:cfnCanaryS3EncryptionPropertyToCloudFormation(properties.s3Encryption)}):properties}function CfnCanaryArtifactConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("s3Encryption","S3Encryption",properties.S3Encryption!=null?CfnCanaryS3EncryptionPropertyFromCloudFormation(properties.S3Encryption):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_BaseScreenshotPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("ignoreCoordinates",cdk.listValidator(cdk.validateString))(properties.ignoreCoordinates)),errors.collect(cdk.propertyValidator("screenshotName",cdk.requiredValidator)(properties.screenshotName)),errors.collect(cdk.propertyValidator("screenshotName",cdk.validateString)(properties.screenshotName)),errors.wrap('supplied properties not correct for "BaseScreenshotProperty"')}function cfnCanaryBaseScreenshotPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_BaseScreenshotPropertyValidator(properties).assertSuccess(),{IgnoreCoordinates:cdk.listMapper(cdk.stringToCloudFormation)(properties.ignoreCoordinates),ScreenshotName:cdk.stringToCloudFormation(properties.screenshotName)}):properties}function CfnCanaryBaseScreenshotPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("ignoreCoordinates","IgnoreCoordinates",properties.IgnoreCoordinates!=null?cfn_parse.FromCloudFormation.getStringArray(properties.IgnoreCoordinates):void 0),ret.addPropertyResult("screenshotName","ScreenshotName",cfn_parse.FromCloudFormation.getString(properties.ScreenshotName)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_CodePropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("handler",cdk.requiredValidator)(properties.handler)),errors.collect(cdk.propertyValidator("handler",cdk.validateString)(properties.handler)),errors.collect(cdk.propertyValidator("s3Bucket",cdk.validateString)(properties.s3Bucket)),errors.collect(cdk.propertyValidator("s3Key",cdk.validateString)(properties.s3Key)),errors.collect(cdk.propertyValidator("s3ObjectVersion",cdk.validateString)(properties.s3ObjectVersion)),errors.collect(cdk.propertyValidator("script",cdk.validateString)(properties.script)),errors.wrap('supplied properties not correct for "CodeProperty"')}function cfnCanaryCodePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_CodePropertyValidator(properties).assertSuccess(),{Handler:cdk.stringToCloudFormation(properties.handler),S3Bucket:cdk.stringToCloudFormation(properties.s3Bucket),S3Key:cdk.stringToCloudFormation(properties.s3Key),S3ObjectVersion:cdk.stringToCloudFormation(properties.s3ObjectVersion),Script:cdk.stringToCloudFormation(properties.script)}):properties}function CfnCanaryCodePropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("handler","Handler",cfn_parse.FromCloudFormation.getString(properties.Handler)),ret.addPropertyResult("s3Bucket","S3Bucket",properties.S3Bucket!=null?cfn_parse.FromCloudFormation.getString(properties.S3Bucket):void 0),ret.addPropertyResult("s3Key","S3Key",properties.S3Key!=null?cfn_parse.FromCloudFormation.getString(properties.S3Key):void 0),ret.addPropertyResult("s3ObjectVersion","S3ObjectVersion",properties.S3ObjectVersion!=null?cfn_parse.FromCloudFormation.getString(properties.S3ObjectVersion):void 0),ret.addPropertyResult("script","Script",properties.Script!=null?cfn_parse.FromCloudFormation.getString(properties.Script):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_RunConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("activeTracing",cdk.validateBoolean)(properties.activeTracing)),errors.collect(cdk.propertyValidator("environmentVariables",cdk.hashValidator(cdk.validateString))(properties.environmentVariables)),errors.collect(cdk.propertyValidator("memoryInMb",cdk.validateNumber)(properties.memoryInMb)),errors.collect(cdk.propertyValidator("timeoutInSeconds",cdk.validateNumber)(properties.timeoutInSeconds)),errors.wrap('supplied properties not correct for "RunConfigProperty"')}function cfnCanaryRunConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_RunConfigPropertyValidator(properties).assertSuccess(),{ActiveTracing:cdk.booleanToCloudFormation(properties.activeTracing),EnvironmentVariables:cdk.hashMapper(cdk.stringToCloudFormation)(properties.environmentVariables),MemoryInMB:cdk.numberToCloudFormation(properties.memoryInMb),TimeoutInSeconds:cdk.numberToCloudFormation(properties.timeoutInSeconds)}):properties}function CfnCanaryRunConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("activeTracing","ActiveTracing",properties.ActiveTracing!=null?cfn_parse.FromCloudFormation.getBoolean(properties.ActiveTracing):void 0),ret.addPropertyResult("environmentVariables","EnvironmentVariables",properties.EnvironmentVariables!=null?cfn_parse.FromCloudFormation.getMap(cfn_parse.FromCloudFormation.getString)(properties.EnvironmentVariables):void 0),ret.addPropertyResult("memoryInMb","MemoryInMB",properties.MemoryInMB!=null?cfn_parse.FromCloudFormation.getNumber(properties.MemoryInMB):void 0),ret.addPropertyResult("timeoutInSeconds","TimeoutInSeconds",properties.TimeoutInSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.TimeoutInSeconds):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_S3EncryptionPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("encryptionMode",cdk.validateString)(properties.encryptionMode)),errors.collect(cdk.propertyValidator("kmsKeyArn",cdk.validateString)(properties.kmsKeyArn)),errors.wrap('supplied properties not correct for "S3EncryptionProperty"')}function cfnCanaryS3EncryptionPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_S3EncryptionPropertyValidator(properties).assertSuccess(),{EncryptionMode:cdk.stringToCloudFormation(properties.encryptionMode),KmsKeyArn:cdk.stringToCloudFormation(properties.kmsKeyArn)}):properties}function CfnCanaryS3EncryptionPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("encryptionMode","EncryptionMode",properties.EncryptionMode!=null?cfn_parse.FromCloudFormation.getString(properties.EncryptionMode):void 0),ret.addPropertyResult("kmsKeyArn","KmsKeyArn",properties.KmsKeyArn!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKeyArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_SchedulePropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("durationInSeconds",cdk.validateString)(properties.durationInSeconds)),errors.collect(cdk.propertyValidator("expression",cdk.requiredValidator)(properties.expression)),errors.collect(cdk.propertyValidator("expression",cdk.validateString)(properties.expression)),errors.wrap('supplied properties not correct for "ScheduleProperty"')}function cfnCanarySchedulePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_SchedulePropertyValidator(properties).assertSuccess(),{DurationInSeconds:cdk.stringToCloudFormation(properties.durationInSeconds),Expression:cdk.stringToCloudFormation(properties.expression)}):properties}function CfnCanarySchedulePropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("durationInSeconds","DurationInSeconds",properties.DurationInSeconds!=null?cfn_parse.FromCloudFormation.getString(properties.DurationInSeconds):void 0),ret.addPropertyResult("expression","Expression",cfn_parse.FromCloudFormation.getString(properties.Expression)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_VPCConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("securityGroupIds",cdk.requiredValidator)(properties.securityGroupIds)),errors.collect(cdk.propertyValidator("securityGroupIds",cdk.listValidator(cdk.validateString))(properties.securityGroupIds)),errors.collect(cdk.propertyValidator("subnetIds",cdk.requiredValidator)(properties.subnetIds)),errors.collect(cdk.propertyValidator("subnetIds",cdk.listValidator(cdk.validateString))(properties.subnetIds)),errors.collect(cdk.propertyValidator("vpcId",cdk.validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "VPCConfigProperty"')}function cfnCanaryVPCConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_VPCConfigPropertyValidator(properties).assertSuccess(),{SecurityGroupIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.securityGroupIds),SubnetIds:cdk.listMapper(cdk.stringToCloudFormation)(properties.subnetIds),VpcId:cdk.stringToCloudFormation(properties.vpcId)}):properties}function CfnCanaryVPCConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("securityGroupIds","SecurityGroupIds",cfn_parse.FromCloudFormation.getStringArray(properties.SecurityGroupIds)),ret.addPropertyResult("subnetIds","SubnetIds",cfn_parse.FromCloudFormation.getStringArray(properties.SubnetIds)),ret.addPropertyResult("vpcId","VpcId",properties.VpcId!=null?cfn_parse.FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCanary_VisualReferencePropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("baseCanaryRunId",cdk.requiredValidator)(properties.baseCanaryRunId)),errors.collect(cdk.propertyValidator("baseCanaryRunId",cdk.validateString)(properties.baseCanaryRunId)),errors.collect(cdk.propertyValidator("baseScreenshots",cdk.listValidator(CfnCanary_BaseScreenshotPropertyValidator))(properties.baseScreenshots)),errors.wrap('supplied properties not correct for "VisualReferenceProperty"')}function cfnCanaryVisualReferencePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCanary_VisualReferencePropertyValidator(properties).assertSuccess(),{BaseCanaryRunId:cdk.stringToCloudFormation(properties.baseCanaryRunId),BaseScreenshots:cdk.listMapper(cfnCanaryBaseScreenshotPropertyToCloudFormation)(properties.baseScreenshots)}):properties}function CfnCanaryVisualReferencePropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("baseCanaryRunId","BaseCanaryRunId",cfn_parse.FromCloudFormation.getString(properties.BaseCanaryRunId)),ret.addPropertyResult("baseScreenshots","BaseScreenshots",properties.BaseScreenshots!=null?cfn_parse.FromCloudFormation.getArray(CfnCanaryBaseScreenshotPropertyFromCloudFormation)(properties.BaseScreenshots):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGroupPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("resourceArns",cdk.listValidator(cdk.validateString))(properties.resourceArns)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnGroupProps"')}function cfnGroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnGroupPropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),ResourceArns:cdk.listMapper(cdk.stringToCloudFormation)(properties.resourceArns),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnGroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("resourceArns","ResourceArns",properties.ResourceArns!=null?cfn_parse.FromCloudFormation.getStringArray(properties.ResourceArns):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}class CfnGroup extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_synthetics_CfnGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnGroup),error}cdk.requireProperty(props,"name",this),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.name=props.name,this.resourceArns=props.resourceArns,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::Synthetics::Group",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnGroupPropsFromCloudFormation(resourceProperties),ret=new CfnGroup(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}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",CfnGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,resourceArns:this.resourceArns,tags:this.tags.renderTags()}}renderProperties(props){return cfnGroupPropsToCloudFormation(props)}}exports.CfnGroup=CfnGroup,_b=JSII_RTTI_SYMBOL_1,CfnGroup[_b]={fqn:"aws-cdk-lib.aws_synthetics.CfnGroup",version:"2.70.0"},CfnGroup.CFN_RESOURCE_TYPE_NAME="AWS::Synthetics::Group";