Struct aws_sdk_ec2::input::DescribeSpotPriceHistoryInput
source · #[non_exhaustive]pub struct DescribeSpotPriceHistoryInput { /* private fields */ }
Expand description
Contains the parameters for DescribeSpotPriceHistory.
Implementations§
source§impl DescribeSpotPriceHistoryInput
impl DescribeSpotPriceHistoryInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeSpotPriceHistory, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeSpotPriceHistory, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<DescribeSpotPriceHistory
>
Examples found in repository?
47532 47533 47534 47535 47536 47537 47538 47539 47540 47541 47542 47543 47544 47545 47546 47547 47548 47549 47550 47551 47552 47553 47554 47555 47556 47557 47558 47559 47560 47561 47562 47563 47564 47565 47566 47567 47568 47569 47570 47571 47572 47573 47574
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeSpotPriceHistory,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotPriceHistoryError>,
> {
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::DescribeSpotPriceHistoryOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotPriceHistoryError>,
> {
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
8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeSpotPriceHistoryOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSpotPriceHistoryError>,
>,
> + 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_spot_price_history_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 DescribeSpotPriceHistoryInput
.
source§impl DescribeSpotPriceHistoryInput
impl DescribeSpotPriceHistoryInput
sourcepub fn filters(&self) -> Option<&[Filter]>
pub fn filters(&self) -> Option<&[Filter]>
One or more filters.
-
availability-zone
- The Availability Zone for which prices should be returned. -
instance-type
- The type of instance (for example,m3.medium
). -
product-description
- The product description for the Spot price (Linux/UNIX
|Red Hat Enterprise Linux
|SUSE Linux
|Windows
|Linux/UNIX (Amazon VPC)
|Red Hat Enterprise Linux (Amazon VPC)
|SUSE Linux (Amazon VPC)
|Windows (Amazon VPC)
). -
spot-price
- The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported). -
timestamp
- The time stamp of the Spot price history, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater than or less than comparison is not supported.
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
Filters the results by the specified Availability Zone.
sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
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 DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn end_time(&self) -> Option<&DateTime>
pub fn end_time(&self) -> Option<&DateTime>
The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
sourcepub fn instance_types(&self) -> Option<&[InstanceType]>
pub fn instance_types(&self) -> Option<&[InstanceType]>
Filters the results by the specified instance types.
sourcepub fn max_results(&self) -> Option<i32>
pub fn max_results(&self) -> Option<i32>
The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken
value.
sourcepub fn next_token(&self) -> Option<&str>
pub fn next_token(&self) -> Option<&str>
The token for the next set of results.
sourcepub fn product_descriptions(&self) -> Option<&[String]>
pub fn product_descriptions(&self) -> Option<&[String]>
Filters the results by the specified basic product descriptions.
sourcepub fn start_time(&self) -> Option<&DateTime>
pub fn start_time(&self) -> Option<&DateTime>
The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Trait Implementations§
source§impl Clone for DescribeSpotPriceHistoryInput
impl Clone for DescribeSpotPriceHistoryInput
source§fn clone(&self) -> DescribeSpotPriceHistoryInput
fn clone(&self) -> DescribeSpotPriceHistoryInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more