Class RateLimitedApiKey

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigatewayv2.RateLimitedApiKey
All Implemented Interfaces:
IResource, IApiKey, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-08-20T12:34:37.209Z") @Stability(Stable) public class RateLimitedApiKey extends Resource implements IApiKey
An API Gateway ApiKey, for which a rate limiting configuration can be specified.

Example:

 WebSocketApi api;
 WebSocketStage stage;
 RateLimitedApiKey key = RateLimitedApiKey.Builder.create(this, "rate-limited-api-key")
         .customerId("test-customer")
         .apiStages(List.of(UsagePlanPerApiStage.builder()
                 .api(api)
                 .stage(stage)
                 .build()))
         .quota(QuotaSettings.builder()
                 .limit(10000)
                 .period(Period.MONTH)
                 .build())
         .throttle(ThrottleSettings.builder()
                 .rateLimit(100)
                 .burstLimit(200)
                 .build())
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String PROPERTY_INJECTION_ID
      Uniquely identifies this class.
  • Constructor Details

    • RateLimitedApiKey

      protected RateLimitedApiKey(software.amazon.jsii.JsiiObjectRef objRef)
    • RateLimitedApiKey

      protected RateLimitedApiKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • RateLimitedApiKey

      @Stability(Stable) public RateLimitedApiKey(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable RateLimitedApiKeyProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • RateLimitedApiKey

      @Stability(Stable) public RateLimitedApiKey(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • grantRead

      @Stability(Stable) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
      Permits the IAM principal all read operations through this key.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • grantReadWrite

      @Stability(Stable) @NotNull public Grant grantReadWrite(@NotNull IGrantable grantee)
      Permits the IAM principal all read and write operations through this key.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • grantWrite

      @Stability(Stable) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
      Permits the IAM principal all write operations through this key.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • getKeyArn

      @Stability(Stable) @NotNull public String getKeyArn()
      The API key ARN.
      Specified by:
      getKeyArn in interface IApiKey
    • getKeyId

      @Stability(Stable) @NotNull public String getKeyId()
      The API key ID.
      Specified by:
      getKeyId in interface IApiKey