All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IEnvironmentAware, IGrantable, IPolicyRef, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IPolicy.Jsii$Default
All Known Implementing Classes:
IPolicy.Jsii$Proxy, Policy, PolicyBase

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-10T17:51:40.286Z") @Stability(Stable) public interface IPolicy extends software.amazon.jsii.JsiiSerializable, IResource, IPolicyRef, IGrantable
Minimal reference interface for Policy resources.

Used for resource identification and ARN construction.

  • Method Details

    • getPolicyArn

      @Stability(Stable) @NotNull String getPolicyArn()
      The ARN of the policy resource.
    • getPolicyEngine

      @Stability(Stable) @NotNull IPolicyEngine getPolicyEngine()
      The policy engine this policy belongs to.
    • getPolicyId

      @Stability(Stable) @NotNull String getPolicyId()
      The ID of the policy.
    • getPolicyName

      @Stability(Stable) @NotNull String getPolicyName()
      The name of the policy.
    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      The description of the policy.
    • getValidationMode

      @Stability(Stable) @Nullable default PolicyValidationMode getValidationMode()
      The validation mode for the policy.
    • grant

      @Stability(Stable) @NotNull Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
      Grants IAM actions to the IAM Principal.

      Parameters:
      grantee -
      • The IAM principal to grant permissions to.
      This parameter is required.
      actions -
      • The actions to grant.
      This parameter is required.
    • grantRead

      @Stability(Stable) @NotNull Grant grantRead(@NotNull IGrantable grantee)
      Grants read permissions on the Policy (data plane).

      This grants runtime read access to policy configuration. Use this for monitoring, audit, or read-only administrative roles that need to inspect policy definitions.

      Parameters:
      grantee -
      • The IAM principal to grant read permissions to.
      This parameter is required.
    • metric

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Return the given named metric for this policy.

      Parameters:
      metricName - The name of the metric. This parameter is required.
      props - Optional metric configuration.
    • metric

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName)
      Return the given named metric for this policy.

      Parameters:
      metricName - The name of the metric. This parameter is required.
    • metricEvaluationLatency

      @Stability(Stable) @NotNull Metric metricEvaluationLatency(@Nullable MetricOptions props)
      Return a metric measuring the evaluation latency for this policy.

      This metric represents the time taken to evaluate this specific policy.

      Parameters:
      props - Optional metric configuration.
    • metricEvaluationLatency

      @Stability(Stable) @NotNull Metric metricEvaluationLatency()
      Return a metric measuring the evaluation latency for this policy.

      This metric represents the time taken to evaluate this specific policy.

    • metricEvaluations

      @Stability(Stable) @NotNull Metric metricEvaluations(@Nullable MetricOptions props)
      Return a metric containing the total number of evaluations for this policy.

      This metric tracks how many times this policy has been evaluated.

      Parameters:
      props - Optional metric configuration.
    • metricEvaluations

      @Stability(Stable) @NotNull Metric metricEvaluations()
      Return a metric containing the total number of evaluations for this policy.

      This metric tracks how many times this policy has been evaluated.