# ConsumableResourceProps

Properties for defining a Batch Consumable Resource.

Extends: ConsumableResourceProps
Used as props by: ConsumableResource

- Source: [`aws-batch/lib/consumable-resource.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-batch/lib/consumable-resource.ts#L54)
- Type last changed: v2.273.0 · 8 Oct 2026

## Example

```ts
const licenseResource = new batch.ConsumableResource(this, 'LicenseResource', {
  totalQuantity: 100,
});

const user = new iam.User(this, 'MyUser');

// Describe the resource and list the jobs that use it
licenseResource.grants.read(user);

// Change the total quantity, e.g. to replenish a NON_REPLENISHABLE pool
licenseResource.grants.update(user);
```

## Properties

- `consumableResourceName`: string — The name of the consumable resource.

  **Default:** CloudFormation-generated name

  The name must be unique within the account and Region. Changing it replaces
  the resource.

- `resourceType`: [ConsumableResourceType](/cdk/api/v2/docs/aws-cdk-lib.aws_batch.ConsumableResourceType.html) — The type of consumable resource.

  **Default:** ConsumableResourceType.REPLENISHABLE

  Changing this property replaces the resource. Because the name must be unique
  within the account and Region, changing the type of a resource that has a
  `consumableResourceName` fails the deployment unless the name is changed as well.

- `tags`: { [key: string]: string } — Tags to apply to the consumable resource.

  **Default:** no tags

- `totalQuantity`: number (required) — The total quantity of the consumable resource.

  Must be a non-negative integer.
