aws_sdk_batch/client/update_consumable_resource.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`UpdateConsumableResource`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`consumable_resource(impl Into<String>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::consumable_resource) / [`set_consumable_resource(Option<String>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::set_consumable_resource):<br>required: **true**<br><p>The name or ARN of the consumable resource to be updated.</p><br>
7 /// - [`operation(impl Into<String>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::operation) / [`set_operation(Option<String>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::set_operation):<br>required: **false**<br><p>Indicates how the quantity of the consumable resource will be updated. Must be one of:</p> <ul> <li> <p><code>SET</code></p> <p>Sets the quantity of the resource to the value specified by the <code>quantity</code> parameter.</p></li> <li> <p><code>ADD</code></p> <p>Increases the quantity of the resource by the value specified by the <code>quantity</code> parameter.</p></li> <li> <p><code>REMOVE</code></p> <p>Reduces the quantity of the resource by the value specified by the <code>quantity</code> parameter.</p></li> </ul><br>
8 /// - [`quantity(i64)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::quantity) / [`set_quantity(Option<i64>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::set_quantity):<br>required: **false**<br><p>The change in the total quantity of the consumable resource. The <code>operation</code> 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.</p><br>
9 /// - [`client_token(impl Into<String>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::set_client_token):<br>required: **false**<br><p>If this parameter is specified and two update requests with identical payloads and <code>clientToken</code>s are received, these requests are considered the same request. Both requests will succeed, but the update will only happen once. A <code>clientToken</code> is valid for 8 hours.</p><br>
10 /// - On success, responds with [`UpdateConsumableResourceOutput`](crate::operation::update_consumable_resource::UpdateConsumableResourceOutput) with field(s):
11 /// - [`consumable_resource_name(Option<String>)`](crate::operation::update_consumable_resource::UpdateConsumableResourceOutput::consumable_resource_name): <p>The name of the consumable resource to be updated.</p>
12 /// - [`consumable_resource_arn(Option<String>)`](crate::operation::update_consumable_resource::UpdateConsumableResourceOutput::consumable_resource_arn): <p>The Amazon Resource Name (ARN) of the consumable resource.</p>
13 /// - [`total_quantity(Option<i64>)`](crate::operation::update_consumable_resource::UpdateConsumableResourceOutput::total_quantity): <p>The total amount of the consumable resource that is available.</p>
14 /// - On failure, responds with [`SdkError<UpdateConsumableResourceError>`](crate::operation::update_consumable_resource::UpdateConsumableResourceError)
15 pub fn update_consumable_resource(&self) -> crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder {
16 crate::operation::update_consumable_resource::builders::UpdateConsumableResourceFluentBuilder::new(self.handle.clone())
17 }
18}