aws_sdk_cloudfront/types/
_alias_icp_recordal.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Amazon Web Services services in China customers must file for an Internet Content Provider (ICP) recordal if they want to serve content publicly on an alternate domain name, also known as a CNAME, that they've added to CloudFront. AliasICPRecordal provides the ICP recordal status for CNAMEs associated with distributions. The status is returned in the CloudFront response; you can't configure it yourself.</p>
4/// <p>For more information about ICP recordals, see <a href="https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html"> Signup, Accounts, and Credentials</a> in <i>Getting Started with Amazon Web Services services in China</i>.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct AliasIcpRecordal {
8    /// <p>A domain name associated with a distribution.</p>
9    pub cname: ::std::option::Option<::std::string::String>,
10    /// <p>The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in Amazon Web Services Regions outside of China.</p>
11    /// <p>The status values returned are the following:</p>
12    /// <ul>
13    /// <li>
14    /// <p><b>APPROVED</b> indicates that the associated CNAME has a valid ICP recordal number. Multiple CNAMEs can be associated with a distribution, and CNAMEs can correspond to different ICP recordals. To be marked as APPROVED, that is, valid to use with the China Regions, a CNAME must have one ICP recordal number associated with it.</p></li>
15    /// <li>
16    /// <p><b>SUSPENDED</b> indicates that the associated CNAME does not have a valid ICP recordal number.</p></li>
17    /// <li>
18    /// <p><b>PENDING</b> indicates that CloudFront can't determine the ICP recordal status of the CNAME associated with the distribution because there was an error in trying to determine the status. You can try again to see if the error is resolved in which case CloudFront returns an APPROVED or SUSPENDED status.</p></li>
19    /// </ul>
20    pub icp_recordal_status: ::std::option::Option<crate::types::IcpRecordalStatus>,
21}
22impl AliasIcpRecordal {
23    /// <p>A domain name associated with a distribution.</p>
24    pub fn cname(&self) -> ::std::option::Option<&str> {
25        self.cname.as_deref()
26    }
27    /// <p>The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in Amazon Web Services Regions outside of China.</p>
28    /// <p>The status values returned are the following:</p>
29    /// <ul>
30    /// <li>
31    /// <p><b>APPROVED</b> indicates that the associated CNAME has a valid ICP recordal number. Multiple CNAMEs can be associated with a distribution, and CNAMEs can correspond to different ICP recordals. To be marked as APPROVED, that is, valid to use with the China Regions, a CNAME must have one ICP recordal number associated with it.</p></li>
32    /// <li>
33    /// <p><b>SUSPENDED</b> indicates that the associated CNAME does not have a valid ICP recordal number.</p></li>
34    /// <li>
35    /// <p><b>PENDING</b> indicates that CloudFront can't determine the ICP recordal status of the CNAME associated with the distribution because there was an error in trying to determine the status. You can try again to see if the error is resolved in which case CloudFront returns an APPROVED or SUSPENDED status.</p></li>
36    /// </ul>
37    pub fn icp_recordal_status(&self) -> ::std::option::Option<&crate::types::IcpRecordalStatus> {
38        self.icp_recordal_status.as_ref()
39    }
40}
41impl AliasIcpRecordal {
42    /// Creates a new builder-style object to manufacture [`AliasIcpRecordal`](crate::types::AliasIcpRecordal).
43    pub fn builder() -> crate::types::builders::AliasIcpRecordalBuilder {
44        crate::types::builders::AliasIcpRecordalBuilder::default()
45    }
46}
47
48/// A builder for [`AliasIcpRecordal`](crate::types::AliasIcpRecordal).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct AliasIcpRecordalBuilder {
52    pub(crate) cname: ::std::option::Option<::std::string::String>,
53    pub(crate) icp_recordal_status: ::std::option::Option<crate::types::IcpRecordalStatus>,
54}
55impl AliasIcpRecordalBuilder {
56    /// <p>A domain name associated with a distribution.</p>
57    pub fn cname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
58        self.cname = ::std::option::Option::Some(input.into());
59        self
60    }
61    /// <p>A domain name associated with a distribution.</p>
62    pub fn set_cname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
63        self.cname = input;
64        self
65    }
66    /// <p>A domain name associated with a distribution.</p>
67    pub fn get_cname(&self) -> &::std::option::Option<::std::string::String> {
68        &self.cname
69    }
70    /// <p>The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in Amazon Web Services Regions outside of China.</p>
71    /// <p>The status values returned are the following:</p>
72    /// <ul>
73    /// <li>
74    /// <p><b>APPROVED</b> indicates that the associated CNAME has a valid ICP recordal number. Multiple CNAMEs can be associated with a distribution, and CNAMEs can correspond to different ICP recordals. To be marked as APPROVED, that is, valid to use with the China Regions, a CNAME must have one ICP recordal number associated with it.</p></li>
75    /// <li>
76    /// <p><b>SUSPENDED</b> indicates that the associated CNAME does not have a valid ICP recordal number.</p></li>
77    /// <li>
78    /// <p><b>PENDING</b> indicates that CloudFront can't determine the ICP recordal status of the CNAME associated with the distribution because there was an error in trying to determine the status. You can try again to see if the error is resolved in which case CloudFront returns an APPROVED or SUSPENDED status.</p></li>
79    /// </ul>
80    pub fn icp_recordal_status(mut self, input: crate::types::IcpRecordalStatus) -> Self {
81        self.icp_recordal_status = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in Amazon Web Services Regions outside of China.</p>
85    /// <p>The status values returned are the following:</p>
86    /// <ul>
87    /// <li>
88    /// <p><b>APPROVED</b> indicates that the associated CNAME has a valid ICP recordal number. Multiple CNAMEs can be associated with a distribution, and CNAMEs can correspond to different ICP recordals. To be marked as APPROVED, that is, valid to use with the China Regions, a CNAME must have one ICP recordal number associated with it.</p></li>
89    /// <li>
90    /// <p><b>SUSPENDED</b> indicates that the associated CNAME does not have a valid ICP recordal number.</p></li>
91    /// <li>
92    /// <p><b>PENDING</b> indicates that CloudFront can't determine the ICP recordal status of the CNAME associated with the distribution because there was an error in trying to determine the status. You can try again to see if the error is resolved in which case CloudFront returns an APPROVED or SUSPENDED status.</p></li>
93    /// </ul>
94    pub fn set_icp_recordal_status(mut self, input: ::std::option::Option<crate::types::IcpRecordalStatus>) -> Self {
95        self.icp_recordal_status = input;
96        self
97    }
98    /// <p>The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in Amazon Web Services Regions outside of China.</p>
99    /// <p>The status values returned are the following:</p>
100    /// <ul>
101    /// <li>
102    /// <p><b>APPROVED</b> indicates that the associated CNAME has a valid ICP recordal number. Multiple CNAMEs can be associated with a distribution, and CNAMEs can correspond to different ICP recordals. To be marked as APPROVED, that is, valid to use with the China Regions, a CNAME must have one ICP recordal number associated with it.</p></li>
103    /// <li>
104    /// <p><b>SUSPENDED</b> indicates that the associated CNAME does not have a valid ICP recordal number.</p></li>
105    /// <li>
106    /// <p><b>PENDING</b> indicates that CloudFront can't determine the ICP recordal status of the CNAME associated with the distribution because there was an error in trying to determine the status. You can try again to see if the error is resolved in which case CloudFront returns an APPROVED or SUSPENDED status.</p></li>
107    /// </ul>
108    pub fn get_icp_recordal_status(&self) -> &::std::option::Option<crate::types::IcpRecordalStatus> {
109        &self.icp_recordal_status
110    }
111    /// Consumes the builder and constructs a [`AliasIcpRecordal`](crate::types::AliasIcpRecordal).
112    pub fn build(self) -> crate::types::AliasIcpRecordal {
113        crate::types::AliasIcpRecordal {
114            cname: self.cname,
115            icp_recordal_status: self.icp_recordal_status,
116        }
117    }
118}