ConsumableResourceProps
- class aws_cdk.aws_batch.ConsumableResourceProps(*, total_quantity, consumable_resource_name=None, resource_type=None, tags=None)
Bases:
objectProperties for defining a Batch Consumable Resource.
- Parameters:
total_quantity (
Union[int,float]) – The total quantity of the consumable resource. Must be a non-negative integer.consumable_resource_name (
Optional[str]) – The name of the consumable resource. The name must be unique within the account and Region. Changing it replaces the resource. Default: - CloudFormation-generated nameresource_type (
Optional[ConsumableResourceType]) – 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 aconsumableResourceNamefails the deployment unless the name is changed as well. Default: ConsumableResourceType.REPLENISHABLEtags (
Optional[Mapping[str,str]]) – Tags to apply to the consumable resource. Default: - no tags
- ExampleMetadata:
infused
Example:
license_resource = batch.ConsumableResource(self, "LicenseResource", total_quantity=100 ) user = iam.User(self, "MyUser") # Describe the resource and list the jobs that use it license_resource.grants.read(user) # Change the total quantity, e.g. to replenish a NON_REPLENISHABLE pool license_resource.grants.update(user)
Attributes
- consumable_resource_name
The name of the consumable resource.
The name must be unique within the account and Region. Changing it replaces the resource.
- Default:
CloudFormation-generated name
- resource_type
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
consumableResourceNamefails the deployment unless the name is changed as well.- Default:
ConsumableResourceType.REPLENISHABLE
- tags
Tags to apply to the consumable resource.
- Default:
no tags
- total_quantity
The total quantity of the consumable resource.
Must be a non-negative integer.