Struct aws_sdk_iot::input::ListThingsInput
source · #[non_exhaustive]pub struct ListThingsInput { /* private fields */ }
Expand description
The input for the ListThings operation.
Implementations§
source§impl ListThingsInput
impl ListThingsInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ListThings, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ListThings, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<ListThings
>
Examples found in repository?
21265 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ListThings,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ListThingsError>,
> {
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::ListThingsOutput,
aws_smithy_http::result::SdkError<crate::error::ListThingsError>,
> {
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
5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListThingsOutput,
aws_smithy_http::result::SdkError<crate::error::ListThingsError>,
>,
> + 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_things_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 ListThingsInput
.
source§impl ListThingsInput
impl ListThingsInput
sourcepub fn next_token(&self) -> Option<&str>
pub fn next_token(&self) -> Option<&str>
To retrieve the next set of results, the nextToken
value from a previous response; otherwise null to receive the first set of results.
sourcepub fn max_results(&self) -> Option<i32>
pub fn max_results(&self) -> Option<i32>
The maximum number of results to return in this operation.
sourcepub fn attribute_name(&self) -> Option<&str>
pub fn attribute_name(&self) -> Option<&str>
The attribute name used to search for things.
sourcepub fn attribute_value(&self) -> Option<&str>
pub fn attribute_value(&self) -> Option<&str>
The attribute value used to search for things.
sourcepub fn thing_type_name(&self) -> Option<&str>
pub fn thing_type_name(&self) -> Option<&str>
The name of the thing type used to search for things.
sourcepub fn use_prefix_attribute_value(&self) -> bool
pub fn use_prefix_attribute_value(&self) -> bool
When true
, the action returns the thing resources with attribute values that start with the attributeValue
provided.
When false
, or not present, the action returns only the thing resources with attribute values that match the entire attributeValue
provided.
Trait Implementations§
source§impl Clone for ListThingsInput
impl Clone for ListThingsInput
source§fn clone(&self) -> ListThingsInput
fn clone(&self) -> ListThingsInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more