aws_sdk_lightsail/client/
update_distribution.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`UpdateDistribution`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`distribution_name(impl Into<String>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::distribution_name) / [`set_distribution_name(Option<String>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_distribution_name):<br>required: **true**<br><p>The name of the distribution to update.</p> <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p><br>
7    ///   - [`origin(InputOrigin)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::origin) / [`set_origin(Option<InputOrigin>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_origin):<br>required: **false**<br><p>An object that describes the origin resource for the distribution, such as a Lightsail instance, bucket, or load balancer.</p> <p>The distribution pulls, caches, and serves content from the origin.</p><br>
8    ///   - [`default_cache_behavior(CacheBehavior)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::default_cache_behavior) / [`set_default_cache_behavior(Option<CacheBehavior>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_default_cache_behavior):<br>required: **false**<br><p>An object that describes the default cache behavior for the distribution.</p><br>
9    ///   - [`cache_behavior_settings(CacheSettings)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::cache_behavior_settings) / [`set_cache_behavior_settings(Option<CacheSettings>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_cache_behavior_settings):<br>required: **false**<br><p>An object that describes the cache behavior settings for the distribution.</p><note>  <p>The <code>cacheBehaviorSettings</code> specified in your <code>UpdateDistributionRequest</code> will replace your distribution's existing settings.</p> </note><br>
10    ///   - [`cache_behaviors(CacheBehaviorPerPath)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::cache_behaviors) / [`set_cache_behaviors(Option<Vec::<CacheBehaviorPerPath>>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_cache_behaviors):<br>required: **false**<br><p>An array of objects that describe the per-path cache behavior for the distribution.</p><br>
11    ///   - [`is_enabled(bool)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::is_enabled) / [`set_is_enabled(Option<bool>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_is_enabled):<br>required: **false**<br><p>Indicates whether to enable the distribution.</p><br>
12    ///   - [`viewer_minimum_tls_protocol_version(ViewerMinimumTlsProtocolVersionEnum)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::viewer_minimum_tls_protocol_version) / [`set_viewer_minimum_tls_protocol_version(Option<ViewerMinimumTlsProtocolVersionEnum>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_viewer_minimum_tls_protocol_version):<br>required: **false**<br><p>Use this parameter to update the minimum TLS protocol version for the SSL/TLS certificate that's attached to the distribution.</p><br>
13    ///   - [`certificate_name(impl Into<String>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::certificate_name) / [`set_certificate_name(Option<String>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_certificate_name):<br>required: **false**<br><p>The name of the SSL/TLS certificate that you want to attach to the distribution.</p> <p>Only certificates with a status of <code>ISSUED</code> can be attached to a distribution.</p> <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetCertificates.html">GetCertificates</a> action to get a list of certificate names that you can specify.</p><br>
14    ///   - [`use_default_certificate(bool)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::use_default_certificate) / [`set_use_default_certificate(Option<bool>)`](crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::set_use_default_certificate):<br>required: **false**<br><p>Indicates whether the default SSL/TLS certificate is attached to the distribution. The default value is <code>true</code>. When <code>true</code>, the distribution uses the default domain name such as <code>d111111abcdef8.cloudfront.net</code>.</p> <p>Set this value to <code>false</code> to attach a new certificate to the distribution.</p><br>
15    /// - On success, responds with [`UpdateDistributionOutput`](crate::operation::update_distribution::UpdateDistributionOutput) with field(s):
16    ///   - [`operation(Option<Operation>)`](crate::operation::update_distribution::UpdateDistributionOutput::operation): <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
17    /// - On failure, responds with [`SdkError<UpdateDistributionError>`](crate::operation::update_distribution::UpdateDistributionError)
18    pub fn update_distribution(&self) -> crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder {
19        crate::operation::update_distribution::builders::UpdateDistributionFluentBuilder::new(self.handle.clone())
20    }
21}