"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResourcePolicy=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var logs_generated_1=()=>{var tmp=require("./logs.generated");return logs_generated_1=()=>tmp,tmp},aws_iam_1=()=>{var tmp=require("../../aws-iam");return aws_iam_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class ResourcePolicy extends core_1().Resource{constructor(scope,id,props){super(scope,id,{physicalName:props?.resourcePolicyName}),this.document=new(aws_iam_1()).PolicyDocument;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_logs_ResourcePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ResourcePolicy),error}const l1=new(logs_generated_1()).CfnResourcePolicy(this,"ResourcePolicy",{policyName:core_1().Lazy.string({produce:()=>props?.resourcePolicyName??core_1().Names.uniqueId(this)}),policyDocument:core_1().Lazy.string({produce:()=>JSON.stringify(this.document)})});this.node.defaultChild=l1,props?.policyStatements&&this.document.addStatements(...props.policyStatements)}}exports.ResourcePolicy=ResourcePolicy,_a=JSII_RTTI_SYMBOL_1,ResourcePolicy[_a]={fqn:"aws-cdk-lib.aws_logs.ResourcePolicy",version:"2.148.1"};
