aws_sdk_ec2/client/
purchase_capacity_block.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 [`PurchaseCapacityBlock`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`dry_run(bool)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
7    ///   - [`tag_specifications(TagSpecification)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the Capacity Block during launch.</p><br>
8    ///   - [`capacity_block_offering_id(impl Into<String>)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::capacity_block_offering_id) / [`set_capacity_block_offering_id(Option<String>)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::set_capacity_block_offering_id):<br>required: **true**<br><p>The ID of the Capacity Block offering.</p><br>
9    ///   - [`instance_platform(CapacityReservationInstancePlatform)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::instance_platform) / [`set_instance_platform(Option<CapacityReservationInstancePlatform>)`](crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::set_instance_platform):<br>required: **true**<br><p>The type of operating system for which to reserve capacity.</p><br>
10    /// - On success, responds with [`PurchaseCapacityBlockOutput`](crate::operation::purchase_capacity_block::PurchaseCapacityBlockOutput) with field(s):
11    ///   - [`capacity_reservation(Option<CapacityReservation>)`](crate::operation::purchase_capacity_block::PurchaseCapacityBlockOutput::capacity_reservation): <p>The Capacity Reservation.</p>
12    ///   - [`capacity_blocks(Option<Vec::<CapacityBlock>>)`](crate::operation::purchase_capacity_block::PurchaseCapacityBlockOutput::capacity_blocks): <p>The Capacity Block.</p>
13    /// - On failure, responds with [`SdkError<PurchaseCapacityBlockError>`](crate::operation::purchase_capacity_block::PurchaseCapacityBlockError)
14    pub fn purchase_capacity_block(&self) -> crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder {
15        crate::operation::purchase_capacity_block::builders::PurchaseCapacityBlockFluentBuilder::new(self.handle.clone())
16    }
17}