Struct aws_sdk_ec2::model::VpnGateway
source · #[non_exhaustive]pub struct VpnGateway { /* private fields */ }
Expand description
Describes a virtual private gateway.
Implementations§
source§impl VpnGateway
impl VpnGateway
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.
sourcepub fn type(&self) -> Option<&GatewayType>
pub fn type(&self) -> Option<&GatewayType>
The type of VPN connection the virtual private gateway supports.
sourcepub fn vpc_attachments(&self) -> Option<&[VpcAttachment]>
pub fn vpc_attachments(&self) -> Option<&[VpcAttachment]>
Any VPCs attached to the virtual private gateway.
sourcepub fn vpn_gateway_id(&self) -> Option<&str>
pub fn vpn_gateway_id(&self) -> Option<&str>
The ID of the virtual private gateway.
sourcepub fn amazon_side_asn(&self) -> Option<i64>
pub fn amazon_side_asn(&self) -> Option<i64>
The private Autonomous System Number (ASN) for the Amazon side of a BGP session.
Any tags assigned to the virtual private gateway.
source§impl VpnGateway
impl VpnGateway
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture VpnGateway
.
Examples found in repository?
src/xml_deser.rs (line 32284)
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for VpnGateway
impl Clone for VpnGateway
source§fn clone(&self) -> VpnGateway
fn clone(&self) -> VpnGateway
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more