UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 14.9 kB
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnProfileResourceAssociation=exports.CfnProfileAssociation=exports.CfnProfile=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");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 CfnProfile extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnProfilePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnProfile(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}constructor(scope,id,props){super(scope,id,{type:CfnProfile.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_route53profiles_CfnProfileProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnProfile),error}cdk().requireProperty(props,"name",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrClientToken=cdk().Token.asString(this.getAtt("ClientToken",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Route53Profiles::Profile",void 0,{tagPropertyName:"tags"}),this.name=props.name,this.tags=props.tags}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),name:this.name}}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",CfnProfile.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnProfilePropsToCloudFormation(props)}}exports.CfnProfile=CfnProfile,_a=JSII_RTTI_SYMBOL_1,CfnProfile[_a]={fqn:"aws-cdk-lib.aws_route53profiles.CfnProfile",version:"2.202.0"},CfnProfile.CFN_RESOURCE_TYPE_NAME="AWS::Route53Profiles::Profile";function CfnProfilePropsValidator(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("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnProfileProps"')}function convertCfnProfilePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnProfilePropsValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnProfilePropsFromCloudFormation(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("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):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 CfnProfileAssociation extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnProfileAssociationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnProfileAssociation(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}constructor(scope,id,props){super(scope,id,{type:CfnProfileAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_route53profiles_CfnProfileAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnProfileAssociation),error}cdk().requireProperty(props,"name",this),cdk().requireProperty(props,"profileId",this),cdk().requireProperty(props,"resourceId",this),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.arn=props.arn,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Route53Profiles::ProfileAssociation",void 0,{tagPropertyName:"tags"}),this.name=props.name,this.profileId=props.profileId,this.resourceId=props.resourceId,this.tags=props.tags}get cfnProperties(){return{arn:this.arn,tags:this.cdkTagManager.renderTags(this.tags),name:this.name,profileId:this.profileId,resourceId:this.resourceId}}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",CfnProfileAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnProfileAssociationPropsToCloudFormation(props)}}exports.CfnProfileAssociation=CfnProfileAssociation,_b=JSII_RTTI_SYMBOL_1,CfnProfileAssociation[_b]={fqn:"aws-cdk-lib.aws_route53profiles.CfnProfileAssociation",version:"2.202.0"},CfnProfileAssociation.CFN_RESOURCE_TYPE_NAME="AWS::Route53Profiles::ProfileAssociation";function CfnProfileAssociationPropsValidator(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("arn",cdk().validateString)(properties.arn)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("profileId",cdk().requiredValidator)(properties.profileId)),errors.collect(cdk().propertyValidator("profileId",cdk().validateString)(properties.profileId)),errors.collect(cdk().propertyValidator("resourceId",cdk().requiredValidator)(properties.resourceId)),errors.collect(cdk().propertyValidator("resourceId",cdk().validateString)(properties.resourceId)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnProfileAssociationProps"')}function convertCfnProfileAssociationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnProfileAssociationPropsValidator(properties).assertSuccess(),{Arn:cdk().stringToCloudFormation(properties.arn),Name:cdk().stringToCloudFormation(properties.name),ProfileId:cdk().stringToCloudFormation(properties.profileId),ResourceId:cdk().stringToCloudFormation(properties.resourceId),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnProfileAssociationPropsFromCloudFormation(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("arn","Arn",properties.Arn!=null?cfn_parse().FromCloudFormation.getString(properties.Arn):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("profileId","ProfileId",properties.ProfileId!=null?cfn_parse().FromCloudFormation.getString(properties.ProfileId):void 0),ret.addPropertyResult("resourceId","ResourceId",properties.ResourceId!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceId):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 CfnProfileResourceAssociation extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnProfileResourceAssociationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnProfileResourceAssociation(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}constructor(scope,id,props){super(scope,id,{type:CfnProfileResourceAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_route53profiles_CfnProfileResourceAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnProfileResourceAssociation),error}cdk().requireProperty(props,"name",this),cdk().requireProperty(props,"profileId",this),cdk().requireProperty(props,"resourceArn",this),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.attrResourceType=cdk().Token.asString(this.getAtt("ResourceType",cdk().ResolutionTypeHint.STRING)),this.name=props.name,this.profileId=props.profileId,this.resourceArn=props.resourceArn,this.resourceProperties=props.resourceProperties}get cfnProperties(){return{name:this.name,profileId:this.profileId,resourceArn:this.resourceArn,resourceProperties:this.resourceProperties}}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",CfnProfileResourceAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnProfileResourceAssociationPropsToCloudFormation(props)}}exports.CfnProfileResourceAssociation=CfnProfileResourceAssociation,_c=JSII_RTTI_SYMBOL_1,CfnProfileResourceAssociation[_c]={fqn:"aws-cdk-lib.aws_route53profiles.CfnProfileResourceAssociation",version:"2.202.0"},CfnProfileResourceAssociation.CFN_RESOURCE_TYPE_NAME="AWS::Route53Profiles::ProfileResourceAssociation";function CfnProfileResourceAssociationPropsValidator(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("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("profileId",cdk().requiredValidator)(properties.profileId)),errors.collect(cdk().propertyValidator("profileId",cdk().validateString)(properties.profileId)),errors.collect(cdk().propertyValidator("resourceArn",cdk().requiredValidator)(properties.resourceArn)),errors.collect(cdk().propertyValidator("resourceArn",cdk().validateString)(properties.resourceArn)),errors.collect(cdk().propertyValidator("resourceProperties",cdk().validateString)(properties.resourceProperties)),errors.wrap('supplied properties not correct for "CfnProfileResourceAssociationProps"')}function convertCfnProfileResourceAssociationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnProfileResourceAssociationPropsValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name),ProfileId:cdk().stringToCloudFormation(properties.profileId),ResourceArn:cdk().stringToCloudFormation(properties.resourceArn),ResourceProperties:cdk().stringToCloudFormation(properties.resourceProperties)}):properties}function CfnProfileResourceAssociationPropsFromCloudFormation(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("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("profileId","ProfileId",properties.ProfileId!=null?cfn_parse().FromCloudFormation.getString(properties.ProfileId):void 0),ret.addPropertyResult("resourceArn","ResourceArn",properties.ResourceArn!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceArn):void 0),ret.addPropertyResult("resourceProperties","ResourceProperties",properties.ResourceProperties!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceProperties):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}