consumable_resources
Creates, updates, deletes, gets or lists a consumable_resources resource.
Overview
| Name | consumable_resources |
| Type | Resource |
| Id | aws.batch.consumable_resources |
Fields
The following fields are returned by SELECT queries:
- describe_consumable_resource
- list_consumable_resources
| Name | Datatype | Description |
|---|---|---|
available_quantity | integer (int64) | The amount of the consumable resource that is currently available to use. |
consumable_resource_arn | string | The Amazon Resource Name (ARN) of the consumable resource. |
consumable_resource_name | string | The name of the consumable resource. |
created_at | integer (int64) | The Unix timestamp (in milliseconds) for when the consumable resource was created. |
in_use_quantity | integer (int64) | The amount of the consumable resource that is currently in use. |
resource_type | string | Indicates whether the resource is available to be re-used after a job completes. Can be one of: REPLENISHABLE NON_REPLENISHABLE |
tags | object | The 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_quantity | integer (int64) | The total amount of the consumable resource that is available. |
| Name | Datatype | Description |
|---|---|---|
consumable_resource_arn | string | The Amazon Resource Name (ARN) of the consumable resource. |
consumable_resource_name | string | The name of the consumable resource. |
in_use_quantity | integer (int64) | The amount of the consumable resource that is currently in use. |
resource_type | string | Indicates whether the resource is available to be re-used after a job completes. Can be one of: REPLENISHABLE NON_REPLENISHABLE |
total_quantity | integer (int64) | The total amount of the consumable resource that is available. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_consumable_resource | select | region | Returns a description of the specified consumable resource. | |
list_consumable_resources | select | region | Returns a list of Batch consumable resources. | |
create_consumable_resource | insert | region, consumableResourceName | Creates an Batch consumable resource. | |
update_consumable_resource | update | region, consumableResource | Updates a consumable resource. | |
delete_consumable_resource | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_consumable_resource
- list_consumable_resources
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
;
Returns a list of Batch consumable resources.
SELECT
consumable_resource_arn,
consumable_resource_name,
in_use_quantity,
resource_type,
total_quantity
FROM aws.batch.consumable_resources
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_consumable_resource
- Manifest
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
;
# Description fields are for documentation purposes
- name: consumable_resources
props:
- name: region
value: "{{ region }}"
description: Required parameter for the consumable_resources resource.
- name: consumableResourceName
value: "{{ consumableResourceName }}"
- name: totalQuantity
value: {{ totalQuantity }}
- name: resourceType
value: "{{ resourceType }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_consumable_resource
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
- delete_consumable_resource
Deletes the specified consumable resource.
DELETE FROM aws.batch.consumable_resources
WHERE region = '{{ region }}' --required
;