Struct aws_sdk_amplifybackend::input::create_backend_input::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for CreateBackendInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_app_id(self, input: Option<String>) -> Self
pub fn set_app_id(self, input: Option<String>) -> Self
The app ID.
sourcepub fn set_app_name(self, input: Option<String>) -> Self
pub fn set_app_name(self, input: Option<String>) -> Self
The name of the app.
sourcepub fn backend_environment_name(self, input: impl Into<String>) -> Self
pub fn backend_environment_name(self, input: impl Into<String>) -> Self
The name of the backend environment.
sourcepub fn set_backend_environment_name(self, input: Option<String>) -> Self
pub fn set_backend_environment_name(self, input: Option<String>) -> Self
The name of the backend environment.
sourcepub fn resource_config(self, input: ResourceConfig) -> Self
pub fn resource_config(self, input: ResourceConfig) -> Self
The resource configuration for creating a backend.
sourcepub fn set_resource_config(self, input: Option<ResourceConfig>) -> Self
pub fn set_resource_config(self, input: Option<ResourceConfig>) -> Self
The resource configuration for creating a backend.
sourcepub fn resource_name(self, input: impl Into<String>) -> Self
pub fn resource_name(self, input: impl Into<String>) -> Self
The name of the resource.
sourcepub fn set_resource_name(self, input: Option<String>) -> Self
pub fn set_resource_name(self, input: Option<String>) -> Self
The name of the resource.
sourcepub fn build(self) -> Result<CreateBackendInput, BuildError>
pub fn build(self) -> Result<CreateBackendInput, BuildError>
Consumes the builder and constructs a CreateBackendInput.
Examples found in repository?
src/client.rs (line 729)
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateBackend,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateBackendError>,
> {
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::CreateBackendOutput,
aws_smithy_http::result::SdkError<crate::error::CreateBackendError>,
> {
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
}