pub struct GetTransitGatewayRegistrations { /* private fields */ }Expand description
Operation shape for GetTransitGatewayRegistrations.
This is usually constructed for you using the the fluent builder returned by
get_transit_gateway_registrations.
See crate::client::fluent_builders::GetTransitGatewayRegistrations for more details about the operation.
Implementations§
source§impl GetTransitGatewayRegistrations
impl GetTransitGatewayRegistrations
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture GetTransitGatewayRegistrationsInput.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new GetTransitGatewayRegistrations operation.
Examples found in repository?
src/input.rs (line 12534)
12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetTransitGatewayRegistrations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetTransitGatewayRegistrationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_139 = &_input.global_network_id;
let input_139 = input_139.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"global_network_id",
"cannot be empty or unset",
)
})?;
let global_network_id = aws_smithy_http::label::fmt_string(
input_139,
aws_smithy_http::label::EncodingStrategy::Default,
);
if global_network_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"global_network_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/global-networks/{GlobalNetworkId}/transit-gateway-registrations",
GlobalNetworkId = global_network_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetTransitGatewayRegistrationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_140) = &_input.transit_gateway_arns {
{
for inner_141 in inner_140 {
query.push_kv(
"transitGatewayArns",
&aws_smithy_http::query::fmt_string(&inner_141),
);
}
}
}
if let Some(inner_142) = &_input.max_results {
if *inner_142 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_142).encode(),
);
}
}
if let Some(inner_143) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_143));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTransitGatewayRegistrationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetTransitGatewayRegistrations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTransitGatewayRegistrations",
"networkmanager",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}Trait Implementations§
source§impl Clone for GetTransitGatewayRegistrations
impl Clone for GetTransitGatewayRegistrations
source§fn clone(&self) -> GetTransitGatewayRegistrations
fn clone(&self) -> GetTransitGatewayRegistrations
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 moresource§impl Default for GetTransitGatewayRegistrations
impl Default for GetTransitGatewayRegistrations
source§fn default() -> GetTransitGatewayRegistrations
fn default() -> GetTransitGatewayRegistrations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for GetTransitGatewayRegistrations
impl Send for GetTransitGatewayRegistrations
impl Sync for GetTransitGatewayRegistrations
impl Unpin for GetTransitGatewayRegistrations
impl UnwindSafe for GetTransitGatewayRegistrations
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
§type Output = <T as ParseStrictResponse>::Output
type Output = <T as ParseStrictResponse>::Output
Output type of the HttpResponse. Read more
source§fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
Parse an HTTP request without reading the body. If the body must be provided to proceed,
return
None Read moresource§fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
Parse an HTTP request from a fully loaded body. This is for standard request/response style
APIs like AwsJson 1.0/1.1 and the error path of most streaming APIs Read more