Skip to main content

consumable_resources

Creates, updates, deletes or gets a consumable_resource resource or lists consumable_resources in a region

Overview

Nameconsumable_resources
TypeResource
DescriptionResource Type definition for AWS::Batch::ConsumableResource
Idawscc.batch.consumable_resources

Fields

NameDatatypeDescription
consumable_resource_namestringName of ConsumableResource.
consumable_resource_arnstringARN of the Scheduling Policy.
total_quantityintegerTotal Quantity of ConsumableResource.
in_use_quantityintegerIn-use Quantity of ConsumableResource.
available_quantityintegerAvailable Quantity of ConsumableResource.
resource_typestringType of Consumable Resource.
created_atinteger
tagsobjectA key-value pair to associate with a resource.
regionstringAWS region.

For more information, see AWS::Batch::ConsumableResource.

Methods

NameResourceAccessible byRequired Params
create_resourceconsumable_resourcesINSERTResourceType, TotalQuantity, region
delete_resourceconsumable_resourcesDELETEIdentifier, region
update_resourceconsumable_resourcesUPDATEIdentifier, PatchDocument, region
list_resourcesconsumable_resources_list_onlySELECTregion
get_resourceconsumable_resourcesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual consumable_resource.

SELECT
region,
consumable_resource_name,
consumable_resource_arn,
total_quantity,
in_use_quantity,
available_quantity,
resource_type,
created_at,
tags
FROM awscc.batch.consumable_resources
WHERE
region = 'us-east-1' AND
Identifier = '{{ consumable_resource_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new consumable_resource resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.batch.consumable_resources (
TotalQuantity,
ResourceType,
region
)
SELECT
'{{ total_quantity }}',
'{{ resource_type }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a consumable_resource resource, using stack-deploy.

/*+ update */
UPDATE awscc.batch.consumable_resources
SET PatchDocument = string('{{ {
"TotalQuantity": total_quantity
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ consumable_resource_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.batch.consumable_resources
WHERE
Identifier = '{{ consumable_resource_arn }}' AND
region = 'us-east-1';

Permissions

To operate on the consumable_resources resource, the following permissions are required:

Batch:CreateConsumableResource,
Batch:TagResource