#[non_exhaustive]pub struct GetInstanceTypesFromInstanceRequirementsInput { /* private fields */ }
Implementations§
source§impl GetInstanceTypesFromInstanceRequirementsInput
impl GetInstanceTypesFromInstanceRequirementsInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<GetInstanceTypesFromInstanceRequirements, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<GetInstanceTypesFromInstanceRequirements, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<GetInstanceTypesFromInstanceRequirements
>
Examples found in repository?
58331 58332 58333 58334 58335 58336 58337 58338 58339 58340 58341 58342 58343 58344 58345 58346 58347 58348 58349 58350 58351 58352 58353 58354 58355 58356 58357 58358 58359 58360 58361 58362 58363 58364 58365 58366 58367 58368 58369 58370 58371 58372 58373 58374 58375 58376 58377
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetInstanceTypesFromInstanceRequirements,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<
crate::error::GetInstanceTypesFromInstanceRequirementsError,
>,
> {
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::GetInstanceTypesFromInstanceRequirementsOutput,
aws_smithy_http::result::SdkError<
crate::error::GetInstanceTypesFromInstanceRequirementsError,
>,
> {
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
12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::GetInstanceTypesFromInstanceRequirementsOutput,
aws_smithy_http::result::SdkError<
crate::error::GetInstanceTypesFromInstanceRequirementsError,
>,
>,
> + 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_get_instance_types_from_instance_requirements_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 GetInstanceTypesFromInstanceRequirementsInput
.
source§impl GetInstanceTypesFromInstanceRequirementsInput
impl GetInstanceTypesFromInstanceRequirementsInput
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 architecture_types(&self) -> Option<&[ArchitectureType]>
pub fn architecture_types(&self) -> Option<&[ArchitectureType]>
The processor architecture type.
sourcepub fn virtualization_types(&self) -> Option<&[VirtualizationType]>
pub fn virtualization_types(&self) -> Option<&[VirtualizationType]>
The virtualization type.
sourcepub fn instance_requirements(&self) -> Option<&InstanceRequirementsRequest>
pub fn instance_requirements(&self) -> Option<&InstanceRequirementsRequest>
The attributes required for the instance types.
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. Specify a value between 1 and
1000. The default value is 1000. 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 set of results.
Trait Implementations§
source§impl Clone for GetInstanceTypesFromInstanceRequirementsInput
impl Clone for GetInstanceTypesFromInstanceRequirementsInput
source§fn clone(&self) -> GetInstanceTypesFromInstanceRequirementsInput
fn clone(&self) -> GetInstanceTypesFromInstanceRequirementsInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more