interface ConsumableResourceProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Batch.ConsumableResourceProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbatch#ConsumableResourceProps |
Java | software.amazon.awscdk.services.batch.ConsumableResourceProps |
Python | aws_cdk.aws_batch.ConsumableResourceProps |
TypeScript (source) | aws-cdk-lib » aws_batch » ConsumableResourceProps |
Properties for defining a Batch Consumable Resource.
Example
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
| Name | Type | Description |
|---|---|---|
| total | number | The total quantity of the consumable resource. |
| consumable | string | The name of the consumable resource. |
| resource | Consumable | The type of consumable resource. |
| tags? | { [string]: string } | Tags to apply to the consumable resource. |
totalQuantity
Type:
number
The total quantity of the consumable resource.
Must be a non-negative integer.
consumableResourceName?
Type:
string
(optional, default: CloudFormation-generated name)
The name of the consumable resource.
The name must be unique within the account and Region. Changing it replaces the resource.
resourceType?
Type:
Consumable
(optional, default: ConsumableResourceType.REPLENISHABLE)
The type of consumable resource.
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?
Type:
{ [string]: string }
(optional, default: no tags)
Tags to apply to the consumable resource.

.NET
Go
Java
Python
TypeScript (