Skip to content
v2.274.0

ConsumableResourceProps Struct ​

Properties for defining a Batch Consumable Resource.

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 ​

consumableResourceNameoptionalstringconsumable_resource_nameoptionalstrconsumableResourceNameoptionalStringConsumableResourceNameoptionalstringConsumableResourceNameoptional*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.

resourceTypeoptionalConsumableResourceTyperesource_typeoptionalConsumableResourceTyperesourceTypeoptionalConsumableResourceTypeResourceTypeoptionalConsumableResourceTypeResourceTypeoptionalConsumableResourceType#
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.

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
Tags to apply to the consumable resource.

Default: no tags

totalQuantitynumbertotal_quantityint | floattotalQuantityNumberTotalQuantitydoubleTotalQuantity*float64required#
The total quantity of the consumable resource.

Must be a non-negative integer.