Struct aws_sdk_ec2::input::DescribeSnapshotsInput
source · #[non_exhaustive]pub struct DescribeSnapshotsInput { /* private fields */ }
Implementations§
source§impl DescribeSnapshotsInput
impl DescribeSnapshotsInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeSnapshots, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DescribeSnapshots, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<DescribeSnapshots
>
Examples found in repository?
46544 46545 46546 46547 46548 46549 46550 46551 46552 46553 46554 46555 46556 46557 46558 46559 46560 46561 46562 46563 46564 46565 46566 46567 46568 46569 46570 46571 46572 46573 46574 46575 46576 46577 46578 46579 46580 46581 46582 46583 46584 46585 46586
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeSnapshots,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DescribeSnapshotsError>,
> {
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::DescribeSnapshotsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSnapshotsError>,
> {
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
7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeSnapshotsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSnapshotsError>,
>,
> + 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_snapshots_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 DescribeSnapshotsInput
.
source§impl DescribeSnapshotsInput
impl DescribeSnapshotsInput
sourcepub fn filters(&self) -> Option<&[Filter]>
pub fn filters(&self) -> Option<&[Filter]>
The filters.
-
description
- A description of the snapshot. -
encrypted
- Indicates whether the snapshot is encrypted (true
|false
) -
owner-alias
- The owner alias, from an Amazon-maintained list (amazon
). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter. -
owner-id
- The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter. -
progress
- The progress of the snapshot, as a percentage (for example, 80%). -
snapshot-id
- The snapshot ID. -
start-time
- The time stamp when the snapshot was initiated. -
status
- The status of the snapshot (pending
|completed
|error
). -
storage-tier
- The storage tier of the snapshot (archive
|standard
). -
tag
:- The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner
and the valueTeamA
, specifytag:Owner
for the filter name andTeamA
for the filter value. -
tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. -
volume-id
- The ID of the volume the snapshot is for. -
volume-size
- The size of the volume, in GiB.
sourcepub fn max_results(&self) -> Option<i32>
pub fn max_results(&self) -> Option<i32>
The maximum number of snapshot results returned by DescribeSnapshots
in paginated output. When this parameter is used, DescribeSnapshots
only returns MaxResults
results in a single page along with a NextToken
response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots
request with the returned NextToken
value. This value can be between 5 and 1,000; if MaxResults
is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots
returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
sourcepub fn next_token(&self) -> Option<&str>
pub fn next_token(&self) -> Option<&str>
The NextToken
value returned from a previous paginated DescribeSnapshots
request where MaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken
value. This value is null
when there are no more results to return.
sourcepub fn owner_ids(&self) -> Option<&[String]>
pub fn owner_ids(&self) -> Option<&[String]>
Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self
, and amazon
.
sourcepub fn restorable_by_user_ids(&self) -> Option<&[String]>
pub fn restorable_by_user_ids(&self) -> Option<&[String]>
The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.
sourcepub fn snapshot_ids(&self) -> Option<&[String]>
pub fn snapshot_ids(&self) -> Option<&[String]>
The snapshot IDs.
Default: Describes the snapshots for which you have create volume permissions.
Trait Implementations§
source§impl Clone for DescribeSnapshotsInput
impl Clone for DescribeSnapshotsInput
source§fn clone(&self) -> DescribeSnapshotsInput
fn clone(&self) -> DescribeSnapshotsInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more