Struct aws_sdk_ec2::input::ListSnapshotsInRecycleBinInput
source · #[non_exhaustive]pub struct ListSnapshotsInRecycleBinInput { /* private fields */ }
Implementations§
source§impl ListSnapshotsInRecycleBinInput
impl ListSnapshotsInRecycleBinInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ListSnapshotsInRecycleBin, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ListSnapshotsInRecycleBin, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<ListSnapshotsInRecycleBin
>
Examples found in repository?
src/client.rs (line 62668)
62654 62655 62656 62657 62658 62659 62660 62661 62662 62663 62664 62665 62666 62667 62668 62669 62670 62671 62672 62673 62674 62675 62676 62677 62678 62679 62680 62681 62682 62683 62684 62685 62686 62687 62688 62689 62690 62691 62692 62693 62694 62695 62696
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ListSnapshotsInRecycleBin,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ListSnapshotsInRecycleBinError>,
> {
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::ListSnapshotsInRecycleBinOutput,
aws_smithy_http::result::SdkError<crate::error::ListSnapshotsInRecycleBinError>,
> {
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
src/paginator.rs (line 14069)
14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListSnapshotsInRecycleBinOutput,
aws_smithy_http::result::SdkError<crate::error::ListSnapshotsInRecycleBinError>,
>,
> + 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_list_snapshots_in_recycle_bin_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 ListSnapshotsInRecycleBinInput
.
source§impl ListSnapshotsInRecycleBinInput
impl ListSnapshotsInRecycleBinInput
sourcepub fn max_results(&self) -> Option<i32>
pub fn max_results(&self) -> Option<i32>
The maximum number of results to return with a single call. 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 page of results.
sourcepub fn snapshot_ids(&self) -> Option<&[String]>
pub fn snapshot_ids(&self) -> Option<&[String]>
The IDs of the snapshots to list. Omit this parameter to list all of the snapshots that are in the Recycle Bin.
Trait Implementations§
source§impl Clone for ListSnapshotsInRecycleBinInput
impl Clone for ListSnapshotsInRecycleBinInput
source§fn clone(&self) -> ListSnapshotsInRecycleBinInput
fn clone(&self) -> ListSnapshotsInRecycleBinInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more