consumable_resources
Creates, updates, deletes or gets a consumable_resource resource or lists consumable_resources in a region
Overview
| Name | consumable_resources |
| Type | Resource |
| Description | Resource Type definition for AWS::Batch::ConsumableResource |
| Id | awscc.batch.consumable_resources |
Fields
| Name | Datatype | Description |
|---|---|---|
consumable_resource_name | string | Name of ConsumableResource. |
consumable_resource_arn | string | ARN of the Scheduling Policy. |
total_quantity | integer | Total Quantity of ConsumableResource. |
in_use_quantity | integer | In-use Quantity of ConsumableResource. |
available_quantity | integer | Available Quantity of ConsumableResource. |
resource_type | string | Type of Consumable Resource. |
created_at | integer | |
tags | object | A key-value pair to associate with a resource. |
region | string | AWS region. |
For more information, see AWS::Batch::ConsumableResource.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ResourceType, TotalQuantity, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, 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 data__Identifier = '<ConsumableResourceArn>';
INSERT example
Use the following StackQL query and manifest file to create a new consumable_resource resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.batch.consumable_resources (
TotalQuantity,
ResourceType,
region
)
SELECT
'{{ TotalQuantity }}',
'{{ ResourceType }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.batch.consumable_resources (
ConsumableResourceName,
TotalQuantity,
ResourceType,
Tags,
region
)
SELECT
'{{ ConsumableResourceName }}',
'{{ TotalQuantity }}',
'{{ ResourceType }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: consumable_resource
props:
- name: ConsumableResourceName
value: '{{ ConsumableResourceName }}'
- name: TotalQuantity
value: '{{ TotalQuantity }}'
- name: ResourceType
value: '{{ ResourceType }}'
- name: Tags
value: {}
DELETE example
/*+ delete */
DELETE FROM awscc.batch.consumable_resources
WHERE data__Identifier = '<ConsumableResourceArn>'
AND region = 'us-east-1';
Permissions
To operate on the consumable_resources resource, the following permissions are required:
Create
Batch:CreateConsumableResource,
Batch:TagResource
Read
Batch:DescribeConsumableResource
Update
Batch:UpdateConsumableResource,
Batch:TagResource,
Batch:UnTagResource
Delete
Batch:DescribeConsumableResource,
Batch:DeleteConsumableResource
List
Batch:ListConsumableResources