aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 14.9 kB
JavaScript
"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnConnector=exports.CfnChallenge=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 CfnChallenge extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnChallengePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnChallenge(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:CfnChallenge.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_pcaconnectorscep_CfnChallengeProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnChallenge),error}cdk().requireProperty(props,"connectorArn",this),this.attrChallengeArn=cdk().Token.asString(this.getAtt("ChallengeArn",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.MAP,"AWS::PCAConnectorSCEP::Challenge",void 0,{tagPropertyName:"tags"}),this.connectorArn=props.connectorArn,this.tags=props.tags}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),connectorArn:this.connectorArn}}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",CfnChallenge.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnChallengePropsToCloudFormation(props)}}exports.CfnChallenge=CfnChallenge,_a=JSII_RTTI_SYMBOL_1,CfnChallenge[_a]={fqn:"aws-cdk-lib.aws_pcaconnectorscep.CfnChallenge",version:"2.185.0"},CfnChallenge.CFN_RESOURCE_TYPE_NAME="AWS::PCAConnectorSCEP::Challenge";function CfnChallengePropsValidator(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("connectorArn",cdk().requiredValidator)(properties.connectorArn)),errors.collect(cdk().propertyValidator("connectorArn",cdk().validateString)(properties.connectorArn)),errors.collect(cdk().propertyValidator("tags",cdk().hashValidator(cdk().validateString))(properties.tags)),errors.wrap('supplied properties not correct for "CfnChallengeProps"')}function convertCfnChallengePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnChallengePropsValidator(properties).assertSuccess(),{ConnectorArn:cdk().stringToCloudFormation(properties.connectorArn),Tags:cdk().hashMapper(cdk().stringToCloudFormation)(properties.tags)}):properties}function CfnChallengePropsFromCloudFormation(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("connectorArn","ConnectorArn",properties.ConnectorArn!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectorArn):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 CfnConnector extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnConnectorPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnConnector(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:CfnConnector.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_pcaconnectorscep_CfnConnectorProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnConnector),error}cdk().requireProperty(props,"certificateAuthorityArn",this),this.attrConnectorArn=cdk().Token.asString(this.getAtt("ConnectorArn",cdk().ResolutionTypeHint.STRING)),this.attrEndpoint=cdk().Token.asString(this.getAtt("Endpoint",cdk().ResolutionTypeHint.STRING)),this.attrOpenIdConfiguration=this.getAtt("OpenIdConfiguration"),this.attrType=cdk().Token.asString(this.getAtt("Type",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.MAP,"AWS::PCAConnectorSCEP::Connector",void 0,{tagPropertyName:"tags"}),this.certificateAuthorityArn=props.certificateAuthorityArn,this.mobileDeviceManagement=props.mobileDeviceManagement,this.tags=props.tags}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),certificateAuthorityArn:this.certificateAuthorityArn,mobileDeviceManagement:this.mobileDeviceManagement}}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",CfnConnector.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnConnectorPropsToCloudFormation(props)}}exports.CfnConnector=CfnConnector,_b=JSII_RTTI_SYMBOL_1,CfnConnector[_b]={fqn:"aws-cdk-lib.aws_pcaconnectorscep.CfnConnector",version:"2.185.0"},CfnConnector.CFN_RESOURCE_TYPE_NAME="AWS::PCAConnectorSCEP::Connector";function CfnConnectorIntuneConfigurationPropertyValidator(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("azureApplicationId",cdk().requiredValidator)(properties.azureApplicationId)),errors.collect(cdk().propertyValidator("azureApplicationId",cdk().validateString)(properties.azureApplicationId)),errors.collect(cdk().propertyValidator("domain",cdk().requiredValidator)(properties.domain)),errors.collect(cdk().propertyValidator("domain",cdk().validateString)(properties.domain)),errors.wrap('supplied properties not correct for "IntuneConfigurationProperty"')}function convertCfnConnectorIntuneConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnConnectorIntuneConfigurationPropertyValidator(properties).assertSuccess(),{AzureApplicationId:cdk().stringToCloudFormation(properties.azureApplicationId),Domain:cdk().stringToCloudFormation(properties.domain)}):properties}function CfnConnectorIntuneConfigurationPropertyFromCloudFormation(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("azureApplicationId","AzureApplicationId",properties.AzureApplicationId!=null?cfn_parse().FromCloudFormation.getString(properties.AzureApplicationId):void 0),ret.addPropertyResult("domain","Domain",properties.Domain!=null?cfn_parse().FromCloudFormation.getString(properties.Domain):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnConnectorMobileDeviceManagementPropertyValidator(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("intune",cdk().requiredValidator)(properties.intune)),errors.collect(cdk().propertyValidator("intune",CfnConnectorIntuneConfigurationPropertyValidator)(properties.intune)),errors.wrap('supplied properties not correct for "MobileDeviceManagementProperty"')}function convertCfnConnectorMobileDeviceManagementPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnConnectorMobileDeviceManagementPropertyValidator(properties).assertSuccess(),{Intune:convertCfnConnectorIntuneConfigurationPropertyToCloudFormation(properties.intune)}):properties}function CfnConnectorMobileDeviceManagementPropertyFromCloudFormation(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("intune","Intune",properties.Intune!=null?CfnConnectorIntuneConfigurationPropertyFromCloudFormation(properties.Intune):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnConnectorOpenIdConfigurationPropertyValidator(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("audience",cdk().validateString)(properties.audience)),errors.collect(cdk().propertyValidator("issuer",cdk().validateString)(properties.issuer)),errors.collect(cdk().propertyValidator("subject",cdk().validateString)(properties.subject)),errors.wrap('supplied properties not correct for "OpenIdConfigurationProperty"')}function convertCfnConnectorOpenIdConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnConnectorOpenIdConfigurationPropertyValidator(properties).assertSuccess(),{Audience:cdk().stringToCloudFormation(properties.audience),Issuer:cdk().stringToCloudFormation(properties.issuer),Subject:cdk().stringToCloudFormation(properties.subject)}):properties}function CfnConnectorOpenIdConfigurationPropertyFromCloudFormation(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("audience","Audience",properties.Audience!=null?cfn_parse().FromCloudFormation.getString(properties.Audience):void 0),ret.addPropertyResult("issuer","Issuer",properties.Issuer!=null?cfn_parse().FromCloudFormation.getString(properties.Issuer):void 0),ret.addPropertyResult("subject","Subject",properties.Subject!=null?cfn_parse().FromCloudFormation.getString(properties.Subject):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnConnectorPropsValidator(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("certificateAuthorityArn",cdk().requiredValidator)(properties.certificateAuthorityArn)),errors.collect(cdk().propertyValidator("certificateAuthorityArn",cdk().validateString)(properties.certificateAuthorityArn)),errors.collect(cdk().propertyValidator("mobileDeviceManagement",CfnConnectorMobileDeviceManagementPropertyValidator)(properties.mobileDeviceManagement)),errors.collect(cdk().propertyValidator("tags",cdk().hashValidator(cdk().validateString))(properties.tags)),errors.wrap('supplied properties not correct for "CfnConnectorProps"')}function convertCfnConnectorPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnConnectorPropsValidator(properties).assertSuccess(),{CertificateAuthorityArn:cdk().stringToCloudFormation(properties.certificateAuthorityArn),MobileDeviceManagement:convertCfnConnectorMobileDeviceManagementPropertyToCloudFormation(properties.mobileDeviceManagement),Tags:cdk().hashMapper(cdk().stringToCloudFormation)(properties.tags)}):properties}function CfnConnectorPropsFromCloudFormation(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("certificateAuthorityArn","CertificateAuthorityArn",properties.CertificateAuthorityArn!=null?cfn_parse().FromCloudFormation.getString(properties.CertificateAuthorityArn):void 0),ret.addPropertyResult("mobileDeviceManagement","MobileDeviceManagement",properties.MobileDeviceManagement!=null?CfnConnectorMobileDeviceManagementPropertyFromCloudFormation(properties.MobileDeviceManagement):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}