Struct aws_sdk_cloudfront::input::publish_function_input::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for PublishFunctionInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the function that you are publishing.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the function that you are publishing.
sourcepub fn if_match(self, input: impl Into<String>) -> Self
pub fn if_match(self, input: impl Into<String>) -> Self
The current version (ETag
value) of the function that you are publishing, which you can get using DescribeFunction
.
sourcepub fn set_if_match(self, input: Option<String>) -> Self
pub fn set_if_match(self, input: Option<String>) -> Self
The current version (ETag
value) of the function that you are publishing, which you can get using DescribeFunction
.
sourcepub fn build(self) -> Result<PublishFunctionInput, BuildError>
pub fn build(self) -> Result<PublishFunctionInput, BuildError>
Consumes the builder and constructs a PublishFunctionInput
.
Examples found in repository?
src/client.rs (line 8194)
8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::PublishFunction,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::PublishFunctionError>,
> {
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::PublishFunctionOutput,
aws_smithy_http::result::SdkError<crate::error::PublishFunctionError>,
> {
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
}