Class RateLimitedApiKey
An API Gateway ApiKey, for which a rate limiting configuration can be specified.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RateLimitedApiKey : Resource, IApiKey, IResource, IApiKeyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class RateLimitedApiKey Inherits Resource Implements IApiKey, IResource, IApiKeyRef, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
Examples
RestApi api;
var key = new RateLimitedApiKey(this, "rate-limited-api-key", new RateLimitedApiKeyProps {
CustomerId = "hello-customer",
ApiStages = new [] { new UsagePlanPerApiStage { Stage = api.DeploymentStage } },
Quota = new QuotaSettings {
Limit = 10000,
Period = Period.MONTH
}
});
Synopsis
Constructors
| RateLimitedApiKey(Construct, string, IRateLimitedApiKeyProps?) | An API Gateway ApiKey, for which a rate limiting configuration can be specified. |
Properties
| ApiKeyRef | A reference to a ApiKey resource. |
| KeyArn | The API key ARN. |
| KeyId | The API key ID. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| GrantRead(IGrantable) | Permits the IAM principal all read operations through this key. |
| GrantReadWrite(IGrantable) | Permits the IAM principal all read and write operations through this key. |
| GrantWrite(IGrantable) | Permits the IAM principal all write operations through this key. |
Constructors
RateLimitedApiKey(Construct, string, IRateLimitedApiKeyProps?)
An API Gateway ApiKey, for which a rate limiting configuration can be specified.
public RateLimitedApiKey(Construct scope, string id, IRateLimitedApiKeyProps? props = null)
Parameters
- scope Construct
- id string
- props IRateLimitedApiKeyProps
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
Examples
RestApi api;
var key = new RateLimitedApiKey(this, "rate-limited-api-key", new RateLimitedApiKeyProps {
CustomerId = "hello-customer",
ApiStages = new [] { new UsagePlanPerApiStage { Stage = api.DeploymentStage } },
Quota = new QuotaSettings {
Limit = 10000,
Period = Period.MONTH
}
});
Properties
ApiKeyRef
A reference to a ApiKey resource.
public virtual IApiKeyReference ApiKeyRef { get; }
Property Value
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
KeyArn
The API key ARN.
public virtual string KeyArn { get; }
Property Value
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
KeyId
The API key ID.
public virtual string KeyId { get; }
Property Value
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
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
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
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
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused
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
Remarks
Resource: AWS::ApiGateway::ApiKey
ExampleMetadata: infused