AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the UpdateConsumableResource operation. Updates a consumable resource.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Batch.AmazonBatchRequest
      Amazon.Batch.Model.UpdateConsumableResourceRequest

Namespace: Amazon.Batch.Model
Assembly: AWSSDK.Batch.dll
Version: 3.x.y.z

Syntax

C#
public class UpdateConsumableResourceRequest : AmazonBatchRequest
         IAmazonWebServiceRequest

The UpdateConsumableResourceRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ClientToken System.String

Gets and sets the property ClientToken.

If this parameter is specified and two update requests with identical payloads and clientTokens are received, these requests are considered the same request. Both requests will succeed, but the update will only happen once. A clientToken is valid for 8 hours.

Public Property ConsumableResource System.String

Gets and sets the property ConsumableResource.

The name or ARN of the consumable resource to be updated.

Public Property Operation System.String

Gets and sets the property Operation.

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.

Public Property Quantity System.Int64

Gets and sets the property Quantity.

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.

Examples

Updates a consumable resource.

To update a consumable resource


var client = new AmazonBatchClient();
var response = client.UpdateConsumableResource(new UpdateConsumableResourceRequest 
{
    ConsumableResource = "myConsumableResource",
    Operation = "ADD",
    Quantity = 12
});

string consumableResourceArn = response.ConsumableResourceArn;
string consumableResourceName = response.ConsumableResourceName;
long totalQuantity = response.TotalQuantity;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5