#[non_exhaustive]pub struct DescribeScheduledInstanceAvailabilityInput { /* private fields */ }
Expand description
Contains the parameters for DescribeScheduledInstanceAvailability.
Implementations§
source§impl DescribeScheduledInstanceAvailabilityInput
impl DescribeScheduledInstanceAvailabilityInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeScheduledInstanceAvailability, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeScheduledInstanceAvailability, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<DescribeScheduledInstanceAvailability
>
Examples found in repository?
45615 45616 45617 45618 45619 45620 45621 45622 45623 45624 45625 45626 45627 45628 45629 45630 45631 45632 45633 45634 45635 45636 45637 45638 45639 45640 45641 45642 45643 45644 45645 45646 45647 45648 45649 45650 45651 45652 45653 45654 45655 45656 45657 45658 45659 45660 45661
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeScheduledInstanceAvailability,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<
crate::error::DescribeScheduledInstanceAvailabilityError,
>,
> {
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::DescribeScheduledInstanceAvailabilityOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeScheduledInstanceAvailabilityError,
>,
> {
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
7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeScheduledInstanceAvailabilityOutput,
aws_smithy_http::result::SdkError<
crate::error::DescribeScheduledInstanceAvailabilityError,
>,
>,
> + 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_scheduled_instance_availability_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 DescribeScheduledInstanceAvailabilityInput
.
source§impl DescribeScheduledInstanceAvailabilityInput
impl DescribeScheduledInstanceAvailabilityInput
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 filters(&self) -> Option<&[Filter]>
pub fn filters(&self) -> Option<&[Filter]>
The filters.
-
availability-zone
- The Availability Zone (for example,us-west-2a
). -
instance-type
- The instance type (for example,c4.large
). -
network-platform
- The network platform (EC2-Classic
orEC2-VPC
). -
platform
- The platform (Linux/UNIX
orWindows
).
sourcepub fn first_slot_start_time_range(&self) -> Option<&SlotDateTimeRangeRequest>
pub fn first_slot_start_time_range(&self) -> Option<&SlotDateTimeRangeRequest>
The time period for the first schedule to start.
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. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned NextToken
value.
sourcepub fn max_slot_duration_in_hours(&self) -> Option<i32>
pub fn max_slot_duration_in_hours(&self) -> Option<i32>
The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours
and less than 1,720.
sourcepub fn min_slot_duration_in_hours(&self) -> Option<i32>
pub fn min_slot_duration_in_hours(&self) -> Option<i32>
The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
sourcepub fn next_token(&self) -> Option<&str>
pub fn next_token(&self) -> Option<&str>
The token for the next set of results.
sourcepub fn recurrence(&self) -> Option<&ScheduledInstanceRecurrenceRequest>
pub fn recurrence(&self) -> Option<&ScheduledInstanceRecurrenceRequest>
The schedule recurrence.
Trait Implementations§
source§impl Clone for DescribeScheduledInstanceAvailabilityInput
impl Clone for DescribeScheduledInstanceAvailabilityInput
source§fn clone(&self) -> DescribeScheduledInstanceAvailabilityInput
fn clone(&self) -> DescribeScheduledInstanceAvailabilityInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more