Class RateLimitedApiKey

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:11.918Z") @Stability(Stable) public class RateLimitedApiKey extends Resource implements IApiKey
An API Gateway ApiKey, for which a rate limiting configuration can be specified.

Example:

 RestApi api;
 RateLimitedApiKey key = RateLimitedApiKey.Builder.create(this, "rate-limited-api-key")
         .customerId("hello-customer")
         .stages(List.of(api.getDeploymentStage()))
         .quota(QuotaSettings.builder()
                 .limit(10000)
                 .period(Period.MONTH)
                 .build())
         .build();
 
  • 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