Skip to main content

consumable_resources

Creates, updates, deletes, gets or lists a consumable_resources resource.

Overview

Nameconsumable_resources
TypeResource
Idaws.batch.consumable_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
available_quantityinteger (int64)The amount of the consumable resource that is currently available to use.
consumable_resource_arnstringThe Amazon Resource Name (ARN) of the consumable resource.
consumable_resource_namestringThe name of the consumable resource.
created_atinteger (int64)The Unix timestamp (in milliseconds) for when the consumable resource was created.
in_use_quantityinteger (int64)The amount of the consumable resource that is currently in use.
resource_typestringIndicates whether the resource is available to be re-used after a job completes. Can be one of: REPLENISHABLE NON_REPLENISHABLE
tagsobjectThe tags that you apply to the consumable resource to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources.
total_quantityinteger (int64)The total amount of the consumable resource that is available.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_consumable_resourceselectregionReturns a description of the specified consumable resource.
list_consumable_resourcesselectregionReturns a list of Batch consumable resources.
create_consumable_resourceinsertregion, consumableResourceNameCreates an Batch consumable resource.
update_consumable_resourceupdateregion, consumableResourceUpdates a consumable resource.
delete_consumable_resourcedeleteregionDeletes the specified consumable resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a description of the specified consumable resource.

SELECT
available_quantity,
consumable_resource_arn,
consumable_resource_name,
created_at,
in_use_quantity,
resource_type,
tags,
total_quantity
FROM aws.batch.consumable_resources
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an Batch consumable resource.

INSERT INTO aws.batch.consumable_resources (
consumableResourceName,
totalQuantity,
resourceType,
tags,
region
)
SELECT
'{{ consumableResourceName }}' /* required */,
{{ totalQuantity }},
'{{ resourceType }}',
'{{ tags }}',
'{{ region }}'
RETURNING
consumable_resource_arn,
consumable_resource_name
;

UPDATE examples

Updates a consumable resource.

UPDATE aws.batch.consumable_resources
SET
consumableResource = '{{ consumableResource }}',
operation = '{{ operation }}',
quantity = {{ quantity }},
clientToken = '{{ clientToken }}'
WHERE
region = '{{ region }}' --required
AND consumableResource = '{{ consumableResource }}' --required
RETURNING
consumable_resource_arn,
consumable_resource_name,
total_quantity;

DELETE examples

Deletes the specified consumable resource.

DELETE FROM aws.batch.consumable_resources
WHERE region = '{{ region }}' --required
;