Interface IUsagePlan

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IEnvironmentAware, IResource, IUsagePlanRef, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IUsagePlan.Jsii$Default
All Known Implementing Classes:
IUsagePlan.Jsii$Proxy, UsagePlan

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-13T16:09:57.842Z") @Stability(Stable) public interface IUsagePlan extends software.amazon.jsii.JsiiSerializable, IResource, IUsagePlanRef
A UsagePlan, either managed by this CDK app, or imported.
  • Method Details

    • getUsagePlanId

      @Stability(Stable) @NotNull String getUsagePlanId()
      Id of the usage plan.
    • addApiKey

      @Stability(Stable) void addApiKey(@NotNull IApiKeyRef apiKey, @Nullable AddApiKeyOptions options)
      Adds an ApiKey.

      Parameters:
      apiKey - the api key to associate with this usage plan. This parameter is required.
      options - options that control the behaviour of this method.
    • addApiKey

      @Stability(Stable) void addApiKey(@NotNull IApiKeyRef apiKey)
      Adds an ApiKey.

      Parameters:
      apiKey - the api key to associate with this usage plan. This parameter is required.
    • getNode

      @Stability(Stable) @NotNull software.constructs.Node getNode()
      The tree node.
      Specified by:
      getNode in interface software.constructs.IConstruct
    • getEnv

      @Stability(Stable) @NotNull ResourceEnvironment getEnv()
      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