Interface IResourceWithPolicy

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IEnvironmentAware, IResource, IResourceWithPolicyV2, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IFileSystem, IFileSystem.Jsii$Default, ILogGroup, ILogGroup.Jsii$Default, IResourceWithPolicy.Jsii$Default
All Known Implementing Classes:
EventBus, FileSystem, IFileSystem.Jsii$Proxy, ILogGroup.Jsii$Proxy, IResourceWithPolicy.Jsii$Proxy, LambdaRestApi, LogGroup, RestApi, RestApiBase, SpecRestApi, StepFunctionsRestApi, Table, TableBase, TableBaseV2, TableV2

@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)", date="2025-11-04T09:27:42.948Z") @Stability(Deprecated) @Deprecated public interface IResourceWithPolicy extends software.amazon.jsii.JsiiSerializable, IResourceWithPolicyV2, IResource
Deprecated.
Implement IResourceWithPolicyV2 instead.
(deprecated) A resource with a resource policy that can be added to.

This interface is maintained for backwards compatibility, but should not be used in new code. Prefer IResourceWithPolicyV2 instead.

  • Method Details

    • getEnv

      @Stability(Stable) @NotNull ResourceEnvironment getEnv()
      Deprecated.
      The environment this resource belongs to.

      For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

      For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

      Specified by:
      getEnv in interface IEnvironmentAware