aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1 lines • 167 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnTransformer=exports.CfnLogAnomalyDetector=exports.CfnIntegration=exports.CfnDeliverySource=exports.CfnDeliveryDestination=exports.CfnDelivery=exports.CfnSubscriptionFilter=exports.CfnResourcePolicy=exports.CfnQueryDefinition=exports.CfnMetricFilter=exports.CfnLogStream=exports.CfnLogGroup=exports.CfnDestination=exports.CfnAccountPolicy=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/lib");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 CfnAccountPolicy extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnAccountPolicy",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::AccountPolicy";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAccountPolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnAccountPolicy(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}static isCfnAccountPolicy(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnAccountPolicy.CFN_RESOURCE_TYPE_NAME}attrAccountId;policyDocument;policyName;policyType;scope;selectionCriteria;constructor(scope,id,props){super(scope,id,{type:CfnAccountPolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnAccountPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccountPolicy),error}cdk().requireProperty(props,"policyDocument",this),cdk().requireProperty(props,"policyName",this),cdk().requireProperty(props,"policyType",this),this.attrAccountId=cdk().Token.asString(this.getAtt("AccountId",cdk().ResolutionTypeHint.STRING)),this.policyDocument=props.policyDocument,this.policyName=props.policyName,this.policyType=props.policyType,this.scope=props.scope,this.selectionCriteria=props.selectionCriteria}get accountPolicyRef(){return{accountId:cdk().Fn.select(0,cdk().Fn.split("|",this.ref)),policyType:cdk().Fn.select(1,cdk().Fn.split("|",this.ref)),policyName:cdk().Fn.select(2,cdk().Fn.split("|",this.ref))}}get cfnProperties(){return{policyDocument:this.policyDocument,policyName:this.policyName,policyType:this.policyType,scope:this.scope,selectionCriteria:this.selectionCriteria}}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",CfnAccountPolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnAccountPolicyPropsToCloudFormation(props)}}exports.CfnAccountPolicy=CfnAccountPolicy;function CfnAccountPolicyPropsValidator(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("policyDocument",cdk().requiredValidator)(properties.policyDocument)),errors.collect(cdk().propertyValidator("policyDocument",cdk().validateString)(properties.policyDocument)),errors.collect(cdk().propertyValidator("policyName",cdk().requiredValidator)(properties.policyName)),errors.collect(cdk().propertyValidator("policyName",cdk().validateString)(properties.policyName)),errors.collect(cdk().propertyValidator("policyType",cdk().requiredValidator)(properties.policyType)),errors.collect(cdk().propertyValidator("policyType",cdk().validateString)(properties.policyType)),errors.collect(cdk().propertyValidator("scope",cdk().validateString)(properties.scope)),errors.collect(cdk().propertyValidator("selectionCriteria",cdk().validateString)(properties.selectionCriteria)),errors.wrap('supplied properties not correct for "CfnAccountPolicyProps"')}function convertCfnAccountPolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnAccountPolicyPropsValidator(properties).assertSuccess(),{PolicyDocument:cdk().stringToCloudFormation(properties.policyDocument),PolicyName:cdk().stringToCloudFormation(properties.policyName),PolicyType:cdk().stringToCloudFormation(properties.policyType),Scope:cdk().stringToCloudFormation(properties.scope),SelectionCriteria:cdk().stringToCloudFormation(properties.selectionCriteria)}):properties}function CfnAccountPolicyPropsFromCloudFormation(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("policyDocument","PolicyDocument",properties.PolicyDocument!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyDocument):void 0),ret.addPropertyResult("policyName","PolicyName",properties.PolicyName!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyName):void 0),ret.addPropertyResult("policyType","PolicyType",properties.PolicyType!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyType):void 0),ret.addPropertyResult("scope","Scope",properties.Scope!=null?cfn_parse().FromCloudFormation.getString(properties.Scope):void 0),ret.addPropertyResult("selectionCriteria","SelectionCriteria",properties.SelectionCriteria!=null?cfn_parse().FromCloudFormation.getString(properties.SelectionCriteria):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnDestination extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnDestination",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::Destination";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnDestinationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnDestination(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}static isCfnDestination(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnDestination.CFN_RESOURCE_TYPE_NAME}static fromDestinationArn(scope,id,arn){class Import extends cdk().Resource{destinationRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:logs:${Region}:${Account}:destination:${DestinationName}").parse(arn2);this.destinationRef={destinationName:variables.DestinationName,destinationArn:arn2}}}return new Import(scope,id,arn)}static fromDestinationName(scope,id,destinationName){class Import extends cdk().Resource{destinationRef;constructor(scope2,id2,destinationName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:logs:${Region}:${Account}:destination:${DestinationName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,DestinationName:destinationName2});super(scope2,id2,{environmentFromArn:arn}),this.destinationRef={destinationName:destinationName2,destinationArn:arn}}}return new Import(scope,id,destinationName)}static arnForDestination(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_logs_IDestinationRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForDestination),error}return resource.destinationRef.destinationArn}attrArn;cdkTagManager;destinationName;destinationPolicy;roleArn;tags;targetArn;constructor(scope,id,props){super(scope,id,{type:CfnDestination.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnDestinationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnDestination),error}cdk().requireProperty(props,"destinationName",this),cdk().requireProperty(props,"roleArn",this),cdk().requireProperty(props,"targetArn",this),this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Logs::Destination",void 0,{tagPropertyName:"tags"}),this.destinationName=props.destinationName,this.destinationPolicy=props.destinationPolicy,this.roleArn=props.roleArn?.roleRef?.roleArn??cdk().ensureStringOrUndefined(props.roleArn,"roleArn","iam.IRoleRef | string"),this.tags=props.tags,this.targetArn=props.targetArn?.deliveryStreamRef?.deliveryStreamArn??props.targetArn?.streamRef?.streamArn??props.targetArn?.functionRef?.functionArn??cdk().ensureStringOrUndefined(props.targetArn,"targetArn","kinesisfirehose.IDeliveryStreamRef | kinesis.IStreamRef | lambda.IFunctionRef | string")}get destinationRef(){return{destinationName:this.ref,destinationArn:this.attrArn}}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),destinationName:this.destinationName,destinationPolicy:this.destinationPolicy,roleArn:this.roleArn,targetArn:this.targetArn}}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",CfnDestination.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnDestinationPropsToCloudFormation(props)}}exports.CfnDestination=CfnDestination;function CfnDestinationPropsValidator(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("destinationName",cdk().requiredValidator)(properties.destinationName)),errors.collect(cdk().propertyValidator("destinationName",cdk().validateString)(properties.destinationName)),errors.collect(cdk().propertyValidator("destinationPolicy",cdk().validateString)(properties.destinationPolicy)),errors.collect(cdk().propertyValidator("roleArn",cdk().requiredValidator)(properties.roleArn)),errors.collect(cdk().propertyValidator("roleArn",cdk().validateString)(properties.roleArn)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("targetArn",cdk().requiredValidator)(properties.targetArn)),errors.collect(cdk().propertyValidator("targetArn",cdk().validateString)(properties.targetArn)),errors.wrap('supplied properties not correct for "CfnDestinationProps"')}function convertCfnDestinationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDestinationPropsValidator(properties).assertSuccess(),{DestinationName:cdk().stringToCloudFormation(properties.destinationName),DestinationPolicy:cdk().stringToCloudFormation(properties.destinationPolicy),RoleArn:cdk().stringToCloudFormation(properties.roleArn),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TargetArn:cdk().stringToCloudFormation(properties.targetArn)}):properties}function CfnDestinationPropsFromCloudFormation(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("destinationName","DestinationName",properties.DestinationName!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationName):void 0),ret.addPropertyResult("destinationPolicy","DestinationPolicy",properties.DestinationPolicy!=null?cfn_parse().FromCloudFormation.getString(properties.DestinationPolicy):void 0),ret.addPropertyResult("roleArn","RoleArn",properties.RoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.RoleArn):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("targetArn","TargetArn",properties.TargetArn!=null?cfn_parse().FromCloudFormation.getString(properties.TargetArn):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnLogGroup extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnLogGroup",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::LogGroup";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnLogGroupPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnLogGroup(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}static isCfnLogGroup(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnLogGroup.CFN_RESOURCE_TYPE_NAME}static fromLogGroupArn(scope,id,arn){class Import extends cdk().Resource{logGroupRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}").parse(arn2);this.logGroupRef={logGroupName:variables.LogGroupName,logGroupArn:arn2}}}return new Import(scope,id,arn)}static fromLogGroupName(scope,id,logGroupName){class Import extends cdk().Resource{logGroupRef;constructor(scope2,id2,logGroupName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,LogGroupName:logGroupName2});super(scope2,id2,{environmentFromArn:arn}),this.logGroupRef={logGroupName:logGroupName2,logGroupArn:arn}}}return new Import(scope,id,logGroupName)}static arnForLogGroup(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_logs_ILogGroupRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForLogGroup),error}return resource.logGroupRef.logGroupArn}attrArn;dataProtectionPolicy;fieldIndexPolicies;kmsKeyId;logGroupClass;logGroupName;resourcePolicyDocument;retentionInDays;tags;tagsRaw;constructor(scope,id,props={}){super(scope,id,{type:CfnLogGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnLogGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnLogGroup),error}this.attrArn=cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING)),this.dataProtectionPolicy=props.dataProtectionPolicy,this.fieldIndexPolicies=props.fieldIndexPolicies,this.kmsKeyId=props.kmsKeyId?.keyRef?.keyArn??cdk().ensureStringOrUndefined(props.kmsKeyId,"kmsKeyId","kms.IKeyRef | string"),this.logGroupClass=props.logGroupClass,this.logGroupName=props.logGroupName?.functionRef?.functionName??cdk().ensureStringOrUndefined(props.logGroupName,"logGroupName","lambda.IFunctionRef | string"),this.resourcePolicyDocument=props.resourcePolicyDocument,this.retentionInDays=props.retentionInDays,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Logs::LogGroup",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::Logs::LogGroup' is a stateful resource type, and you must specify a Removal Policy for it. Call 'resource.applyRemovalPolicy()'."]:[]})}get logGroupRef(){return{logGroupName:this.ref,logGroupArn:this.attrArn}}get cfnProperties(){return{dataProtectionPolicy:this.dataProtectionPolicy,fieldIndexPolicies:this.fieldIndexPolicies,kmsKeyId:this.kmsKeyId,logGroupClass:this.logGroupClass,logGroupName:this.logGroupName,resourcePolicyDocument:this.resourcePolicyDocument,retentionInDays:this.retentionInDays,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",CfnLogGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnLogGroupPropsToCloudFormation(props)}}exports.CfnLogGroup=CfnLogGroup;function CfnLogGroupPropsValidator(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("dataProtectionPolicy",cdk().validateObject)(properties.dataProtectionPolicy)),errors.collect(cdk().propertyValidator("fieldIndexPolicies",cdk().listValidator(cdk().validateObject))(properties.fieldIndexPolicies)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("logGroupClass",cdk().validateString)(properties.logGroupClass)),errors.collect(cdk().propertyValidator("logGroupName",cdk().validateString)(properties.logGroupName)),errors.collect(cdk().propertyValidator("resourcePolicyDocument",cdk().validateObject)(properties.resourcePolicyDocument)),errors.collect(cdk().propertyValidator("retentionInDays",cdk().validateNumber)(properties.retentionInDays)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnLogGroupProps"')}function convertCfnLogGroupPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnLogGroupPropsValidator(properties).assertSuccess(),{DataProtectionPolicy:cdk().objectToCloudFormation(properties.dataProtectionPolicy),FieldIndexPolicies:cdk().listMapper(cdk().objectToCloudFormation)(properties.fieldIndexPolicies),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),LogGroupClass:cdk().stringToCloudFormation(properties.logGroupClass),LogGroupName:cdk().stringToCloudFormation(properties.logGroupName),ResourcePolicyDocument:cdk().objectToCloudFormation(properties.resourcePolicyDocument),RetentionInDays:cdk().numberToCloudFormation(properties.retentionInDays),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnLogGroupPropsFromCloudFormation(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("dataProtectionPolicy","DataProtectionPolicy",properties.DataProtectionPolicy!=null?cfn_parse().FromCloudFormation.getAny(properties.DataProtectionPolicy):void 0),ret.addPropertyResult("fieldIndexPolicies","FieldIndexPolicies",properties.FieldIndexPolicies!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getAny)(properties.FieldIndexPolicies):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("logGroupClass","LogGroupClass",properties.LogGroupClass!=null?cfn_parse().FromCloudFormation.getString(properties.LogGroupClass):void 0),ret.addPropertyResult("logGroupName","LogGroupName",properties.LogGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.LogGroupName):void 0),ret.addPropertyResult("resourcePolicyDocument","ResourcePolicyDocument",properties.ResourcePolicyDocument!=null?cfn_parse().FromCloudFormation.getAny(properties.ResourcePolicyDocument):void 0),ret.addPropertyResult("retentionInDays","RetentionInDays",properties.RetentionInDays!=null?cfn_parse().FromCloudFormation.getNumber(properties.RetentionInDays):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 CfnLogStream extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnLogStream",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::LogStream";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnLogStreamPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnLogStream(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}static isCfnLogStream(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnLogStream.CFN_RESOURCE_TYPE_NAME}logGroupName;logStreamName;constructor(scope,id,props){super(scope,id,{type:CfnLogStream.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnLogStreamProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnLogStream),error}cdk().requireProperty(props,"logGroupName",this),this.logGroupName=props.logGroupName?.logGroupRef?.logGroupName??cdk().ensureStringOrUndefined(props.logGroupName,"logGroupName","logs.ILogGroupRef | string"),this.logStreamName=props.logStreamName}get logStreamRef(){return{logGroupName:cdk().Fn.select(0,cdk().Fn.split("|",this.ref)),logStreamName:cdk().Fn.select(1,cdk().Fn.split("|",this.ref))}}get cfnProperties(){return{logGroupName:this.logGroupName,logStreamName:this.logStreamName}}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",CfnLogStream.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnLogStreamPropsToCloudFormation(props)}}exports.CfnLogStream=CfnLogStream;function CfnLogStreamPropsValidator(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("logGroupName",cdk().requiredValidator)(properties.logGroupName)),errors.collect(cdk().propertyValidator("logGroupName",cdk().validateString)(properties.logGroupName)),errors.collect(cdk().propertyValidator("logStreamName",cdk().validateString)(properties.logStreamName)),errors.wrap('supplied properties not correct for "CfnLogStreamProps"')}function convertCfnLogStreamPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnLogStreamPropsValidator(properties).assertSuccess(),{LogGroupName:cdk().stringToCloudFormation(properties.logGroupName),LogStreamName:cdk().stringToCloudFormation(properties.logStreamName)}):properties}function CfnLogStreamPropsFromCloudFormation(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("logGroupName","LogGroupName",properties.LogGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.LogGroupName):void 0),ret.addPropertyResult("logStreamName","LogStreamName",properties.LogStreamName!=null?cfn_parse().FromCloudFormation.getString(properties.LogStreamName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnMetricFilter extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnMetricFilter",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::MetricFilter";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnMetricFilterPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnMetricFilter(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}static isCfnMetricFilter(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnMetricFilter.CFN_RESOURCE_TYPE_NAME}applyOnTransformedLogs;emitSystemFieldDimensions;fieldSelectionCriteria;filterName;filterPattern;logGroupName;metricTransformations;constructor(scope,id,props){super(scope,id,{type:CfnMetricFilter.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnMetricFilterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnMetricFilter),error}cdk().requireProperty(props,"filterPattern",this),cdk().requireProperty(props,"logGroupName",this),cdk().requireProperty(props,"metricTransformations",this),this.applyOnTransformedLogs=props.applyOnTransformedLogs,this.emitSystemFieldDimensions=props.emitSystemFieldDimensions,this.fieldSelectionCriteria=props.fieldSelectionCriteria,this.filterName=props.filterName,this.filterPattern=props.filterPattern,this.logGroupName=props.logGroupName?.logGroupRef?.logGroupName??cdk().ensureStringOrUndefined(props.logGroupName,"logGroupName","logs.ILogGroupRef | string"),this.metricTransformations=props.metricTransformations}get metricFilterRef(){return{logGroupName:cdk().Fn.select(0,cdk().Fn.split("|",this.ref)),filterName:cdk().Fn.select(1,cdk().Fn.split("|",this.ref))}}get cfnProperties(){return{applyOnTransformedLogs:this.applyOnTransformedLogs,emitSystemFieldDimensions:this.emitSystemFieldDimensions,fieldSelectionCriteria:this.fieldSelectionCriteria,filterName:this.filterName,filterPattern:this.filterPattern,logGroupName:this.logGroupName,metricTransformations:this.metricTransformations}}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",CfnMetricFilter.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnMetricFilterPropsToCloudFormation(props)}}exports.CfnMetricFilter=CfnMetricFilter;function CfnMetricFilterDimensionPropertyValidator(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("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 "DimensionProperty"')}function convertCfnMetricFilterDimensionPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnMetricFilterDimensionPropertyValidator(properties).assertSuccess(),{Key:cdk().stringToCloudFormation(properties.key),Value:cdk().stringToCloudFormation(properties.value)}):properties}function CfnMetricFilterDimensionPropertyFromCloudFormation(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("key","Key",properties.Key!=null?cfn_parse().FromCloudFormation.getString(properties.Key):void 0),ret.addPropertyResult("value","Value",properties.Value!=null?cfn_parse().FromCloudFormation.getString(properties.Value):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnMetricFilterMetricTransformationPropertyValidator(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("defaultValue",cdk().validateNumber)(properties.defaultValue)),errors.collect(cdk().propertyValidator("dimensions",cdk().listValidator(CfnMetricFilterDimensionPropertyValidator))(properties.dimensions)),errors.collect(cdk().propertyValidator("metricName",cdk().requiredValidator)(properties.metricName)),errors.collect(cdk().propertyValidator("metricName",cdk().validateString)(properties.metricName)),errors.collect(cdk().propertyValidator("metricNamespace",cdk().requiredValidator)(properties.metricNamespace)),errors.collect(cdk().propertyValidator("metricNamespace",cdk().validateString)(properties.metricNamespace)),errors.collect(cdk().propertyValidator("metricValue",cdk().requiredValidator)(properties.metricValue)),errors.collect(cdk().propertyValidator("metricValue",cdk().validateString)(properties.metricValue)),errors.collect(cdk().propertyValidator("unit",cdk().validateString)(properties.unit)),errors.wrap('supplied properties not correct for "MetricTransformationProperty"')}function convertCfnMetricFilterMetricTransformationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnMetricFilterMetricTransformationPropertyValidator(properties).assertSuccess(),{DefaultValue:cdk().numberToCloudFormation(properties.defaultValue),Dimensions:cdk().listMapper(convertCfnMetricFilterDimensionPropertyToCloudFormation)(properties.dimensions),MetricName:cdk().stringToCloudFormation(properties.metricName),MetricNamespace:cdk().stringToCloudFormation(properties.metricNamespace),MetricValue:cdk().stringToCloudFormation(properties.metricValue),Unit:cdk().stringToCloudFormation(properties.unit)}):properties}function CfnMetricFilterMetricTransformationPropertyFromCloudFormation(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("defaultValue","DefaultValue",properties.DefaultValue!=null?cfn_parse().FromCloudFormation.getNumber(properties.DefaultValue):void 0),ret.addPropertyResult("dimensions","Dimensions",properties.Dimensions!=null?cfn_parse().FromCloudFormation.getArray(CfnMetricFilterDimensionPropertyFromCloudFormation)(properties.Dimensions):void 0),ret.addPropertyResult("metricName","MetricName",properties.MetricName!=null?cfn_parse().FromCloudFormation.getString(properties.MetricName):void 0),ret.addPropertyResult("metricNamespace","MetricNamespace",properties.MetricNamespace!=null?cfn_parse().FromCloudFormation.getString(properties.MetricNamespace):void 0),ret.addPropertyResult("metricValue","MetricValue",properties.MetricValue!=null?cfn_parse().FromCloudFormation.getString(properties.MetricValue):void 0),ret.addPropertyResult("unit","Unit",properties.Unit!=null?cfn_parse().FromCloudFormation.getString(properties.Unit):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnMetricFilterPropsValidator(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("applyOnTransformedLogs",cdk().validateBoolean)(properties.applyOnTransformedLogs)),errors.collect(cdk().propertyValidator("emitSystemFieldDimensions",cdk().listValidator(cdk().validateString))(properties.emitSystemFieldDimensions)),errors.collect(cdk().propertyValidator("fieldSelectionCriteria",cdk().validateString)(properties.fieldSelectionCriteria)),errors.collect(cdk().propertyValidator("filterName",cdk().validateString)(properties.filterName)),errors.collect(cdk().propertyValidator("filterPattern",cdk().requiredValidator)(properties.filterPattern)),errors.collect(cdk().propertyValidator("filterPattern",cdk().validateString)(properties.filterPattern)),errors.collect(cdk().propertyValidator("logGroupName",cdk().requiredValidator)(properties.logGroupName)),errors.collect(cdk().propertyValidator("logGroupName",cdk().validateString)(properties.logGroupName)),errors.collect(cdk().propertyValidator("metricTransformations",cdk().requiredValidator)(properties.metricTransformations)),errors.collect(cdk().propertyValidator("metricTransformations",cdk().listValidator(CfnMetricFilterMetricTransformationPropertyValidator))(properties.metricTransformations)),errors.wrap('supplied properties not correct for "CfnMetricFilterProps"')}function convertCfnMetricFilterPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnMetricFilterPropsValidator(properties).assertSuccess(),{ApplyOnTransformedLogs:cdk().booleanToCloudFormation(properties.applyOnTransformedLogs),EmitSystemFieldDimensions:cdk().listMapper(cdk().stringToCloudFormation)(properties.emitSystemFieldDimensions),FieldSelectionCriteria:cdk().stringToCloudFormation(properties.fieldSelectionCriteria),FilterName:cdk().stringToCloudFormation(properties.filterName),FilterPattern:cdk().stringToCloudFormation(properties.filterPattern),LogGroupName:cdk().stringToCloudFormation(properties.logGroupName),MetricTransformations:cdk().listMapper(convertCfnMetricFilterMetricTransformationPropertyToCloudFormation)(properties.metricTransformations)}):properties}function CfnMetricFilterPropsFromCloudFormation(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("applyOnTransformedLogs","ApplyOnTransformedLogs",properties.ApplyOnTransformedLogs!=null?cfn_parse().FromCloudFormation.getBoolean(properties.ApplyOnTransformedLogs):void 0),ret.addPropertyResult("emitSystemFieldDimensions","EmitSystemFieldDimensions",properties.EmitSystemFieldDimensions!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.EmitSystemFieldDimensions):void 0),ret.addPropertyResult("fieldSelectionCriteria","FieldSelectionCriteria",properties.FieldSelectionCriteria!=null?cfn_parse().FromCloudFormation.getString(properties.FieldSelectionCriteria):void 0),ret.addPropertyResult("filterName","FilterName",properties.FilterName!=null?cfn_parse().FromCloudFormation.getString(properties.FilterName):void 0),ret.addPropertyResult("filterPattern","FilterPattern",properties.FilterPattern!=null?cfn_parse().FromCloudFormation.getString(properties.FilterPattern):void 0),ret.addPropertyResult("logGroupName","LogGroupName",properties.LogGroupName!=null?cfn_parse().FromCloudFormation.getString(properties.LogGroupName):void 0),ret.addPropertyResult("metricTransformations","MetricTransformations",properties.MetricTransformations!=null?cfn_parse().FromCloudFormation.getArray(CfnMetricFilterMetricTransformationPropertyFromCloudFormation)(properties.MetricTransformations):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnQueryDefinition extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnQueryDefinition",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::QueryDefinition";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnQueryDefinitionPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnQueryDefinition(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}static isCfnQueryDefinition(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnQueryDefinition.CFN_RESOURCE_TYPE_NAME}attrQueryDefinitionId;logGroupNames;name;queryLanguage;queryString;constructor(scope,id,props){super(scope,id,{type:CfnQueryDefinition.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnQueryDefinitionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnQueryDefinition),error}cdk().requireProperty(props,"name",this),cdk().requireProperty(props,"queryString",this),this.attrQueryDefinitionId=cdk().Token.asString(this.getAtt("QueryDefinitionId",cdk().ResolutionTypeHint.STRING)),this.logGroupNames=cdk().mapArrayInPlace(props.logGroupNames,item=>item?.logGroupRef?.logGroupName??cdk().ensureStringOrUndefined(item,"logGroupNames","logs.ILogGroupRef | string")),this.name=props.name,this.queryLanguage=props.queryLanguage,this.queryString=props.queryString}get queryDefinitionRef(){return{queryDefinitionId:this.ref}}get cfnProperties(){return{logGroupNames:this.logGroupNames,name:this.name,queryLanguage:this.queryLanguage,queryString:this.queryString}}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",CfnQueryDefinition.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnQueryDefinitionPropsToCloudFormation(props)}}exports.CfnQueryDefinition=CfnQueryDefinition;function CfnQueryDefinitionPropsValidator(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("logGroupNames",cdk().listValidator(cdk().validateString))(properties.logGroupNames)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("queryLanguage",cdk().validateString)(properties.queryLanguage)),errors.collect(cdk().propertyValidator("queryString",cdk().requiredValidator)(properties.queryString)),errors.collect(cdk().propertyValidator("queryString",cdk().validateString)(properties.queryString)),errors.wrap('supplied properties not correct for "CfnQueryDefinitionProps"')}function convertCfnQueryDefinitionPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnQueryDefinitionPropsValidator(properties).assertSuccess(),{LogGroupNames:cdk().listMapper(cdk().stringToCloudFormation)(properties.logGroupNames),Name:cdk().stringToCloudFormation(properties.name),QueryLanguage:cdk().stringToCloudFormation(properties.queryLanguage),QueryString:cdk().stringToCloudFormation(properties.queryString)}):properties}function CfnQueryDefinitionPropsFromCloudFormation(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("logGroupNames","LogGroupNames",properties.LogGroupNames!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.LogGroupNames):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("queryLanguage","QueryLanguage",properties.QueryLanguage!=null?cfn_parse().FromCloudFormation.getString(properties.QueryLanguage):void 0),ret.addPropertyResult("queryString","QueryString",properties.QueryString!=null?cfn_parse().FromCloudFormation.getString(properties.QueryString):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourcePolicy extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnResourcePolicy",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::ResourcePolicy";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(cdk_errors()).ValidationError("Unexpected IResolvable",scope);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}static isCfnResourcePolicy(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME}policyDocument;policyName;constructor(scope,id,props){super(scope,id,{type:CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnResourcePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourcePolicy),error}cdk().requireProperty(props,"policyDocument",this),cdk().requireProperty(props,"policyName",this),this.policyDocument=props.policyDocument,this.policyName=props.policyName}get resourcePolicyRef(){return{policyName:this.ref}}get cfnProperties(){return{policyDocument:this.policyDocument,policyName:this.policyName}}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;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("policyDocument",cdk().requiredValidator)(properties.policyDocument)),errors.collect(cdk().propertyValidator("policyDocument",cdk().validateString)(properties.policyDocument)),errors.collect(cdk().propertyValidator("policyName",cdk().requiredValidator)(properties.policyName)),errors.collect(cdk().propertyValidator("policyName",cdk().validateString)(properties.policyName)),errors.wrap('supplied properties not correct for "CfnResourcePolicyProps"')}function convertCfnResourcePolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnResourcePolicyPropsValidator(properties).assertSuccess(),{PolicyDocument:cdk().stringToCloudFormation(properties.policyDocument),PolicyName:cdk().stringToCloudFormation(properties.policyName)}):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("policyDocument","PolicyDocument",properties.PolicyDocument!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyDocument):void 0),ret.addPropertyResult("policyName","PolicyName",properties.PolicyName!=null?cfn_parse().FromCloudFormation.getString(properties.PolicyName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSubscriptionFilter extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_logs.CfnSubscriptionFilter",version:"2.233.0"};static CFN_RESOURCE_TYPE_NAME="AWS::Logs::SubscriptionFilter";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSubscriptionFilterPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const ret=new CfnSubscriptionFilter(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}static isCfnSubscriptionFilter(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnSubscriptionFilter.CFN_RESOURCE_TYPE_NAME}applyOnTransformedLogs;destinationArn;distribution;emitSystemFields;fieldSelectionCriteria;filterName;filterPattern;logGroupName;roleArn;constructor(scope,id,props){super(scope,id,{type:CfnSubscriptionFilter.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_CfnSubscriptionFilterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSubscriptionFilter),error}cdk().requireProperty(props,"destinationArn",this),cdk().requireProperty(props,"filterPattern",this),cdk().requireProperty(props,"logGroupName",this),this.applyOnTransformedLogs=props.applyOnTransformedLogs,this.destinationArn=props.destinationArn?.functionRef?.functionArn??props.destinationArn?.streamRef?.streamArn??props.destinationArn?.deliveryStreamRef?.deliveryStreamArn??cdk().ensureStringOrUndefined(props.destinationArn,"destinationArn","lambda.IFunctionRef | kinesis.IStreamRef | kinesisfirehose.IDeliveryStreamRef | string"),this.distribution=props.distribution,this.emitSystemFields=props.emitSystemFields,this.fieldSelectionCriteria=props.fieldSelectionCriteria,this.filterName=props.