What is the problem?
Unlike the module aws_apigateway where I would just do
const api = new apigateway.RestApi(this, 'hello-api');
const plan = api.addUsagePlan('UsagePlan', {
name: 'Easy',
throttle: {
rateLimit: 10,
burstLimit: 2
}
});
there doesnt seem to be an equivalent way of doing this in aws-apigatewayv2-alpha.
Reproduction Steps
I created an HTTP Api
export class APIConstruct extends Construct {
public api: HttpApi;
constructor(scope: Construct, id: idType, authorizer: HttpUserPoolAuthorizer) {
super(scope, id);
const throtting = new UsagePlan(this, "Throttling", {
throttle: { burstLimit: 999, rateLimit: 99 },
});
this.api = new HttpApi(this, id, {
apiName: id,
defaultAuthorizer: authorizer,
});
}
}
and tried to just add throttling in the same scope, hoping that it would automatically apply to the only api gateway specified
const throtting = new UsagePlan(this, "TypiRateLimiting", { throttle: { burstLimit: 999, rateLimit: 99 } });
What did you expect to happen?
Have a method .addUsagePlan on the Http Api class or having a field in props that allows me to link the UsagePlan to the Api.
What actually happened?
Throttling was not configured for Api
CDK CLI Version
2.17.0
Framework Version
No response
Node.js Version
16.12
OS
Windows
Language
Typescript
Language Version
No response
Other information
No response
What is the problem?
Unlike the module
aws_apigatewaywhere I would just dothere doesnt seem to be an equivalent way of doing this in
aws-apigatewayv2-alpha.Reproduction Steps
I created an HTTP Api
and tried to just add throttling in the same scope, hoping that it would automatically apply to the only api gateway specified
What did you expect to happen?
Have a method
.addUsagePlanon the Http Api class or having a field inpropsthat allows me to link theUsagePlanto the Api.What actually happened?
Throttling was not configured for Api
CDK CLI Version
2.17.0
Framework Version
No response
Node.js Version
16.12
OS
Windows
Language
Typescript
Language Version
No response
Other information
No response