Batch / Client / update_consumable_resource
update_consumable_resource¶
- Batch.Client.update_consumable_resource(**kwargs)¶
Updates a consumable resource.
See also: AWS API Documentation
Request Syntax
response = client.update_consumable_resource( consumableResource='string', operation='string', quantity=123, clientToken='string' )
- Parameters:
consumableResource (string) –
[REQUIRED]
The name or ARN of the consumable resource to be updated.
operation (string) –
Indicates how the quantity of the consumable resource will be updated. Must be one of:
SETSets the quantity of the resource to the value specified by thequantityparameter.ADDIncreases the quantity of the resource by the value specified by thequantityparameter.REMOVEReduces the quantity of the resource by the value specified by thequantityparameter.
quantity (integer) – The change in the total quantity of the consumable resource. The
operationparameter determines whether the value specified here will be the new total quantity, or the amount by which the total quantity will be increased or reduced. Must be a non-negative value.clientToken (string) –
If this parameter is specified and two update requests with identical payloads and
clientToken``s are received, these requests are considered the same request. Both requests will succeed, but the update will only happen once. A ``clientTokenis valid for 8 hours.This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'consumableResourceName': 'string', 'consumableResourceArn': 'string', 'totalQuantity': 123 }
Response Structure
(dict) –
consumableResourceName (string) –
The name of the consumable resource to be updated.
consumableResourceArn (string) –
The Amazon Resource Name (ARN) of the consumable resource.
totalQuantity (integer) –
The total amount of the consumable resource that is available.
Exceptions
Batch.Client.exceptions.ClientExceptionBatch.Client.exceptions.ServerException