#[non_exhaustive]pub struct DescribeReservedInstancesOfferingsInput { /* private fields */ }
Expand description
Contains the parameters for DescribeReservedInstancesOfferings.
Implementations§
source§impl DescribeReservedInstancesOfferingsInput
impl DescribeReservedInstancesOfferingsInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeReservedInstancesOfferings, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeReservedInstancesOfferings, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<DescribeReservedInstancesOfferings
>
Examples found in repository?
45123 45124 45125 45126 45127 45128 45129 45130 45131 45132 45133 45134 45135 45136 45137 45138 45139 45140 45141 45142 45143 45144 45145 45146 45147 45148 45149 45150 45151 45152 45153 45154 45155 45156 45157 45158 45159 45160 45161 45162 45163 45164 45165 45166 45167 45168 45169
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeReservedInstancesOfferings,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<
crate::error::DescribeReservedInstancesOfferingsError,
>,
> {
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::DescribeReservedInstancesOfferingsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeReservedInstancesOfferingsError,
>,
> {
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
7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeReservedInstancesOfferingsOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeReservedInstancesOfferingsError,
>,
>,
> + 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_reserved_instances_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 DescribeReservedInstancesOfferingsInput
.
source§impl DescribeReservedInstancesOfferingsInput
impl DescribeReservedInstancesOfferingsInput
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone in which the Reserved Instance can be used.
sourcepub fn filters(&self) -> Option<&[Filter]>
pub fn filters(&self) -> Option<&[Filter]>
One or more filters.
-
availability-zone
- The Availability Zone where the Reserved Instance can be used. -
duration
- The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000
|94608000
). -
fixed-price
- The purchase price of the Reserved Instance (for example, 9800.0). -
instance-type
- The instance type that is covered by the reservation. -
marketplace
- Set totrue
to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both Amazon Web Services and the Reserved Instance Marketplace are listed. -
product-description
- The Reserved Instance product platform description. Instances that include(Amazon VPC)
in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (Linux/UNIX
|Linux/UNIX (Amazon VPC)
|SUSE Linux
|SUSE Linux (Amazon VPC)
|Red Hat Enterprise Linux
|Red Hat Enterprise Linux (Amazon VPC)
|Red Hat Enterprise Linux with HA (Amazon VPC)
|Windows
|Windows (Amazon VPC)
|Windows with SQL Server Standard
|Windows with SQL Server Standard (Amazon VPC)
|Windows with SQL Server Web
|Windows with SQL Server Web (Amazon VPC)
|Windows with SQL Server Enterprise
|Windows with SQL Server Enterprise (Amazon VPC)
) -
reserved-instances-offering-id
- The Reserved Instances offering ID. -
scope
- The scope of the Reserved Instance (Availability Zone
orRegion
). -
usage-price
- The usage price of the Reserved Instance, per hour (for example, 0.84).
sourcepub fn include_marketplace(&self) -> Option<bool>
pub fn include_marketplace(&self) -> Option<bool>
Include Reserved Instance Marketplace offerings in the response.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type that the reservation will cover (for example, m1.small
). For more information, see Instance types in the Amazon EC2 User Guide.
sourcepub fn max_duration(&self) -> Option<i64>
pub fn max_duration(&self) -> Option<i64>
The maximum duration (in seconds) to filter when searching for offerings.
Default: 94608000 (3 years)
sourcepub fn max_instance_count(&self) -> Option<i32>
pub fn max_instance_count(&self) -> Option<i32>
The maximum number of instances to filter when searching for offerings.
Default: 20
sourcepub fn min_duration(&self) -> Option<i64>
pub fn min_duration(&self) -> Option<i64>
The minimum duration (in seconds) to filter when searching for offerings.
Default: 2592000 (1 month)
sourcepub fn offering_class(&self) -> Option<&OfferingClassType>
pub fn offering_class(&self) -> Option<&OfferingClassType>
The offering class of the Reserved Instance. Can be standard
or convertible
.
sourcepub fn product_description(&self) -> Option<&RiProductDescription>
pub fn product_description(&self) -> Option<&RiProductDescription>
The Reserved Instance product platform description. Instances that include (Amazon VPC)
in the description are for use with Amazon VPC.
sourcepub fn reserved_instances_offering_ids(&self) -> Option<&[String]>
pub fn reserved_instances_offering_ids(&self) -> Option<&[String]>
One or more Reserved Instances offering IDs.
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 instance_tenancy(&self) -> Option<&Tenancy>
pub fn instance_tenancy(&self) -> Option<&Tenancy>
The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated
is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).
Important: The host
value cannot be used with this parameter. Use the default
or dedicated
values only.
Default: default
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 of the initial request can be seen by sending another request with the returned NextToken
value. The maximum is 100.
Default: 100
sourcepub fn next_token(&self) -> Option<&str>
pub fn next_token(&self) -> Option<&str>
The token to retrieve the next page of results.
sourcepub fn offering_type(&self) -> Option<&OfferingTypeValues>
pub fn offering_type(&self) -> Option<&OfferingTypeValues>
The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization
Reserved Instance offering type.
Trait Implementations§
source§impl Clone for DescribeReservedInstancesOfferingsInput
impl Clone for DescribeReservedInstancesOfferingsInput
source§fn clone(&self) -> DescribeReservedInstancesOfferingsInput
fn clone(&self) -> DescribeReservedInstancesOfferingsInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more