Struct aws_sdk_apigatewayv2::input::update_route_input::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for UpdateRouteInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_api_id(self, input: Option<String>) -> Self
pub fn set_api_id(self, input: Option<String>) -> Self
The API identifier.
sourcepub fn api_key_required(self, input: bool) -> Self
pub fn api_key_required(self, input: bool) -> Self
Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
sourcepub fn set_api_key_required(self, input: Option<bool>) -> Self
pub fn set_api_key_required(self, input: Option<bool>) -> Self
Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
Appends an item to authorization_scopes.
To override the contents of this collection use set_authorization_scopes.
The authorization scopes supported by this route.
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
sourcepub fn model_selection_expression(self, input: impl Into<String>) -> Self
pub fn model_selection_expression(self, input: impl Into<String>) -> Self
The model selection expression for the route. Supported only for WebSocket APIs.
sourcepub fn set_model_selection_expression(self, input: Option<String>) -> Self
pub fn set_model_selection_expression(self, input: Option<String>) -> Self
The model selection expression for the route. Supported only for WebSocket APIs.
sourcepub fn operation_name(self, input: impl Into<String>) -> Self
pub fn operation_name(self, input: impl Into<String>) -> Self
The operation name for the route.
sourcepub fn set_operation_name(self, input: Option<String>) -> Self
pub fn set_operation_name(self, input: Option<String>) -> Self
The operation name for the route.
sourcepub fn request_models(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn request_models(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to request_models.
To override the contents of this collection use set_request_models.
The request models for the route. Supported only for WebSocket APIs.
sourcepub fn set_request_models(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_request_models(self, input: Option<HashMap<String, String>>) -> Self
The request models for the route. Supported only for WebSocket APIs.
sourcepub fn request_parameters(
self,
k: impl Into<String>,
v: ParameterConstraints
) -> Self
pub fn request_parameters(
self,
k: impl Into<String>,
v: ParameterConstraints
) -> Self
Adds a key-value pair to request_parameters.
To override the contents of this collection use set_request_parameters.
The request parameters for the route. Supported only for WebSocket APIs.
sourcepub fn set_request_parameters(
self,
input: Option<HashMap<String, ParameterConstraints>>
) -> Self
pub fn set_request_parameters(
self,
input: Option<HashMap<String, ParameterConstraints>>
) -> Self
The request parameters for the route. Supported only for WebSocket APIs.
sourcepub fn set_route_id(self, input: Option<String>) -> Self
pub fn set_route_id(self, input: Option<String>) -> Self
The route ID.
sourcepub fn set_route_key(self, input: Option<String>) -> Self
pub fn set_route_key(self, input: Option<String>) -> Self
The route key for the route.
sourcepub fn route_response_selection_expression(
self,
input: impl Into<String>
) -> Self
pub fn route_response_selection_expression(
self,
input: impl Into<String>
) -> Self
The route response selection expression for the route. Supported only for WebSocket APIs.
sourcepub fn set_route_response_selection_expression(
self,
input: Option<String>
) -> Self
pub fn set_route_response_selection_expression(
self,
input: Option<String>
) -> Self
The route response selection expression for the route. Supported only for WebSocket APIs.
sourcepub fn set_target(self, input: Option<String>) -> Self
pub fn set_target(self, input: Option<String>) -> Self
The target for the route.
sourcepub fn build(self) -> Result<UpdateRouteInput, BuildError>
pub fn build(self) -> Result<UpdateRouteInput, BuildError>
Consumes the builder and constructs a UpdateRouteInput.
Examples found in repository?
9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UpdateRoute,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UpdateRouteError>,
> {
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::UpdateRouteOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateRouteError>,
> {
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
}