Skip to main content

aws_sdk_ec2/types/
_ipam_discovery_failure_reason.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The discovery failure reason.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct IpamDiscoveryFailureReason {
7    /// <p>The discovery failure code.</p>
8    /// <ul>
9    /// <li>
10    /// <p><code>assume-role-failure</code> - IPAM could not assume the Amazon Web Services IAM service-linked role. This could be because of any of the following:</p>
11    /// <ul>
12    /// <li>
13    /// <p>SLR has not been created yet and IPAM is still creating it.</p></li>
14    /// <li>
15    /// <p>You have opted-out of the IPAM home Region.</p></li>
16    /// <li>
17    /// <p>Account you are using as your IPAM account has been suspended.</p></li>
18    /// </ul></li>
19    /// <li>
20    /// <p><code>throttling-failure</code> - IPAM account is already using the allotted transactions per second and IPAM is receiving a throttling error when assuming the Amazon Web Services IAM SLR.</p></li>
21    /// <li>
22    /// <p><code>unauthorized-failure</code> - Amazon Web Services account making the request is not authorized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">AuthFailure</a> in the <i>Amazon Elastic Compute Cloud API Reference</i>.</p></li>
23    /// </ul>
24    pub code: ::std::option::Option<crate::types::IpamDiscoveryFailureCode>,
25    /// <p>The discovery failure message.</p>
26    pub message: ::std::option::Option<::std::string::String>,
27}
28impl IpamDiscoveryFailureReason {
29    /// <p>The discovery failure code.</p>
30    /// <ul>
31    /// <li>
32    /// <p><code>assume-role-failure</code> - IPAM could not assume the Amazon Web Services IAM service-linked role. This could be because of any of the following:</p>
33    /// <ul>
34    /// <li>
35    /// <p>SLR has not been created yet and IPAM is still creating it.</p></li>
36    /// <li>
37    /// <p>You have opted-out of the IPAM home Region.</p></li>
38    /// <li>
39    /// <p>Account you are using as your IPAM account has been suspended.</p></li>
40    /// </ul></li>
41    /// <li>
42    /// <p><code>throttling-failure</code> - IPAM account is already using the allotted transactions per second and IPAM is receiving a throttling error when assuming the Amazon Web Services IAM SLR.</p></li>
43    /// <li>
44    /// <p><code>unauthorized-failure</code> - Amazon Web Services account making the request is not authorized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">AuthFailure</a> in the <i>Amazon Elastic Compute Cloud API Reference</i>.</p></li>
45    /// </ul>
46    pub fn code(&self) -> ::std::option::Option<&crate::types::IpamDiscoveryFailureCode> {
47        self.code.as_ref()
48    }
49    /// <p>The discovery failure message.</p>
50    pub fn message(&self) -> ::std::option::Option<&str> {
51        self.message.as_deref()
52    }
53}
54impl IpamDiscoveryFailureReason {
55    /// Creates a new builder-style object to manufacture [`IpamDiscoveryFailureReason`](crate::types::IpamDiscoveryFailureReason).
56    pub fn builder() -> crate::types::builders::IpamDiscoveryFailureReasonBuilder {
57        crate::types::builders::IpamDiscoveryFailureReasonBuilder::default()
58    }
59}
60
61/// A builder for [`IpamDiscoveryFailureReason`](crate::types::IpamDiscoveryFailureReason).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct IpamDiscoveryFailureReasonBuilder {
65    pub(crate) code: ::std::option::Option<crate::types::IpamDiscoveryFailureCode>,
66    pub(crate) message: ::std::option::Option<::std::string::String>,
67}
68impl IpamDiscoveryFailureReasonBuilder {
69    /// <p>The discovery failure code.</p>
70    /// <ul>
71    /// <li>
72    /// <p><code>assume-role-failure</code> - IPAM could not assume the Amazon Web Services IAM service-linked role. This could be because of any of the following:</p>
73    /// <ul>
74    /// <li>
75    /// <p>SLR has not been created yet and IPAM is still creating it.</p></li>
76    /// <li>
77    /// <p>You have opted-out of the IPAM home Region.</p></li>
78    /// <li>
79    /// <p>Account you are using as your IPAM account has been suspended.</p></li>
80    /// </ul></li>
81    /// <li>
82    /// <p><code>throttling-failure</code> - IPAM account is already using the allotted transactions per second and IPAM is receiving a throttling error when assuming the Amazon Web Services IAM SLR.</p></li>
83    /// <li>
84    /// <p><code>unauthorized-failure</code> - Amazon Web Services account making the request is not authorized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">AuthFailure</a> in the <i>Amazon Elastic Compute Cloud API Reference</i>.</p></li>
85    /// </ul>
86    pub fn code(mut self, input: crate::types::IpamDiscoveryFailureCode) -> Self {
87        self.code = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>The discovery failure code.</p>
91    /// <ul>
92    /// <li>
93    /// <p><code>assume-role-failure</code> - IPAM could not assume the Amazon Web Services IAM service-linked role. This could be because of any of the following:</p>
94    /// <ul>
95    /// <li>
96    /// <p>SLR has not been created yet and IPAM is still creating it.</p></li>
97    /// <li>
98    /// <p>You have opted-out of the IPAM home Region.</p></li>
99    /// <li>
100    /// <p>Account you are using as your IPAM account has been suspended.</p></li>
101    /// </ul></li>
102    /// <li>
103    /// <p><code>throttling-failure</code> - IPAM account is already using the allotted transactions per second and IPAM is receiving a throttling error when assuming the Amazon Web Services IAM SLR.</p></li>
104    /// <li>
105    /// <p><code>unauthorized-failure</code> - Amazon Web Services account making the request is not authorized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">AuthFailure</a> in the <i>Amazon Elastic Compute Cloud API Reference</i>.</p></li>
106    /// </ul>
107    pub fn set_code(mut self, input: ::std::option::Option<crate::types::IpamDiscoveryFailureCode>) -> Self {
108        self.code = input;
109        self
110    }
111    /// <p>The discovery failure code.</p>
112    /// <ul>
113    /// <li>
114    /// <p><code>assume-role-failure</code> - IPAM could not assume the Amazon Web Services IAM service-linked role. This could be because of any of the following:</p>
115    /// <ul>
116    /// <li>
117    /// <p>SLR has not been created yet and IPAM is still creating it.</p></li>
118    /// <li>
119    /// <p>You have opted-out of the IPAM home Region.</p></li>
120    /// <li>
121    /// <p>Account you are using as your IPAM account has been suspended.</p></li>
122    /// </ul></li>
123    /// <li>
124    /// <p><code>throttling-failure</code> - IPAM account is already using the allotted transactions per second and IPAM is receiving a throttling error when assuming the Amazon Web Services IAM SLR.</p></li>
125    /// <li>
126    /// <p><code>unauthorized-failure</code> - Amazon Web Services account making the request is not authorized. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html">AuthFailure</a> in the <i>Amazon Elastic Compute Cloud API Reference</i>.</p></li>
127    /// </ul>
128    pub fn get_code(&self) -> &::std::option::Option<crate::types::IpamDiscoveryFailureCode> {
129        &self.code
130    }
131    /// <p>The discovery failure message.</p>
132    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.message = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>The discovery failure message.</p>
137    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.message = input;
139        self
140    }
141    /// <p>The discovery failure message.</p>
142    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
143        &self.message
144    }
145    /// Consumes the builder and constructs a [`IpamDiscoveryFailureReason`](crate::types::IpamDiscoveryFailureReason).
146    pub fn build(self) -> crate::types::IpamDiscoveryFailureReason {
147        crate::types::IpamDiscoveryFailureReason {
148            code: self.code,
149            message: self.message,
150        }
151    }
152}