Skip to content
v2.275.0

ConsumableResourceType Enum ​

The type of consumable resource.

Example ​

ts
// Create a replenishable consumable resource (e.g., software licenses)
const licenseResource = new batch.ConsumableResource(this, 'LicenseResource', {
  consumableResourceName: 'my-software-license',
  resourceType: batch.ConsumableResourceType.REPLENISHABLE,
  totalQuantity: 100,
});

// Create a non-replenishable consumable resource (e.g., API rate limits)
const apiRateLimitResource = new batch.ConsumableResource(this, 'ApiRateLimitResource', {
  consumableResourceName: 'api-rate-limit',
  resourceType: batch.ConsumableResourceType.NON_REPLENISHABLE,
  totalQuantity: 1000,
});

Members ​

MemberDescription
REPLENISHABLEResource can be re-used after a job completes.
NON_REPLENISHABLEResource cannot be re-used after a job completes.

Referenced by ​