pub struct PurchaseHostReservation { /* private fields */ }
Expand description
Fluent builder constructing a request to PurchaseHostReservation
.
Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.
Implementations§
source§impl PurchaseHostReservation
impl PurchaseHostReservation
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PurchaseHostReservation, AwsResponseRetryClassifier>, SdkError<PurchaseHostReservationError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PurchaseHostReservation, AwsResponseRetryClassifier>, SdkError<PurchaseHostReservationError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<PurchaseHostReservationOutput, SdkError<PurchaseHostReservationError>>
pub async fn send(
self
) -> Result<PurchaseHostReservationOutput, SdkError<PurchaseHostReservationError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
sourcepub fn currency_code(self, input: CurrencyCodeValues) -> Self
pub fn currency_code(self, input: CurrencyCodeValues) -> Self
The currency in which the totalUpfrontPrice
, LimitPrice
, and totalHourlyPrice
amounts are specified. At this time, the only supported currency is USD
.
sourcepub fn set_currency_code(self, input: Option<CurrencyCodeValues>) -> Self
pub fn set_currency_code(self, input: Option<CurrencyCodeValues>) -> Self
The currency in which the totalUpfrontPrice
, LimitPrice
, and totalHourlyPrice
amounts are specified. At this time, the only supported currency is USD
.
sourcepub fn host_id_set(self, input: impl Into<String>) -> Self
pub fn host_id_set(self, input: impl Into<String>) -> Self
Appends an item to HostIdSet
.
To override the contents of this collection use set_host_id_set
.
The IDs of the Dedicated Hosts with which the reservation will be associated.
sourcepub fn set_host_id_set(self, input: Option<Vec<String>>) -> Self
pub fn set_host_id_set(self, input: Option<Vec<String>>) -> Self
The IDs of the Dedicated Hosts with which the reservation will be associated.
sourcepub fn limit_price(self, input: impl Into<String>) -> Self
pub fn limit_price(self, input: impl Into<String>) -> Self
The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request fails. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD
. For example, to indicate a limit price of USD 100, specify 100.00.
sourcepub fn set_limit_price(self, input: Option<String>) -> Self
pub fn set_limit_price(self, input: Option<String>) -> Self
The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request fails. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD
. For example, to indicate a limit price of USD 100, specify 100.00.
sourcepub fn offering_id(self, input: impl Into<String>) -> Self
pub fn offering_id(self, input: impl Into<String>) -> Self
The ID of the offering.
sourcepub fn set_offering_id(self, input: Option<String>) -> Self
pub fn set_offering_id(self, input: Option<String>) -> Self
The ID of the offering.
sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to TagSpecifications
.
To override the contents of this collection use set_tag_specifications
.
The tags to apply to the Dedicated Host Reservation during purchase.
sourcepub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
pub fn set_tag_specifications(self, input: Option<Vec<TagSpecification>>) -> Self
The tags to apply to the Dedicated Host Reservation during purchase.
Trait Implementations§
source§impl Clone for PurchaseHostReservation
impl Clone for PurchaseHostReservation
source§fn clone(&self) -> PurchaseHostReservation
fn clone(&self) -> PurchaseHostReservation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more