"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResourcePolicy=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),aws_iam_1=require("../../aws-iam"),core_1=require("../../core"),logs_generated_1=require("./logs.generated");class ResourcePolicy extends core_1.Resource{constructor(scope,id,props){super(scope,id,{physicalName:props==null?void 0: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,this.constructor),error}new logs_generated_1.CfnResourcePolicy(this,"ResourcePolicy",{policyName:core_1.Lazy.string({produce:()=>{var _b;return(_b=props==null?void 0:props.resourcePolicyName)!==null&&_b!==void 0?_b:core_1.Names.uniqueId(this)}}),policyDocument:core_1.Lazy.string({produce:()=>JSON.stringify(this.document)})}),props!=null&&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.24.1"};
//# sourceMappingURL=policy.js.map
