Table of Contents

Class RateLimitedApiKey

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll

An API Gateway ApiKey, for which a rate limiting configuration can be specified.

public class RateLimitedApiKey : Resource, IApiKey, IResource, IConstruct, IConstruct, IDependable
Inheritance
RateLimitedApiKey
Implements
IResource
IConstruct
IConstruct
IDependable

Examples

RestApi api;


             var key = new RateLimitedApiKey(this, "rate-limited-api-key", new RateLimitedApiKeyProps {
                 CustomerId = "hello-customer",
                 Resources = new [] { api },
                 Quota = new QuotaSettings {
                     Limit = 10000,
                     Period = Period.MONTH
                 }
             });

Remarks

Resource: AWS::ApiGateway::ApiKey

ExampleMetadata: infused

Constructors

RateLimitedApiKey(Construct, string, IRateLimitedApiKeyProps?)

public RateLimitedApiKey(Construct scope, string id, IRateLimitedApiKeyProps? props = null)

Parameters

scope Construct
id string
props IRateLimitedApiKeyProps

Properties

KeyArn

The API key ARN.

public virtual string KeyArn { get; }

Property Value

string

KeyId

The API key ID.

public virtual string KeyId { get; }

Property Value

string

Methods

GrantRead(IGrantable)

Permits the IAM principal all read operations through this key.

public virtual Grant GrantRead(IGrantable grantee)

Parameters

grantee IGrantable

The principal to grant access to.

Returns

Grant

GrantReadWrite(IGrantable)

Permits the IAM principal all read and write operations through this key.

public virtual Grant GrantReadWrite(IGrantable grantee)

Parameters

grantee IGrantable

The principal to grant access to.

Returns

Grant

GrantWrite(IGrantable)

Permits the IAM principal all write operations through this key.

public virtual Grant GrantWrite(IGrantable grantee)

Parameters

grantee IGrantable

The principal to grant access to.

Returns

Grant