"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PermissionsBoundary=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam_generated_1=()=>{var tmp=require("./iam.generated");return iam_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class PermissionsBoundary{static of(scope){return new PermissionsBoundary(scope)}constructor(scope){this.scope=scope}apply(boundaryPolicy){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IManagedPolicy(boundaryPolicy)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.apply),error}core_1().Aspects.of(this.scope).add({visit(node){core_1().CfnResource.isCfnResource(node)&&(node.cfnResourceType==iam_generated_1().CfnRole.CFN_RESOURCE_TYPE_NAME||node.cfnResourceType==iam_generated_1().CfnUser.CFN_RESOURCE_TYPE_NAME)&&node.addPropertyOverride("PermissionsBoundary",boundaryPolicy.managedPolicyArn)}})}clear(){core_1().Aspects.of(this.scope).add({visit(node){core_1().CfnResource.isCfnResource(node)&&(node.cfnResourceType==iam_generated_1().CfnRole.CFN_RESOURCE_TYPE_NAME||node.cfnResourceType==iam_generated_1().CfnUser.CFN_RESOURCE_TYPE_NAME)&&node.addPropertyDeletionOverride("PermissionsBoundary")}})}}exports.PermissionsBoundary=PermissionsBoundary,_a=JSII_RTTI_SYMBOL_1,PermissionsBoundary[_a]={fqn:"aws-cdk-lib.aws_iam.PermissionsBoundary",version:"2.159.0"};
