Skip to main content

This construct allows you to IaC your service quotas

Project description

@reapit-cdk/service-quotas

npm version npm downloads coverage: 0%25 Integ Tests: X

This construct allows you to IaC your service quotas

Package Installation:

yarn add --dev @reapit-cdk/service-quotas
# or
npm install @reapit-cdk/service-quotas --save-dev

Usage

import { Stack, App } from 'aws-cdk-lib'
import { AWSService, AmazonCloudFrontQuota, ServiceQuotas } from '@reapit-cdk/service-quotas'

const app = new App()
const stack = new Stack(app, 'stack-name')
const quotas = new ServiceQuotas(stack, 'service-quotas', {
  // Fail the stack if your requests aren't granted yet
  failIfNotGranted: true,
  // Make another request if an existing one is denied
  rerequestWhenDenied: true,
})

quotas.requestQuota(
  // region
  'us-east-1',
  // service (use the AWSService.${Service} helper or specify the e.g. 'cloudfront' string as any)
  AWSService.AMAZON_CLOUD_FRONT,
  // quota (use the ${Service}Quota e.g. AmazonCloudFrontQuota helper or specify the 'LL-' string as any)
  AmazonCloudFrontQuota.CACHE_BEHAVIORS_PER_DISTRIBUTION,
  // desired value
  100,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reapit-cdk.service-quotas-0.1.2.tar.gz (718.5 kB view hashes)

Uploaded Source

Built Distribution

reapit_cdk.service_quotas-0.1.2-py3-none-any.whl (717.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page