pub struct UpdateDistribution { /* private fields */ }
Expand description
Fluent builder constructing a request to UpdateDistribution
.
Updates the configuration for a CloudFront distribution.
The update process includes getting the current distribution configuration, updating it to make your changes, and then submitting an UpdateDistribution
request to make the updates.
To update a web distribution using the CloudFront API
-
Use
GetDistributionConfig
to get the current configuration, including the version identifier (ETag
). -
Update the distribution configuration that was returned in the response. Note the following important requirements and restrictions:
-
You must rename the
ETag
field toIfMatch
, leaving the value unchanged. (Set the value ofIfMatch
to the value ofETag
, then remove theETag
field.) -
You can't change the value of
CallerReference
.
-
-
Submit an
UpdateDistribution
request, providing the distribution configuration. The new configuration replaces the existing configuration. The values that you specify in anUpdateDistribution
request are not merged into your existing configuration. Make sure to include all fields: the ones that you modified and also the ones that you didn't.
Implementations§
source§impl UpdateDistribution
impl UpdateDistribution
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<UpdateDistribution, AwsResponseRetryClassifier>, SdkError<UpdateDistributionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<UpdateDistribution, AwsResponseRetryClassifier>, SdkError<UpdateDistributionError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<UpdateDistributionOutput, SdkError<UpdateDistributionError>>
pub async fn send(
self
) -> Result<UpdateDistributionOutput, SdkError<UpdateDistributionError>>
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, which can be set when configuring the client.
sourcepub fn distribution_config(self, input: DistributionConfig) -> Self
pub fn distribution_config(self, input: DistributionConfig) -> Self
The distribution's configuration information.
sourcepub fn set_distribution_config(self, input: Option<DistributionConfig>) -> Self
pub fn set_distribution_config(self, input: Option<DistributionConfig>) -> Self
The distribution's configuration information.
sourcepub fn if_match(self, input: impl Into<String>) -> Self
pub fn if_match(self, input: impl Into<String>) -> Self
The value of the ETag
header that you received when retrieving the distribution's configuration. For example: E2QWRUHAPOMQZL
.
sourcepub fn set_if_match(self, input: Option<String>) -> Self
pub fn set_if_match(self, input: Option<String>) -> Self
The value of the ETag
header that you received when retrieving the distribution's configuration. For example: E2QWRUHAPOMQZL
.
Trait Implementations§
source§impl Clone for UpdateDistribution
impl Clone for UpdateDistribution
source§fn clone(&self) -> UpdateDistribution
fn clone(&self) -> UpdateDistribution
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more