1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains the parameters for CreateCustomerGateway.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateCustomerGatewayInput {
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Default: 65000</p>
/// <p>Valid values: <code>1</code> to <code>2,147,483,647</code></p>
pub bgp_asn: ::std::option::Option<i32>,
/// <p><i>This member has been deprecated.</i> The Internet-routable IP address for the customer gateway's outside interface. The address must be static.</p>
pub public_ip: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub certificate_arn: ::std::option::Option<::std::string::String>,
/// <p>The type of VPN connection that this customer gateway supports (<code>ipsec.1</code>).</p>
pub r#type: ::std::option::Option<crate::types::GatewayType>,
/// <p>The tags to apply to the customer gateway.</p>
pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub device_name: ::std::option::Option<::std::string::String>,
/// <p>The IP address for the customer gateway device's outside interface. The address must be static. If <code>OutsideIpAddressType</code> in your VPN connection options is set to <code>PrivateIpv4</code>, you can use an RFC6598 or RFC1918 private IPv4 address. If <code>OutsideIpAddressType</code> is set to <code>Ipv6</code>, you can use an IPv6 address.</p>
pub ip_address: ::std::option::Option<::std::string::String>,
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Valid values: <code>2,147,483,648</code> to <code>4,294,967,295</code></p>
pub bgp_asn_extended: ::std::option::Option<i64>,
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub dry_run: ::std::option::Option<bool>,
}
impl CreateCustomerGatewayInput {
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Default: 65000</p>
/// <p>Valid values: <code>1</code> to <code>2,147,483,647</code></p>
pub fn bgp_asn(&self) -> ::std::option::Option<i32> {
self.bgp_asn
}
/// <p><i>This member has been deprecated.</i> The Internet-routable IP address for the customer gateway's outside interface. The address must be static.</p>
pub fn public_ip(&self) -> ::std::option::Option<&str> {
self.public_ip.as_deref()
}
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
self.certificate_arn.as_deref()
}
/// <p>The type of VPN connection that this customer gateway supports (<code>ipsec.1</code>).</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::GatewayType> {
self.r#type.as_ref()
}
/// <p>The tags to apply to the customer gateway.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_specifications.is_none()`.
pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
self.tag_specifications.as_deref().unwrap_or_default()
}
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub fn device_name(&self) -> ::std::option::Option<&str> {
self.device_name.as_deref()
}
/// <p>The IP address for the customer gateway device's outside interface. The address must be static. If <code>OutsideIpAddressType</code> in your VPN connection options is set to <code>PrivateIpv4</code>, you can use an RFC6598 or RFC1918 private IPv4 address. If <code>OutsideIpAddressType</code> is set to <code>Ipv6</code>, you can use an IPv6 address.</p>
pub fn ip_address(&self) -> ::std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Valid values: <code>2,147,483,648</code> to <code>4,294,967,295</code></p>
pub fn bgp_asn_extended(&self) -> ::std::option::Option<i64> {
self.bgp_asn_extended
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn dry_run(&self) -> ::std::option::Option<bool> {
self.dry_run
}
}
impl CreateCustomerGatewayInput {
/// Creates a new builder-style object to manufacture [`CreateCustomerGatewayInput`](crate::operation::create_customer_gateway::CreateCustomerGatewayInput).
pub fn builder() -> crate::operation::create_customer_gateway::builders::CreateCustomerGatewayInputBuilder {
crate::operation::create_customer_gateway::builders::CreateCustomerGatewayInputBuilder::default()
}
}
/// A builder for [`CreateCustomerGatewayInput`](crate::operation::create_customer_gateway::CreateCustomerGatewayInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateCustomerGatewayInputBuilder {
pub(crate) bgp_asn: ::std::option::Option<i32>,
pub(crate) public_ip: ::std::option::Option<::std::string::String>,
pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::GatewayType>,
pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
pub(crate) device_name: ::std::option::Option<::std::string::String>,
pub(crate) ip_address: ::std::option::Option<::std::string::String>,
pub(crate) bgp_asn_extended: ::std::option::Option<i64>,
pub(crate) dry_run: ::std::option::Option<bool>,
}
impl CreateCustomerGatewayInputBuilder {
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Default: 65000</p>
/// <p>Valid values: <code>1</code> to <code>2,147,483,647</code></p>
pub fn bgp_asn(mut self, input: i32) -> Self {
self.bgp_asn = ::std::option::Option::Some(input);
self
}
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Default: 65000</p>
/// <p>Valid values: <code>1</code> to <code>2,147,483,647</code></p>
pub fn set_bgp_asn(mut self, input: ::std::option::Option<i32>) -> Self {
self.bgp_asn = input;
self
}
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Default: 65000</p>
/// <p>Valid values: <code>1</code> to <code>2,147,483,647</code></p>
pub fn get_bgp_asn(&self) -> &::std::option::Option<i32> {
&self.bgp_asn
}
/// <p><i>This member has been deprecated.</i> The Internet-routable IP address for the customer gateway's outside interface. The address must be static.</p>
pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.public_ip = ::std::option::Option::Some(input.into());
self
}
/// <p><i>This member has been deprecated.</i> The Internet-routable IP address for the customer gateway's outside interface. The address must be static.</p>
pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.public_ip = input;
self
}
/// <p><i>This member has been deprecated.</i> The Internet-routable IP address for the customer gateway's outside interface. The address must be static.</p>
pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
&self.public_ip
}
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the customer gateway certificate.</p>
pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_arn
}
/// <p>The type of VPN connection that this customer gateway supports (<code>ipsec.1</code>).</p>
/// This field is required.
pub fn r#type(mut self, input: crate::types::GatewayType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of VPN connection that this customer gateway supports (<code>ipsec.1</code>).</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::GatewayType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of VPN connection that this customer gateway supports (<code>ipsec.1</code>).</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::GatewayType> {
&self.r#type
}
/// Appends an item to `tag_specifications`.
///
/// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
///
/// <p>The tags to apply to the customer gateway.</p>
pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
let mut v = self.tag_specifications.unwrap_or_default();
v.push(input);
self.tag_specifications = ::std::option::Option::Some(v);
self
}
/// <p>The tags to apply to the customer gateway.</p>
pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
self.tag_specifications = input;
self
}
/// <p>The tags to apply to the customer gateway.</p>
pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
&self.tag_specifications
}
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.device_name = ::std::option::Option::Some(input.into());
self
}
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.device_name = input;
self
}
/// <p>A name for the customer gateway device.</p>
/// <p>Length Constraints: Up to 255 characters.</p>
pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
&self.device_name
}
/// <p>The IP address for the customer gateway device's outside interface. The address must be static. If <code>OutsideIpAddressType</code> in your VPN connection options is set to <code>PrivateIpv4</code>, you can use an RFC6598 or RFC1918 private IPv4 address. If <code>OutsideIpAddressType</code> is set to <code>Ipv6</code>, you can use an IPv6 address.</p>
pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ip_address = ::std::option::Option::Some(input.into());
self
}
/// <p>The IP address for the customer gateway device's outside interface. The address must be static. If <code>OutsideIpAddressType</code> in your VPN connection options is set to <code>PrivateIpv4</code>, you can use an RFC6598 or RFC1918 private IPv4 address. If <code>OutsideIpAddressType</code> is set to <code>Ipv6</code>, you can use an IPv6 address.</p>
pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>The IP address for the customer gateway device's outside interface. The address must be static. If <code>OutsideIpAddressType</code> in your VPN connection options is set to <code>PrivateIpv4</code>, you can use an RFC6598 or RFC1918 private IPv4 address. If <code>OutsideIpAddressType</code> is set to <code>Ipv6</code>, you can use an IPv6 address.</p>
pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
&self.ip_address
}
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Valid values: <code>2,147,483,648</code> to <code>4,294,967,295</code></p>
pub fn bgp_asn_extended(mut self, input: i64) -> Self {
self.bgp_asn_extended = ::std::option::Option::Some(input);
self
}
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Valid values: <code>2,147,483,648</code> to <code>4,294,967,295</code></p>
pub fn set_bgp_asn_extended(mut self, input: ::std::option::Option<i64>) -> Self {
self.bgp_asn_extended = input;
self
}
/// <p>For customer gateway devices that support BGP, specify the device's ASN. You must specify either <code>BgpAsn</code> or <code>BgpAsnExtended</code> when creating the customer gateway. If the ASN is larger than <code>2,147,483,647</code>, you must use <code>BgpAsnExtended</code>.</p>
/// <p>Valid values: <code>2,147,483,648</code> to <code>4,294,967,295</code></p>
pub fn get_bgp_asn_extended(&self) -> &::std::option::Option<i64> {
&self.bgp_asn_extended
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.dry_run = ::std::option::Option::Some(input);
self
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
self.dry_run = input;
self
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
&self.dry_run
}
/// Consumes the builder and constructs a [`CreateCustomerGatewayInput`](crate::operation::create_customer_gateway::CreateCustomerGatewayInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_customer_gateway::CreateCustomerGatewayInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_customer_gateway::CreateCustomerGatewayInput {
bgp_asn: self.bgp_asn,
public_ip: self.public_ip,
certificate_arn: self.certificate_arn,
r#type: self.r#type,
tag_specifications: self.tag_specifications,
device_name: self.device_name,
ip_address: self.ip_address,
bgp_asn_extended: self.bgp_asn_extended,
dry_run: self.dry_run,
})
}
}