"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubscriptionFilter=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),logs_generated_1=require("./logs.generated"),core_1=require("../../core");class SubscriptionFilter extends core_1.Resource{constructor(scope,id,props){super(scope,id,{physicalName:props.filterName});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_logs_SubscriptionFilterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SubscriptionFilter),error}const destProps=props.destination.bind(this,props.logGroup);new logs_generated_1.CfnSubscriptionFilter(this,"Resource",{logGroupName:props.logGroup.logGroupName,destinationArn:destProps.arn,roleArn:destProps.role&&destProps.role.roleArn,filterPattern:props.filterPattern.logPatternString,filterName:this.physicalName})}}exports.SubscriptionFilter=SubscriptionFilter,_a=JSII_RTTI_SYMBOL_1,SubscriptionFilter[_a]={fqn:"aws-cdk-lib.aws_logs.SubscriptionFilter",version:"2.96.1"};
