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:

    • SET Sets the quantity of the resource to the value specified by the quantity parameter.

    • ADD Increases the quantity of the resource by the value specified by the quantity parameter.

    • REMOVE Reduces the quantity of the resource by the value specified by the quantity parameter.

  • quantity (integer) – The change in the total quantity of the consumable resource. The operation parameter 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 and the second request is rejected. A ``clientToken is valid for 8 hours or until one hour after the consumable resource is deleted, whichever is less.

    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.ClientException

  • Batch.Client.exceptions.ServerException