aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 19.3 kB
JavaScript
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnResourceAssociation=exports.CfnAttributeGroupAssociation=exports.CfnAttributeGroup=exports.CfnApplication=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 CfnApplication extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnApplicationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnApplication(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:CfnApplication.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicecatalogappregistry_CfnApplicationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnApplication),error}cdk().requireProperty(props,"name",this),this.attrApplicationName=cdk().Token.asString(this.getAtt("ApplicationName",cdk().ResolutionTypeHint.STRING)),this.attrApplicationTagKey=cdk().Token.asString(this.getAtt("ApplicationTagKey",cdk().ResolutionTypeHint.STRING)),this.attrApplicationTagValue=cdk().Token.asString(this.getAtt("ApplicationTagValue",cdk().ResolutionTypeHint.STRING)),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.description=props.description,this.name=props.name,this.tags=new(cdk()).TagManager(cdk().TagType.MAP,"AWS::ServiceCatalogAppRegistry::Application",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{description:this.description,name:this.name,tags:this.tags.renderTags()}}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",CfnApplication.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnApplicationPropsToCloudFormation(props)}}exports.CfnApplication=CfnApplication,_a=JSII_RTTI_SYMBOL_1,CfnApplication[_a]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnApplication",version:"2.185.0"},CfnApplication.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::Application";function CfnApplicationPropsValidator(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("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("tags",cdk().hashValidator(cdk().validateString))(properties.tags)),errors.wrap('supplied properties not correct for "CfnApplicationProps"')}function convertCfnApplicationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnApplicationPropsValidator(properties).assertSuccess(),{Description:cdk().stringToCloudFormation(properties.description),Name:cdk().stringToCloudFormation(properties.name),Tags:cdk().hashMapper(cdk().stringToCloudFormation)(properties.tags)}):properties}function CfnApplicationPropsFromCloudFormation(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("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),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.getMap(cfn_parse().FromCloudFormation.getString)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAttributeGroup extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAttributeGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnAttributeGroup(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:CfnAttributeGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicecatalogappregistry_CfnAttributeGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAttributeGroup),error}cdk().requireProperty(props,"attributes",this),cdk().requireProperty(props,"name",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.attributes=props.attributes,this.description=props.description,this.name=props.name,this.tags=new(cdk()).TagManager(cdk().TagType.MAP,"AWS::ServiceCatalogAppRegistry::AttributeGroup",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{attributes:this.attributes,description:this.description,name:this.name,tags:this.tags.renderTags()}}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",CfnAttributeGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAttributeGroupPropsToCloudFormation(props)}}exports.CfnAttributeGroup=CfnAttributeGroup,_b=JSII_RTTI_SYMBOL_1,CfnAttributeGroup[_b]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnAttributeGroup",version:"2.185.0"},CfnAttributeGroup.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::AttributeGroup";function CfnAttributeGroupPropsValidator(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("attributes",cdk().requiredValidator)(properties.attributes)),errors.collect(cdk().propertyValidator("attributes",cdk().validateObject)(properties.attributes)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("tags",cdk().hashValidator(cdk().validateString))(properties.tags)),errors.wrap('supplied properties not correct for "CfnAttributeGroupProps"')}function convertCfnAttributeGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAttributeGroupPropsValidator(properties).assertSuccess(),{Attributes:cdk().objectToCloudFormation(properties.attributes),Description:cdk().stringToCloudFormation(properties.description),Name:cdk().stringToCloudFormation(properties.name),Tags:cdk().hashMapper(cdk().stringToCloudFormation)(properties.tags)}):properties}function CfnAttributeGroupPropsFromCloudFormation(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("attributes","Attributes",properties.Attributes!=null?cfn_parse().FromCloudFormation.getAny(properties.Attributes):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),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.getMap(cfn_parse().FromCloudFormation.getString)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAttributeGroupAssociation extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAttributeGroupAssociationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnAttributeGroupAssociation(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:CfnAttributeGroupAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicecatalogappregistry_CfnAttributeGroupAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAttributeGroupAssociation),error}cdk().requireProperty(props,"application",this),cdk().requireProperty(props,"attributeGroup",this),this.attrApplicationArn=cdk().Token.asString(this.getAtt("ApplicationArn",cdk().ResolutionTypeHint.STRING)),this.attrAttributeGroupArn=cdk().Token.asString(this.getAtt("AttributeGroupArn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.application=props.application,this.attributeGroup=props.attributeGroup}get cfnProperties(){return{application:this.application,attributeGroup:this.attributeGroup}}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",CfnAttributeGroupAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAttributeGroupAssociationPropsToCloudFormation(props)}}exports.CfnAttributeGroupAssociation=CfnAttributeGroupAssociation,_c=JSII_RTTI_SYMBOL_1,CfnAttributeGroupAssociation[_c]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnAttributeGroupAssociation",version:"2.185.0"},CfnAttributeGroupAssociation.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation";function CfnAttributeGroupAssociationPropsValidator(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("application",cdk().requiredValidator)(properties.application)),errors.collect(cdk().propertyValidator("application",cdk().validateString)(properties.application)),errors.collect(cdk().propertyValidator("attributeGroup",cdk().requiredValidator)(properties.attributeGroup)),errors.collect(cdk().propertyValidator("attributeGroup",cdk().validateString)(properties.attributeGroup)),errors.wrap('supplied properties not correct for "CfnAttributeGroupAssociationProps"')}function convertCfnAttributeGroupAssociationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAttributeGroupAssociationPropsValidator(properties).assertSuccess(),{Application:cdk().stringToCloudFormation(properties.application),AttributeGroup:cdk().stringToCloudFormation(properties.attributeGroup)}):properties}function CfnAttributeGroupAssociationPropsFromCloudFormation(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("application","Application",properties.Application!=null?cfn_parse().FromCloudFormation.getString(properties.Application):void 0),ret.addPropertyResult("attributeGroup","AttributeGroup",properties.AttributeGroup!=null?cfn_parse().FromCloudFormation.getString(properties.AttributeGroup):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourceAssociation extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourceAssociationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnResourceAssociation(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:CfnResourceAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_servicecatalogappregistry_CfnResourceAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourceAssociation),error}cdk().requireProperty(props,"application",this),cdk().requireProperty(props,"resource",this),cdk().requireProperty(props,"resourceType",this),this.attrApplicationArn=cdk().Token.asString(this.getAtt("ApplicationArn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.attrResourceArn=cdk().Token.asString(this.getAtt("ResourceArn",cdk().ResolutionTypeHint.STRING)),this.application=props.application,this.resource=props.resource,this.resourceType=props.resourceType}get cfnProperties(){return{application:this.application,resource:this.resource,resourceType:this.resourceType}}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",CfnResourceAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnResourceAssociationPropsToCloudFormation(props)}}exports.CfnResourceAssociation=CfnResourceAssociation,_d=JSII_RTTI_SYMBOL_1,CfnResourceAssociation[_d]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnResourceAssociation",version:"2.185.0"},CfnResourceAssociation.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::ResourceAssociation";function CfnResourceAssociationPropsValidator(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("application",cdk().requiredValidator)(properties.application)),errors.collect(cdk().propertyValidator("application",cdk().validateString)(properties.application)),errors.collect(cdk().propertyValidator("resource",cdk().requiredValidator)(properties.resource)),errors.collect(cdk().propertyValidator("resource",cdk().validateString)(properties.resource)),errors.collect(cdk().propertyValidator("resourceType",cdk().requiredValidator)(properties.resourceType)),errors.collect(cdk().propertyValidator("resourceType",cdk().validateString)(properties.resourceType)),errors.wrap('supplied properties not correct for "CfnResourceAssociationProps"')}function convertCfnResourceAssociationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnResourceAssociationPropsValidator(properties).assertSuccess(),{Application:cdk().stringToCloudFormation(properties.application),Resource:cdk().stringToCloudFormation(properties.resource),ResourceType:cdk().stringToCloudFormation(properties.resourceType)}):properties}function CfnResourceAssociationPropsFromCloudFormation(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("application","Application",properties.Application!=null?cfn_parse().FromCloudFormation.getString(properties.Application):void 0),ret.addPropertyResult("resource","Resource",properties.Resource!=null?cfn_parse().FromCloudFormation.getString(properties.Resource):void 0),ret.addPropertyResult("resourceType","ResourceType",properties.ResourceType!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}