UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 31.1 kB
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnEndpoint=exports.CfnBucketPolicy=exports.CfnBucket=exports.CfnAccessPoint=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 CfnAccessPointPropsValidator(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("bucket",cdk.requiredValidator)(properties.bucket)),errors.collect(cdk.propertyValidator("bucket",cdk.validateString)(properties.bucket)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("policy",cdk.validateObject)(properties.policy)),errors.collect(cdk.propertyValidator("vpcConfiguration",cdk.requiredValidator)(properties.vpcConfiguration)),errors.collect(cdk.propertyValidator("vpcConfiguration",CfnAccessPoint_VpcConfigurationPropertyValidator)(properties.vpcConfiguration)),errors.wrap('supplied properties not correct for "CfnAccessPointProps"')}function cfnAccessPointPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAccessPointPropsValidator(properties).assertSuccess(),{Bucket:cdk.stringToCloudFormation(properties.bucket),Name:cdk.stringToCloudFormation(properties.name),VpcConfiguration:cfnAccessPointVpcConfigurationPropertyToCloudFormation(properties.vpcConfiguration),Policy:cdk.objectToCloudFormation(properties.policy)}):properties}function CfnAccessPointPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("bucket","Bucket",cfn_parse.FromCloudFormation.getString(properties.Bucket)),ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("vpcConfiguration","VpcConfiguration",CfnAccessPointVpcConfigurationPropertyFromCloudFormation(properties.VpcConfiguration)),ret.addPropertyResult("policy","Policy",properties.Policy!=null?cfn_parse.FromCloudFormation.getAny(properties.Policy):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAccessPoint extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnAccessPoint.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_s3outposts_CfnAccessPointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccessPoint),error}cdk.requireProperty(props,"bucket",this),cdk.requireProperty(props,"name",this),cdk.requireProperty(props,"vpcConfiguration",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.bucket=props.bucket,this.name=props.name,this.vpcConfiguration=props.vpcConfiguration,this.policy=props.policy}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAccessPointPropsFromCloudFormation(resourceProperties),ret=new CfnAccessPoint(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",CfnAccessPoint.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{bucket:this.bucket,name:this.name,vpcConfiguration:this.vpcConfiguration,policy:this.policy}}renderProperties(props){return cfnAccessPointPropsToCloudFormation(props)}}exports.CfnAccessPoint=CfnAccessPoint,_a=JSII_RTTI_SYMBOL_1,CfnAccessPoint[_a]={fqn:"aws-cdk-lib.aws_s3outposts.CfnAccessPoint",version:"2.70.0"},CfnAccessPoint.CFN_RESOURCE_TYPE_NAME="AWS::S3Outposts::AccessPoint";function CfnAccessPoint_VpcConfigurationPropertyValidator(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("vpcId",cdk.validateString)(properties.vpcId)),errors.wrap('supplied properties not correct for "VpcConfigurationProperty"')}function cfnAccessPointVpcConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAccessPoint_VpcConfigurationPropertyValidator(properties).assertSuccess(),{VpcId:cdk.stringToCloudFormation(properties.vpcId)}):properties}function CfnAccessPointVpcConfigurationPropertyFromCloudFormation(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("vpcId","VpcId",properties.VpcId!=null?cfn_parse.FromCloudFormation.getString(properties.VpcId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketPropsValidator(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("bucketName",cdk.requiredValidator)(properties.bucketName)),errors.collect(cdk.propertyValidator("bucketName",cdk.validateString)(properties.bucketName)),errors.collect(cdk.propertyValidator("lifecycleConfiguration",CfnBucket_LifecycleConfigurationPropertyValidator)(properties.lifecycleConfiguration)),errors.collect(cdk.propertyValidator("outpostId",cdk.requiredValidator)(properties.outpostId)),errors.collect(cdk.propertyValidator("outpostId",cdk.validateString)(properties.outpostId)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnBucketProps"')}function cfnBucketPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucketPropsValidator(properties).assertSuccess(),{BucketName:cdk.stringToCloudFormation(properties.bucketName),OutpostId:cdk.stringToCloudFormation(properties.outpostId),LifecycleConfiguration:cfnBucketLifecycleConfigurationPropertyToCloudFormation(properties.lifecycleConfiguration),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnBucketPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("bucketName","BucketName",cfn_parse.FromCloudFormation.getString(properties.BucketName)),ret.addPropertyResult("outpostId","OutpostId",cfn_parse.FromCloudFormation.getString(properties.OutpostId)),ret.addPropertyResult("lifecycleConfiguration","LifecycleConfiguration",properties.LifecycleConfiguration!=null?CfnBucketLifecycleConfigurationPropertyFromCloudFormation(properties.LifecycleConfiguration):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 CfnBucket extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnBucket.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_s3outposts_CfnBucketProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnBucket),error}cdk.requireProperty(props,"bucketName",this),cdk.requireProperty(props,"outpostId",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.bucketName=props.bucketName,this.outpostId=props.outpostId,this.lifecycleConfiguration=props.lifecycleConfiguration,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::S3Outposts::Bucket",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnBucketPropsFromCloudFormation(resourceProperties),ret=new CfnBucket(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",CfnBucket.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{bucketName:this.bucketName,outpostId:this.outpostId,lifecycleConfiguration:this.lifecycleConfiguration,tags:this.tags.renderTags()}}renderProperties(props){return cfnBucketPropsToCloudFormation(props)}}exports.CfnBucket=CfnBucket,_b=JSII_RTTI_SYMBOL_1,CfnBucket[_b]={fqn:"aws-cdk-lib.aws_s3outposts.CfnBucket",version:"2.70.0"},CfnBucket.CFN_RESOURCE_TYPE_NAME="AWS::S3Outposts::Bucket";function CfnBucket_AbortIncompleteMultipartUploadPropertyValidator(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("daysAfterInitiation",cdk.requiredValidator)(properties.daysAfterInitiation)),errors.collect(cdk.propertyValidator("daysAfterInitiation",cdk.validateNumber)(properties.daysAfterInitiation)),errors.wrap('supplied properties not correct for "AbortIncompleteMultipartUploadProperty"')}function cfnBucketAbortIncompleteMultipartUploadPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucket_AbortIncompleteMultipartUploadPropertyValidator(properties).assertSuccess(),{DaysAfterInitiation:cdk.numberToCloudFormation(properties.daysAfterInitiation)}):properties}function CfnBucketAbortIncompleteMultipartUploadPropertyFromCloudFormation(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("daysAfterInitiation","DaysAfterInitiation",cfn_parse.FromCloudFormation.getNumber(properties.DaysAfterInitiation)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucket_FilterPropertyValidator(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("andOperator",CfnBucket_FilterAndOperatorPropertyValidator)(properties.andOperator)),errors.collect(cdk.propertyValidator("prefix",cdk.validateString)(properties.prefix)),errors.collect(cdk.propertyValidator("tag",CfnBucket_FilterTagPropertyValidator)(properties.tag)),errors.wrap('supplied properties not correct for "FilterProperty"')}function cfnBucketFilterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucket_FilterPropertyValidator(properties).assertSuccess(),{AndOperator:cfnBucketFilterAndOperatorPropertyToCloudFormation(properties.andOperator),Prefix:cdk.stringToCloudFormation(properties.prefix),Tag:cfnBucketFilterTagPropertyToCloudFormation(properties.tag)}):properties}function CfnBucketFilterPropertyFromCloudFormation(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("andOperator","AndOperator",properties.AndOperator!=null?CfnBucketFilterAndOperatorPropertyFromCloudFormation(properties.AndOperator):void 0),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse.FromCloudFormation.getString(properties.Prefix):void 0),ret.addPropertyResult("tag","Tag",properties.Tag!=null?CfnBucketFilterTagPropertyFromCloudFormation(properties.Tag):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucket_FilterAndOperatorPropertyValidator(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("prefix",cdk.validateString)(properties.prefix)),errors.collect(cdk.propertyValidator("tags",cdk.requiredValidator)(properties.tags)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(CfnBucket_FilterTagPropertyValidator))(properties.tags)),errors.wrap('supplied properties not correct for "FilterAndOperatorProperty"')}function cfnBucketFilterAndOperatorPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucket_FilterAndOperatorPropertyValidator(properties).assertSuccess(),{Prefix:cdk.stringToCloudFormation(properties.prefix),Tags:cdk.listMapper(cfnBucketFilterTagPropertyToCloudFormation)(properties.tags)}):properties}function CfnBucketFilterAndOperatorPropertyFromCloudFormation(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("prefix","Prefix",properties.Prefix!=null?cfn_parse.FromCloudFormation.getString(properties.Prefix):void 0),ret.addPropertyResult("tags","Tags",cfn_parse.FromCloudFormation.getArray(CfnBucketFilterTagPropertyFromCloudFormation)(properties.Tags)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucket_FilterTagPropertyValidator(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("key",cdk.requiredValidator)(properties.key)),errors.collect(cdk.propertyValidator("key",cdk.validateString)(properties.key)),errors.collect(cdk.propertyValidator("value",cdk.requiredValidator)(properties.value)),errors.collect(cdk.propertyValidator("value",cdk.validateString)(properties.value)),errors.wrap('supplied properties not correct for "FilterTagProperty"')}function cfnBucketFilterTagPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucket_FilterTagPropertyValidator(properties).assertSuccess(),{Key:cdk.stringToCloudFormation(properties.key),Value:cdk.stringToCloudFormation(properties.value)}):properties}function CfnBucketFilterTagPropertyFromCloudFormation(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("key","Key",cfn_parse.FromCloudFormation.getString(properties.Key)),ret.addPropertyResult("value","Value",cfn_parse.FromCloudFormation.getString(properties.Value)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucket_LifecycleConfigurationPropertyValidator(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("rules",cdk.requiredValidator)(properties.rules)),errors.collect(cdk.propertyValidator("rules",cdk.listValidator(CfnBucket_RulePropertyValidator))(properties.rules)),errors.wrap('supplied properties not correct for "LifecycleConfigurationProperty"')}function cfnBucketLifecycleConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucket_LifecycleConfigurationPropertyValidator(properties).assertSuccess(),{Rules:cdk.listMapper(cfnBucketRulePropertyToCloudFormation)(properties.rules)}):properties}function CfnBucketLifecycleConfigurationPropertyFromCloudFormation(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("rules","Rules",cfn_parse.FromCloudFormation.getArray(CfnBucketRulePropertyFromCloudFormation)(properties.Rules)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucket_RulePropertyValidator(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("abortIncompleteMultipartUpload",CfnBucket_AbortIncompleteMultipartUploadPropertyValidator)(properties.abortIncompleteMultipartUpload)),errors.collect(cdk.propertyValidator("expirationDate",cdk.validateString)(properties.expirationDate)),errors.collect(cdk.propertyValidator("expirationInDays",cdk.validateNumber)(properties.expirationInDays)),errors.collect(cdk.propertyValidator("filter",cdk.validateObject)(properties.filter)),errors.collect(cdk.propertyValidator("id",cdk.validateString)(properties.id)),errors.collect(cdk.propertyValidator("status",cdk.requiredValidator)(properties.status)),errors.collect(cdk.propertyValidator("status",cdk.validateString)(properties.status)),errors.wrap('supplied properties not correct for "RuleProperty"')}function cfnBucketRulePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucket_RulePropertyValidator(properties).assertSuccess(),{AbortIncompleteMultipartUpload:cfnBucketAbortIncompleteMultipartUploadPropertyToCloudFormation(properties.abortIncompleteMultipartUpload),ExpirationDate:cdk.stringToCloudFormation(properties.expirationDate),ExpirationInDays:cdk.numberToCloudFormation(properties.expirationInDays),Filter:cdk.objectToCloudFormation(properties.filter),Id:cdk.stringToCloudFormation(properties.id),Status:cdk.stringToCloudFormation(properties.status)}):properties}function CfnBucketRulePropertyFromCloudFormation(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("abortIncompleteMultipartUpload","AbortIncompleteMultipartUpload",properties.AbortIncompleteMultipartUpload!=null?CfnBucketAbortIncompleteMultipartUploadPropertyFromCloudFormation(properties.AbortIncompleteMultipartUpload):void 0),ret.addPropertyResult("expirationDate","ExpirationDate",properties.ExpirationDate!=null?cfn_parse.FromCloudFormation.getString(properties.ExpirationDate):void 0),ret.addPropertyResult("expirationInDays","ExpirationInDays",properties.ExpirationInDays!=null?cfn_parse.FromCloudFormation.getNumber(properties.ExpirationInDays):void 0),ret.addPropertyResult("filter","Filter",properties.Filter!=null?cfn_parse.FromCloudFormation.getAny(properties.Filter):void 0),ret.addPropertyResult("id","Id",properties.Id!=null?cfn_parse.FromCloudFormation.getString(properties.Id):void 0),ret.addPropertyResult("status","Status",cfn_parse.FromCloudFormation.getString(properties.Status)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnBucketPolicyPropsValidator(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("bucket",cdk.requiredValidator)(properties.bucket)),errors.collect(cdk.propertyValidator("bucket",cdk.validateString)(properties.bucket)),errors.collect(cdk.propertyValidator("policyDocument",cdk.requiredValidator)(properties.policyDocument)),errors.collect(cdk.propertyValidator("policyDocument",cdk.validateObject)(properties.policyDocument)),errors.wrap('supplied properties not correct for "CfnBucketPolicyProps"')}function cfnBucketPolicyPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnBucketPolicyPropsValidator(properties).assertSuccess(),{Bucket:cdk.stringToCloudFormation(properties.bucket),PolicyDocument:cdk.objectToCloudFormation(properties.policyDocument)}):properties}function CfnBucketPolicyPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("bucket","Bucket",cfn_parse.FromCloudFormation.getString(properties.Bucket)),ret.addPropertyResult("policyDocument","PolicyDocument",cfn_parse.FromCloudFormation.getAny(properties.PolicyDocument)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnBucketPolicy extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnBucketPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_s3outposts_CfnBucketPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnBucketPolicy),error}cdk.requireProperty(props,"bucket",this),cdk.requireProperty(props,"policyDocument",this),this.bucket=props.bucket,this.policyDocument=props.policyDocument}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnBucketPolicyPropsFromCloudFormation(resourceProperties),ret=new CfnBucketPolicy(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",CfnBucketPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{bucket:this.bucket,policyDocument:this.policyDocument}}renderProperties(props){return cfnBucketPolicyPropsToCloudFormation(props)}}exports.CfnBucketPolicy=CfnBucketPolicy,_c=JSII_RTTI_SYMBOL_1,CfnBucketPolicy[_c]={fqn:"aws-cdk-lib.aws_s3outposts.CfnBucketPolicy",version:"2.70.0"},CfnBucketPolicy.CFN_RESOURCE_TYPE_NAME="AWS::S3Outposts::BucketPolicy";function CfnEndpointPropsValidator(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("accessType",cdk.validateString)(properties.accessType)),errors.collect(cdk.propertyValidator("customerOwnedIpv4Pool",cdk.validateString)(properties.customerOwnedIpv4Pool)),errors.collect(cdk.propertyValidator("outpostId",cdk.requiredValidator)(properties.outpostId)),errors.collect(cdk.propertyValidator("outpostId",cdk.validateString)(properties.outpostId)),errors.collect(cdk.propertyValidator("securityGroupId",cdk.requiredValidator)(properties.securityGroupId)),errors.collect(cdk.propertyValidator("securityGroupId",cdk.validateString)(properties.securityGroupId)),errors.collect(cdk.propertyValidator("subnetId",cdk.requiredValidator)(properties.subnetId)),errors.collect(cdk.propertyValidator("subnetId",cdk.validateString)(properties.subnetId)),errors.wrap('supplied properties not correct for "CfnEndpointProps"')}function cfnEndpointPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEndpointPropsValidator(properties).assertSuccess(),{OutpostId:cdk.stringToCloudFormation(properties.outpostId),SecurityGroupId:cdk.stringToCloudFormation(properties.securityGroupId),SubnetId:cdk.stringToCloudFormation(properties.subnetId),AccessType:cdk.stringToCloudFormation(properties.accessType),CustomerOwnedIpv4Pool:cdk.stringToCloudFormation(properties.customerOwnedIpv4Pool)}):properties}function CfnEndpointPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("outpostId","OutpostId",cfn_parse.FromCloudFormation.getString(properties.OutpostId)),ret.addPropertyResult("securityGroupId","SecurityGroupId",cfn_parse.FromCloudFormation.getString(properties.SecurityGroupId)),ret.addPropertyResult("subnetId","SubnetId",cfn_parse.FromCloudFormation.getString(properties.SubnetId)),ret.addPropertyResult("accessType","AccessType",properties.AccessType!=null?cfn_parse.FromCloudFormation.getString(properties.AccessType):void 0),ret.addPropertyResult("customerOwnedIpv4Pool","CustomerOwnedIpv4Pool",properties.CustomerOwnedIpv4Pool!=null?cfn_parse.FromCloudFormation.getString(properties.CustomerOwnedIpv4Pool):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnEndpoint extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnEndpoint.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_s3outposts_CfnEndpointProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEndpoint),error}cdk.requireProperty(props,"outpostId",this),cdk.requireProperty(props,"securityGroupId",this),cdk.requireProperty(props,"subnetId",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrCidrBlock=cdk.Token.asString(this.getAtt("CidrBlock",cdk.ResolutionTypeHint.STRING)),this.attrCreationTime=cdk.Token.asString(this.getAtt("CreationTime",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.attrNetworkInterfaces=this.getAtt("NetworkInterfaces",cdk.ResolutionTypeHint.STRING),this.attrStatus=cdk.Token.asString(this.getAtt("Status",cdk.ResolutionTypeHint.STRING)),this.outpostId=props.outpostId,this.securityGroupId=props.securityGroupId,this.subnetId=props.subnetId,this.accessType=props.accessType,this.customerOwnedIpv4Pool=props.customerOwnedIpv4Pool}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEndpointPropsFromCloudFormation(resourceProperties),ret=new CfnEndpoint(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",CfnEndpoint.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{outpostId:this.outpostId,securityGroupId:this.securityGroupId,subnetId:this.subnetId,accessType:this.accessType,customerOwnedIpv4Pool:this.customerOwnedIpv4Pool}}renderProperties(props){return cfnEndpointPropsToCloudFormation(props)}}exports.CfnEndpoint=CfnEndpoint,_d=JSII_RTTI_SYMBOL_1,CfnEndpoint[_d]={fqn:"aws-cdk-lib.aws_s3outposts.CfnEndpoint",version:"2.70.0"},CfnEndpoint.CFN_RESOURCE_TYPE_NAME="AWS::S3Outposts::Endpoint";function CfnEndpoint_NetworkInterfacePropertyValidator(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("networkInterfaceId",cdk.requiredValidator)(properties.networkInterfaceId)),errors.collect(cdk.propertyValidator("networkInterfaceId",cdk.validateString)(properties.networkInterfaceId)),errors.wrap('supplied properties not correct for "NetworkInterfaceProperty"')}function cfnEndpointNetworkInterfacePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEndpoint_NetworkInterfacePropertyValidator(properties).assertSuccess(),{NetworkInterfaceId:cdk.stringToCloudFormation(properties.networkInterfaceId)}):properties}function CfnEndpointNetworkInterfacePropertyFromCloudFormation(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("networkInterfaceId","NetworkInterfaceId",cfn_parse.FromCloudFormation.getString(properties.NetworkInterfaceId)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}