@gradientedge/cdk-utils 9.70.0 → 9.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -337,8 +337,8 @@ class AzureApiManagementManager {
337
337
  }
338
338
  // Inject rate limiting policy (if configured)
339
339
  let rateLimitPolicy = '';
340
- if (props.rateLimit) {
341
- rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}"/>`;
340
+ if (props.rateLimit && scope.props.subscriptionId) {
341
+ rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}" counter-key="${scope.props.subscriptionId}-${apimOperation.operationId}"/>`;
342
342
  }
343
343
  const policyXmlContent = `<policies>
344
344
  <inbound>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "9.70.0",
3
+ "version": "9.72.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -402,8 +402,8 @@ export class AzureApiManagementManager {
402
402
 
403
403
  // Inject rate limiting policy (if configured)
404
404
  let rateLimitPolicy = ''
405
- if (props.rateLimit) {
406
- rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}"/>`
405
+ if (props.rateLimit && scope.props.subscriptionId) {
406
+ rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}" counter-key="${scope.props.subscriptionId}-${apimOperation.operationId}"/>`
407
407
  }
408
408
  const policyXmlContent = `<policies>
409
409
  <inbound>