UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 203 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnTransformer=exports.CfnScheduledQuery=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.251.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(cfn_parse().lit`UnexpectedIResolvable`,"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}_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._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 policyDocument(){return this._policyDocument}set policyDocument(value){cdk().traceProperty(this.node,"PolicyDocument"),this._policyDocument=value}get policyName(){return this._policyName}set policyName(value){cdk().traceProperty(this.node,"PolicyName"),this._policyName=value}get policyType(){return this._policyType}set policyType(value){cdk().traceProperty(this.node,"PolicyType"),this._policyType=value}get scope(){return this._scope}set scope(value){cdk().traceProperty(this.node,"Scope"),this._scope=value}get selectionCriteria(){return this._selectionCriteria}set selectionCriteria(value){cdk().traceProperty(this.node,"SelectionCriteria"),this._selectionCriteria=value}get attrAccountId(){return cdk().Token.asString(this.getAtt("AccountId",cdk().ResolutionTypeHint.STRING))}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`UnexpectedIResolvable`,"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}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.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::Logs::Destination",void 0,{tagPropertyName:"tags"}),this._destinationName=props.destinationName,this._destinationPolicy=props.destinationPolicy,this._roleArn=cdk().getRefProperty(props.roleArn?.roleRef,"roleArn")??cdk().ensureStringOrUndefined(props.roleArn,"roleArn","iam.IRoleRef | string"),this._tags=props.tags,this._targetArn=cdk().getRefProperty(props.targetArn?.deliveryStreamRef,"deliveryStreamArn")??cdk().getRefProperty(props.targetArn?.streamRef,"streamArn")??cdk().getRefProperty(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 destinationName(){return this._destinationName}set destinationName(value){cdk().traceProperty(this.node,"DestinationName"),this._destinationName=value}get destinationPolicy(){return this._destinationPolicy}set destinationPolicy(value){cdk().traceProperty(this.node,"DestinationPolicy"),this._destinationPolicy=value}get roleArn(){return this._roleArn}set roleArn(value){cdk().traceProperty(this.node,"RoleArn"),this._roleArn=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get targetArn(){return this._targetArn}set targetArn(value){cdk().traceProperty(this.node,"TargetArn"),this._targetArn=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`UnexpectedIResolvable`,"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}_bearerTokenAuthenticationEnabled;_dataProtectionPolicy;_deletionProtectionEnabled;_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._bearerTokenAuthenticationEnabled=props.bearerTokenAuthenticationEnabled,this._dataProtectionPolicy=props.dataProtectionPolicy,this._deletionProtectionEnabled=props.deletionProtectionEnabled,this._fieldIndexPolicies=props.fieldIndexPolicies,this._kmsKeyId=cdk().getRefProperty(props.kmsKeyId?.keyRef,"keyArn")??cdk().ensureStringOrUndefined(props.kmsKeyId,"kmsKeyId","kms.IKeyRef | string"),this._logGroupClass=props.logGroupClass,this._logGroupName=cdk().getRefProperty(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 bearerTokenAuthenticationEnabled(){return this._bearerTokenAuthenticationEnabled}set bearerTokenAuthenticationEnabled(value){cdk().traceProperty(this.node,"BearerTokenAuthenticationEnabled"),this._bearerTokenAuthenticationEnabled=value}get dataProtectionPolicy(){return this._dataProtectionPolicy}set dataProtectionPolicy(value){cdk().traceProperty(this.node,"DataProtectionPolicy"),this._dataProtectionPolicy=value}get deletionProtectionEnabled(){return this._deletionProtectionEnabled}set deletionProtectionEnabled(value){cdk().traceProperty(this.node,"DeletionProtectionEnabled"),this._deletionProtectionEnabled=value}get fieldIndexPolicies(){return this._fieldIndexPolicies}set fieldIndexPolicies(value){cdk().traceProperty(this.node,"FieldIndexPolicies"),this._fieldIndexPolicies=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KmsKeyId"),this._kmsKeyId=value}get logGroupClass(){return this._logGroupClass}set logGroupClass(value){cdk().traceProperty(this.node,"LogGroupClass"),this._logGroupClass=value}get logGroupName(){return this._logGroupName}set logGroupName(value){cdk().traceProperty(this.node,"LogGroupName"),this._logGroupName=value}get resourcePolicyDocument(){return this._resourcePolicyDocument}set resourcePolicyDocument(value){cdk().traceProperty(this.node,"ResourcePolicyDocument"),this._resourcePolicyDocument=value}get retentionInDays(){return this._retentionInDays}set retentionInDays(value){cdk().traceProperty(this.node,"RetentionInDays"),this._retentionInDays=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{bearerTokenAuthenticationEnabled:this._bearerTokenAuthenticationEnabled,dataProtectionPolicy:this._dataProtectionPolicy,deletionProtectionEnabled:this._deletionProtectionEnabled,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:logicalId",this._synthesizeLogicalId()),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("bearerTokenAuthenticationEnabled",cdk().validateBoolean)(properties.bearerTokenAuthenticationEnabled)),errors.collect(cdk().propertyValidator("dataProtectionPolicy",cdk().validateObject)(properties.dataProtectionPolicy)),errors.collect(cdk().propertyValidator("deletionProtectionEnabled",cdk().validateBoolean)(properties.deletionProtectionEnabled)),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(),{BearerTokenAuthenticationEnabled:cdk().booleanToCloudFormation(properties.bearerTokenAuthenticationEnabled),DataProtectionPolicy:cdk().objectToCloudFormation(properties.dataProtectionPolicy),DeletionProtectionEnabled:cdk().booleanToCloudFormation(properties.deletionProtectionEnabled),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("bearerTokenAuthenticationEnabled","BearerTokenAuthenticationEnabled",properties.BearerTokenAuthenticationEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.BearerTokenAuthenticationEnabled):void 0),ret.addPropertyResult("dataProtectionPolicy","DataProtectionPolicy",properties.DataProtectionPolicy!=null?cfn_parse().FromCloudFormation.getAny(properties.DataProtectionPolicy):void 0),ret.addPropertyResult("deletionProtectionEnabled","DeletionProtectionEnabled",properties.DeletionProtectionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.DeletionProtectionEnabled):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.251.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(cfn_parse().lit`UnexpectedIResolvable`,"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=cdk().getRefProperty(props.logGroupName?.logGroupRef,"logGroupName")??cdk().ensureStringOrUndefined(props.logGroupName,"logGroupName","logs.ILogGroupRef | string"),this._logStreamName=props.logStreamName}get logStreamRef(){return{logGroupName:this.logGroupName,logStreamName:this.ref}}get logGroupName(){return this._logGroupName}set logGroupName(value){cdk().traceProperty(this.node,"LogGroupName"),this._logGroupName=value}get logStreamName(){return this._logStreamName}set logStreamName(value){cdk().traceProperty(this.node,"LogStreamName"),this._logStreamName=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`UnexpectedIResolvable`,"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=cdk().getRefProperty(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 applyOnTransformedLogs(){return this._applyOnTransformedLogs}set applyOnTransformedLogs(value){cdk().traceProperty(this.node,"ApplyOnTransformedLogs"),this._applyOnTransformedLogs=value}get emitSystemFieldDimensions(){return this._emitSystemFieldDimensions}set emitSystemFieldDimensions(value){cdk().traceProperty(this.node,"EmitSystemFieldDimensions"),this._emitSystemFieldDimensions=value}get fieldSelectionCriteria(){return this._fieldSelectionCriteria}set fieldSelectionCriteria(value){cdk().traceProperty(this.node,"FieldSelectionCriteria"),this._fieldSelectionCriteria=value}get filterName(){return this._filterName}set filterName(value){cdk().traceProperty(this.node,"FilterName"),this._filterName=value}get filterPattern(){return this._filterPattern}set filterPattern(value){cdk().traceProperty(this.node,"FilterPattern"),this._filterPattern=value}get logGroupName(){return this._logGroupName}set logGroupName(value){cdk().traceProperty(this.node,"LogGroupName"),this._logGroupName=value}get metricTransformations(){return this._metricTransformations}set metricTransformations(value){cdk().traceProperty(this.node,"MetricTransformations"),this._metricTransformations=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`UnexpectedIResolvable`,"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}_logGroupNames;_name;_parameters;_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._logGroupNames=cdk().mapArrayInPlace(props.logGroupNames,item=>cdk().getRefProperty(item?.logGroupRef,"logGroupName")??cdk().ensureStringOrUndefined(item,"logGroupNames","logs.ILogGroupRef | string")),this._name=props.name,this._parameters=props.parameters,this._queryLanguage=props.queryLanguage,this._queryString=props.queryString}get queryDefinitionRef(){return{queryDefinitionId:this.ref}}get logGroupNames(){return this._logGroupNames}set logGroupNames(value){cdk().traceProperty(this.node,"LogGroupNames"),this._logGroupNames=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get parameters(){return this._parameters}set parameters(value){cdk().traceProperty(this.node,"Parameters"),this._parameters=value}get queryLanguage(){return this._queryLanguage}set queryLanguage(value){cdk().traceProperty(this.node,"QueryLanguage"),this._queryLanguage=value}get queryString(){return this._queryString}set queryString(value){cdk().traceProperty(this.node,"QueryString"),this._queryString=value}get attrQueryDefinitionId(){return cdk().Token.asString(this.getAtt("QueryDefinitionId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{logGroupNames:this._logGroupNames,name:this._name,parameters:this._parameters,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:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnQueryDefinitionPropsToCloudFormation(props)}}exports.CfnQueryDefinition=CfnQueryDefinition;function CfnQueryDefinitionQueryParameterPropertyValidator(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().validateString)(properties.defaultValue)),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.wrap('supplied properties not correct for "QueryParameterProperty"')}function convertCfnQueryDefinitionQueryParameterPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnQueryDefinitionQueryParameterPropertyValidator(properties).assertSuccess(),{DefaultValue:cdk().stringToCloudFormation(properties.defaultValue),Description:cdk().stringToCloudFormation(properties.description),Name:cdk().stringToCloudFormation(properties.name)}):properties}function CfnQueryDefinitionQueryParameterPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(proper