pub struct Builder { /* private fields */ }Expand description
A builder for GetTransitGatewayPeeringInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn peering_id(self, input: impl Into<String>) -> Self
pub fn peering_id(self, input: impl Into<String>) -> Self
The ID of the peering request.
sourcepub fn set_peering_id(self, input: Option<String>) -> Self
pub fn set_peering_id(self, input: Option<String>) -> Self
The ID of the peering request.
sourcepub fn build(self) -> Result<GetTransitGatewayPeeringInput, BuildError>
pub fn build(self) -> Result<GetTransitGatewayPeeringInput, BuildError>
Consumes the builder and constructs a GetTransitGatewayPeeringInput.
Examples found in repository?
src/client.rs (line 7789)
7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetTransitGatewayPeering,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetTransitGatewayPeeringError>,
> {
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::GetTransitGatewayPeeringOutput,
aws_smithy_http::result::SdkError<crate::error::GetTransitGatewayPeeringError>,
> {
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
}