#[non_exhaustive]pub struct DescribeHostReservationOfferingsInput { /* private fields */ }
Implementations§
source§impl DescribeHostReservationOfferingsInput
impl DescribeHostReservationOfferingsInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeHostReservationOfferings, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeHostReservationOfferings, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<DescribeHostReservationOfferings
>
Examples found in repository?
37140 37141 37142 37143 37144 37145 37146 37147 37148 37149 37150 37151 37152 37153 37154 37155 37156 37157 37158 37159 37160 37161 37162 37163 37164 37165 37166 37167 37168 37169 37170 37171 37172 37173 37174 37175 37176 37177 37178 37179 37180 37181 37182
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeHostReservationOfferings,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DescribeHostReservationOfferingsError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// 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](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeHostReservationOfferingsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeHostReservationOfferingsError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
More examples
2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeHostReservationOfferingsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeHostReservationOfferingsError>,
>,
> + Unpin {
// Move individual fields out of self for the borrow checker
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
// Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
let mut input = match builder
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)
{
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)
{
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
// If the input member is None or it was an error
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_describe_host_reservation_offerings_output_next_token(resp);
let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
if !is_empty
&& new_token == input.next_token.as_ref()
&& self.stop_on_duplicate_token
{
true
} else {
input.next_token = new_token.cloned();
is_empty
}
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
// receiving end was dropped
return;
}
if done {
return;
}
}
})
})
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DescribeHostReservationOfferingsInput
.
source§impl DescribeHostReservationOfferingsInput
impl DescribeHostReservationOfferingsInput
sourcepub fn filter(&self) -> Option<&[Filter]>
pub fn filter(&self) -> Option<&[Filter]>
The filters.
-
instance-family
- The instance family of the offering (for example,m4
). -
payment-option
- The payment option (NoUpfront
|PartialUpfront
|AllUpfront
).
sourcepub fn max_duration(&self) -> Option<i32>
pub fn max_duration(&self) -> Option<i32>
This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.
sourcepub fn max_results(&self) -> Option<i32>
pub fn max_results(&self) -> Option<i32>
The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken
value. This value can be between 5 and 500. If maxResults
is given a larger value than 500, you receive an error.
sourcepub fn min_duration(&self) -> Option<i32>
pub fn min_duration(&self) -> Option<i32>
This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.
sourcepub fn next_token(&self) -> Option<&str>
pub fn next_token(&self) -> Option<&str>
The token to use to retrieve the next page of results.
sourcepub fn offering_id(&self) -> Option<&str>
pub fn offering_id(&self) -> Option<&str>
The ID of the reservation offering.
Trait Implementations§
source§impl Clone for DescribeHostReservationOfferingsInput
impl Clone for DescribeHostReservationOfferingsInput
source§fn clone(&self) -> DescribeHostReservationOfferingsInput
fn clone(&self) -> DescribeHostReservationOfferingsInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more