UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 23.8 kB
"use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnResourcePolicy=exports.CfnPolicy=exports.CfnOrganizationalUnit=exports.CfnOrganization=exports.CfnAccount=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};class CfnAccount extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAccountPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new Error("Unexpected IResolvable");const ret=new CfnAccount(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:CfnAccount.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_organizations_CfnAccountProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccount),error}cdk().requireProperty(props,"accountName",this),cdk().requireProperty(props,"email",this),this.attrAccountId=cdk().Token.asString(this.getAtt("AccountId",cdk().ResolutionTypeHint.STRING)),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrJoinedMethod=cdk().Token.asString(this.getAtt("JoinedMethod",cdk().ResolutionTypeHint.STRING)),this.attrJoinedTimestamp=cdk().Token.asString(this.getAtt("JoinedTimestamp",cdk().ResolutionTypeHint.STRING)),this.attrStatus=cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING)),this.accountName=props.accountName,this.email=props.email,this.parentIds=props.parentIds,this.roleName=props.roleName,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Organizations::Account",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags,this.node.scope!=null&&cdk().Resource.isResource(this.node.scope)&&this.node.addValidation({validate:()=>this.cfnOptions.deletionPolicy===void 0?["'AWS::Organizations::Account' is a stateful resource type, and you must specify a Removal Policy for it. Call 'resource.applyRemovalPolicy()'."]:[]})}get cfnProperties(){return{accountName:this.accountName,email:this.email,parentIds:this.parentIds,roleName:this.roleName,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",CfnAccount.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAccountPropsToCloudFormation(props)}}exports.CfnAccount=CfnAccount,_a=JSII_RTTI_SYMBOL_1,CfnAccount[_a]={fqn:"aws-cdk-lib.aws_organizations.CfnAccount",version:"2.160.0"},CfnAccount.CFN_RESOURCE_TYPE_NAME="AWS::Organizations::Account";function CfnAccountPropsValidator(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("accountName",cdk().requiredValidator)(properties.accountName)),errors.collect(cdk().propertyValidator("accountName",cdk().validateString)(properties.accountName)),errors.collect(cdk().propertyValidator("email",cdk().requiredValidator)(properties.email)),errors.collect(cdk().propertyValidator("email",cdk().validateString)(properties.email)),errors.collect(cdk().propertyValidator("parentIds",cdk().listValidator(cdk().validateString))(properties.parentIds)),errors.collect(cdk().propertyValidator("roleName",cdk().validateString)(properties.roleName)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnAccountProps"')}function convertCfnAccountPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccountPropsValidator(properties).assertSuccess(),{AccountName:cdk().stringToCloudFormation(properties.accountName),Email:cdk().stringToCloudFormation(properties.email),ParentIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.parentIds),RoleName:cdk().stringToCloudFormation(properties.roleName),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnAccountPropsFromCloudFormation(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("accountName","AccountName",properties.AccountName!=null?cfn_parse().FromCloudFormation.getString(properties.AccountName):void 0),ret.addPropertyResult("email","Email",properties.Email!=null?cfn_parse().FromCloudFormation.getString(properties.Email):void 0),ret.addPropertyResult("parentIds","ParentIds",properties.ParentIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ParentIds):void 0),ret.addPropertyResult("roleName","RoleName",properties.RoleName!=null?cfn_parse().FromCloudFormation.getString(properties.RoleName):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 CfnOrganization extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnOrganizationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new Error("Unexpected IResolvable");const ret=new CfnOrganization(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:CfnOrganization.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_organizations_CfnOrganizationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnOrganization),error}this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.attrManagementAccountArn=cdk().Token.asString(this.getAtt("ManagementAccountArn",cdk().ResolutionTypeHint.STRING)),this.attrManagementAccountEmail=cdk().Token.asString(this.getAtt("ManagementAccountEmail",cdk().ResolutionTypeHint.STRING)),this.attrManagementAccountId=cdk().Token.asString(this.getAtt("ManagementAccountId",cdk().ResolutionTypeHint.STRING)),this.attrRootId=cdk().Token.asString(this.getAtt("RootId",cdk().ResolutionTypeHint.STRING)),this.featureSet=props.featureSet}get cfnProperties(){return{featureSet:this.featureSet}}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",CfnOrganization.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnOrganizationPropsToCloudFormation(props)}}exports.CfnOrganization=CfnOrganization,_b=JSII_RTTI_SYMBOL_1,CfnOrganization[_b]={fqn:"aws-cdk-lib.aws_organizations.CfnOrganization",version:"2.160.0"},CfnOrganization.CFN_RESOURCE_TYPE_NAME="AWS::Organizations::Organization";function CfnOrganizationPropsValidator(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("featureSet",cdk().validateString)(properties.featureSet)),errors.wrap('supplied properties not correct for "CfnOrganizationProps"')}function convertCfnOrganizationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnOrganizationPropsValidator(properties).assertSuccess(),{FeatureSet:cdk().stringToCloudFormation(properties.featureSet)}):properties}function CfnOrganizationPropsFromCloudFormation(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("featureSet","FeatureSet",properties.FeatureSet!=null?cfn_parse().FromCloudFormation.getString(properties.FeatureSet):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnOrganizationalUnit extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnOrganizationalUnitPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new Error("Unexpected IResolvable");const ret=new CfnOrganizationalUnit(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:CfnOrganizationalUnit.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_organizations_CfnOrganizationalUnitProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnOrganizationalUnit),error}cdk().requireProperty(props,"name",this),cdk().requireProperty(props,"parentId",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.name=props.name,this.parentId=props.parentId,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Organizations::OrganizationalUnit",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{name:this.name,parentId:this.parentId,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",CfnOrganizationalUnit.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnOrganizationalUnitPropsToCloudFormation(props)}}exports.CfnOrganizationalUnit=CfnOrganizationalUnit,_c=JSII_RTTI_SYMBOL_1,CfnOrganizationalUnit[_c]={fqn:"aws-cdk-lib.aws_organizations.CfnOrganizationalUnit",version:"2.160.0"},CfnOrganizationalUnit.CFN_RESOURCE_TYPE_NAME="AWS::Organizations::OrganizationalUnit";function CfnOrganizationalUnitPropsValidator(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("parentId",cdk().requiredValidator)(properties.parentId)),errors.collect(cdk().propertyValidator("parentId",cdk().validateString)(properties.parentId)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnOrganizationalUnitProps"')}function convertCfnOrganizationalUnitPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnOrganizationalUnitPropsValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name),ParentId:cdk().stringToCloudFormation(properties.parentId),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnOrganizationalUnitPropsFromCloudFormation(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("parentId","ParentId",properties.ParentId!=null?cfn_parse().FromCloudFormation.getString(properties.ParentId):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 CfnPolicy extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new Error("Unexpected IResolvable");const ret=new CfnPolicy(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:CfnPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_organizations_CfnPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPolicy),error}cdk().requireProperty(props,"content",this),cdk().requireProperty(props,"name",this),cdk().requireProperty(props,"type",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrAwsManaged=this.getAtt("AwsManaged"),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.content=props.content,this.description=props.description,this.name=props.name,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Organizations::Policy",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags,this.targetIds=props.targetIds,this.type=props.type}get cfnProperties(){return{content:this.content,description:this.description,name:this.name,tags:this.tags.renderTags(),targetIds:this.targetIds,type:this.type}}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",CfnPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnPolicyPropsToCloudFormation(props)}}exports.CfnPolicy=CfnPolicy,_d=JSII_RTTI_SYMBOL_1,CfnPolicy[_d]={fqn:"aws-cdk-lib.aws_organizations.CfnPolicy",version:"2.160.0"},CfnPolicy.CFN_RESOURCE_TYPE_NAME="AWS::Organizations::Policy";function CfnPolicyPropsValidator(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("content",cdk().requiredValidator)(properties.content)),errors.collect(cdk().propertyValidator("content",cdk().validateObject)(properties.content)),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().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("targetIds",cdk().listValidator(cdk().validateString))(properties.targetIds)),errors.collect(cdk().propertyValidator("type",cdk().requiredValidator)(properties.type)),errors.collect(cdk().propertyValidator("type",cdk().validateString)(properties.type)),errors.wrap('supplied properties not correct for "CfnPolicyProps"')}function convertCfnPolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPolicyPropsValidator(properties).assertSuccess(),{Content:cdk().objectToCloudFormation(properties.content),Description:cdk().stringToCloudFormation(properties.description),Name:cdk().stringToCloudFormation(properties.name),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TargetIds:cdk().listMapper(cdk().stringToCloudFormation)(properties.targetIds),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnPolicyPropsFromCloudFormation(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("content","Content",properties.Content!=null?cfn_parse().FromCloudFormation.getAny(properties.Content):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.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("targetIds","TargetIds",properties.TargetIds!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.TargetIds):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourcePolicy extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourcePolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new Error("Unexpected IResolvable");const ret=new CfnResourcePolicy(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:CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_organizations_CfnResourcePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourcePolicy),error}cdk().requireProperty(props,"content",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.attrId=cdk().Token.asString(this.getAtt("Id",cdk().ResolutionTypeHint.STRING)),this.content=props.content,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Organizations::ResourcePolicy",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{content:this.content,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",CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnResourcePolicyPropsToCloudFormation(props)}}exports.CfnResourcePolicy=CfnResourcePolicy,_e=JSII_RTTI_SYMBOL_1,CfnResourcePolicy[_e]={fqn:"aws-cdk-lib.aws_organizations.CfnResourcePolicy",version:"2.160.0"},CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME="AWS::Organizations::ResourcePolicy";function CfnResourcePolicyPropsValidator(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("content",cdk().requiredValidator)(properties.content)),errors.collect(cdk().propertyValidator("content",cdk().validateObject)(properties.content)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnResourcePolicyProps"')}function convertCfnResourcePolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnResourcePolicyPropsValidator(properties).assertSuccess(),{Content:cdk().objectToCloudFormation(properties.content),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnResourcePolicyPropsFromCloudFormation(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("content","Content",properties.Content!=null?cfn_parse().FromCloudFormation.getAny(properties.Content):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}