Struct aws_sdk_worklink::input::create_fleet_input::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for CreateFleetInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn fleet_name(self, input: impl Into<String>) -> Self
pub fn fleet_name(self, input: impl Into<String>) -> Self
A unique name for the fleet.
sourcepub fn set_fleet_name(self, input: Option<String>) -> Self
pub fn set_fleet_name(self, input: Option<String>) -> Self
A unique name for the fleet.
sourcepub fn display_name(self, input: impl Into<String>) -> Self
pub fn display_name(self, input: impl Into<String>) -> Self
The fleet name to display.
sourcepub fn set_display_name(self, input: Option<String>) -> Self
pub fn set_display_name(self, input: Option<String>) -> Self
The fleet name to display.
sourcepub fn optimize_for_end_user_location(self, input: bool) -> Self
pub fn optimize_for_end_user_location(self, input: bool) -> Self
The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region.
sourcepub fn set_optimize_for_end_user_location(self, input: Option<bool>) -> Self
pub fn set_optimize_for_end_user_location(self, input: Option<bool>) -> Self
The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region.
Adds a key-value pair to tags.
To override the contents of this collection use set_tags.
The tags to add to the resource. A tag is a key-value pair.
sourcepub fn build(self) -> Result<CreateFleetInput, BuildError>
pub fn build(self) -> Result<CreateFleetInput, BuildError>
Consumes the builder and constructs a CreateFleetInput.
Examples found in repository?
src/client.rs (line 887)
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateFleet,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateFleetError>,
> {
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::CreateFleetOutput,
aws_smithy_http::result::SdkError<crate::error::CreateFleetError>,
> {
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
}