aws_sdk_lightsail/client/
attach_certificate_to_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 [`AttachCertificateToDistribution`](crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`distribution_name(impl Into<String>)`](crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder::distribution_name) / [`set_distribution_name(Option<String>)`](crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder::set_distribution_name):<br>required: **true**<br><p>The name of the distribution that the certificate will be attached to.</p> <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p><br>
7    ///   - [`certificate_name(impl Into<String>)`](crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder::certificate_name) / [`set_certificate_name(Option<String>)`](crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder::set_certificate_name):<br>required: **true**<br><p>The name of the certificate to attach to a distribution.</p> <p>Only certificates with a status of <code>ISSUED</code> can be attached to a distribution.</p> <p>Use the <code>GetCertificates</code> action to get a list of certificate names that you can specify.</p><note>  <p>This is the name of the certificate resource type and is used only to reference the certificate in other API actions. It can be different than the domain name of the certificate. For example, your certificate name might be <code>WordPress-Blog-Certificate</code> and the domain name of the certificate might be <code>example.com</code>.</p> </note><br>
8    /// - On success, responds with [`AttachCertificateToDistributionOutput`](crate::operation::attach_certificate_to_distribution::AttachCertificateToDistributionOutput) with field(s):
9    ///   - [`operation(Option<Operation>)`](crate::operation::attach_certificate_to_distribution::AttachCertificateToDistributionOutput::operation): <p>An object that describes 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>
10    /// - On failure, responds with [`SdkError<AttachCertificateToDistributionError>`](crate::operation::attach_certificate_to_distribution::AttachCertificateToDistributionError)
11    pub fn attach_certificate_to_distribution(
12        &self,
13    ) -> crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder {
14        crate::operation::attach_certificate_to_distribution::builders::AttachCertificateToDistributionFluentBuilder::new(self.handle.clone())
15    }
16}