Struct aws_sdk_ec2::model::Subnet
source · #[non_exhaustive]pub struct Subnet { /* private fields */ }
Expand description
Describes a subnet.
Implementations§
source§impl Subnet
impl Subnet
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone of the subnet.
sourcepub fn availability_zone_id(&self) -> Option<&str>
pub fn availability_zone_id(&self) -> Option<&str>
The AZ ID of the subnet.
sourcepub fn available_ip_address_count(&self) -> Option<i32>
pub fn available_ip_address_count(&self) -> Option<i32>
The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.
sourcepub fn cidr_block(&self) -> Option<&str>
pub fn cidr_block(&self) -> Option<&str>
The IPv4 CIDR block assigned to the subnet.
sourcepub fn default_for_az(&self) -> Option<bool>
pub fn default_for_az(&self) -> Option<bool>
Indicates whether this is the default subnet for the Availability Zone.
sourcepub fn enable_lni_at_device_index(&self) -> Option<i32>
pub fn enable_lni_at_device_index(&self) -> Option<i32>
Indicates the device position for local network interfaces in this subnet. For example, 1
indicates local network interfaces in this subnet are the secondary network interface (eth1).
sourcepub fn map_public_ip_on_launch(&self) -> Option<bool>
pub fn map_public_ip_on_launch(&self) -> Option<bool>
Indicates whether instances launched in this subnet receive a public IPv4 address.
sourcepub fn map_customer_owned_ip_on_launch(&self) -> Option<bool>
pub fn map_customer_owned_ip_on_launch(&self) -> Option<bool>
Indicates whether a network interface created in this subnet (including a network interface created by RunInstances
) receives a customer-owned IPv4 address.
sourcepub fn customer_owned_ipv4_pool(&self) -> Option<&str>
pub fn customer_owned_ipv4_pool(&self) -> Option<&str>
The customer-owned IPv4 address pool associated with the subnet.
sourcepub fn state(&self) -> Option<&SubnetState>
pub fn state(&self) -> Option<&SubnetState>
The current state of the subnet.
sourcepub fn owner_id(&self) -> Option<&str>
pub fn owner_id(&self) -> Option<&str>
The ID of the Amazon Web Services account that owns the subnet.
sourcepub fn assign_ipv6_address_on_creation(&self) -> Option<bool>
pub fn assign_ipv6_address_on_creation(&self) -> Option<bool>
Indicates whether a network interface created in this subnet (including a network interface created by RunInstances
) receives an IPv6 address.
sourcepub fn ipv6_cidr_block_association_set(
&self
) -> Option<&[SubnetIpv6CidrBlockAssociation]>
pub fn ipv6_cidr_block_association_set(
&self
) -> Option<&[SubnetIpv6CidrBlockAssociation]>
Information about the IPv6 CIDR blocks associated with the subnet.
Any tags assigned to the subnet.
sourcepub fn subnet_arn(&self) -> Option<&str>
pub fn subnet_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the subnet.
sourcepub fn outpost_arn(&self) -> Option<&str>
pub fn outpost_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Outpost.
sourcepub fn enable_dns64(&self) -> Option<bool>
pub fn enable_dns64(&self) -> Option<bool>
Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.
sourcepub fn ipv6_native(&self) -> Option<bool>
pub fn ipv6_native(&self) -> Option<bool>
Indicates whether this is an IPv6 only subnet.
sourcepub fn private_dns_name_options_on_launch(
&self
) -> Option<&PrivateDnsNameOptionsOnLaunch>
pub fn private_dns_name_options_on_launch(
&self
) -> Option<&PrivateDnsNameOptionsOnLaunch>
The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.
source§impl Subnet
impl Subnet
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture Subnet
.
Examples found in repository?
26367 26368 26369 26370 26371 26372 26373 26374 26375 26376 26377 26378 26379 26380 26381 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 26392 26393 26394 26395 26396 26397 26398 26399 26400 26401 26402 26403 26404 26405 26406 26407 26408 26409 26410 26411 26412 26413 26414 26415 26416 26417 26418 26419 26420 26421 26422 26423 26424 26425 26426 26427 26428 26429 26430 26431 26432 26433 26434 26435 26436 26437 26438 26439 26440 26441 26442 26443 26444 26445 26446 26447 26448 26449 26450 26451 26452 26453 26454 26455 26456 26457 26458 26459 26460 26461 26462 26463 26464 26465 26466 26467 26468 26469 26470 26471 26472 26473 26474 26475 26476 26477 26478 26479 26480 26481 26482 26483 26484 26485 26486 26487 26488 26489 26490 26491 26492 26493 26494 26495 26496 26497 26498 26499 26500 26501 26502 26503 26504 26505 26506 26507 26508 26509 26510 26511 26512 26513 26514 26515 26516 26517 26518 26519 26520 26521 26522 26523 26524 26525 26526 26527 26528 26529 26530 26531 26532 26533 26534 26535 26536 26537 26538 26539 26540 26541 26542 26543 26544 26545 26546 26547 26548 26549 26550 26551 26552 26553 26554 26555 26556 26557 26558 26559 26560 26561 26562 26563 26564 26565 26566 26567 26568 26569 26570 26571 26572 26573 26574 26575 26576 26577 26578 26579 26580 26581 26582 26583 26584 26585 26586 26587 26588 26589 26590 26591 26592 26593 26594 26595 26596 26597 26598 26599 26600 26601 26602 26603 26604 26605 26606 26607 26608 26609 26610 26611 26612 26613 26614 26615 26616 26617 26618 26619 26620 26621 26622 26623 26624 26625 26626 26627 26628 26629 26630 26631 26632 26633 26634 26635 26636 26637 26638 26639 26640 26641 26642 26643 26644 26645 26646 26647 26648 26649 26650 26651 26652 26653 26654 26655 26656 26657 26658 26659
pub fn deser_structure_crate_model_subnet(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Subnet, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Subnet::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Subnet$AvailabilityZone */ => {
let var_1040 =
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_1040);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#Subnet$AvailabilityZoneId */ => {
let var_1041 =
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_id(var_1041);
}
,
s if s.matches("availableIpAddressCount") /* AvailableIpAddressCount com.amazonaws.ec2#Subnet$AvailableIpAddressCount */ => {
let var_1042 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_ip_address_count(var_1042);
}
,
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#Subnet$CidrBlock */ => {
let var_1043 =
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_cidr_block(var_1043);
}
,
s if s.matches("defaultForAz") /* DefaultForAz com.amazonaws.ec2#Subnet$DefaultForAz */ => {
let var_1044 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_default_for_az(var_1044);
}
,
s if s.matches("enableLniAtDeviceIndex") /* EnableLniAtDeviceIndex com.amazonaws.ec2#Subnet$EnableLniAtDeviceIndex */ => {
let var_1045 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_enable_lni_at_device_index(var_1045);
}
,
s if s.matches("mapPublicIpOnLaunch") /* MapPublicIpOnLaunch com.amazonaws.ec2#Subnet$MapPublicIpOnLaunch */ => {
let var_1046 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_map_public_ip_on_launch(var_1046);
}
,
s if s.matches("mapCustomerOwnedIpOnLaunch") /* MapCustomerOwnedIpOnLaunch com.amazonaws.ec2#Subnet$MapCustomerOwnedIpOnLaunch */ => {
let var_1047 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_map_customer_owned_ip_on_launch(var_1047);
}
,
s if s.matches("customerOwnedIpv4Pool") /* CustomerOwnedIpv4Pool com.amazonaws.ec2#Subnet$CustomerOwnedIpv4Pool */ => {
let var_1048 =
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_customer_owned_ipv4_pool(var_1048);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#Subnet$State */ => {
let var_1049 =
Some(
Result::<crate::model::SubnetState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::SubnetState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1049);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#Subnet$SubnetId */ => {
let var_1050 =
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_subnet_id(var_1050);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#Subnet$VpcId */ => {
let var_1051 =
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_vpc_id(var_1051);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Subnet$OwnerId */ => {
let var_1052 =
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_owner_id(var_1052);
}
,
s if s.matches("assignIpv6AddressOnCreation") /* AssignIpv6AddressOnCreation com.amazonaws.ec2#Subnet$AssignIpv6AddressOnCreation */ => {
let var_1053 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_assign_ipv6_address_on_creation(var_1053);
}
,
s if s.matches("ipv6CidrBlockAssociationSet") /* Ipv6CidrBlockAssociationSet com.amazonaws.ec2#Subnet$Ipv6CidrBlockAssociationSet */ => {
let var_1054 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_subnet_ipv6_cidr_block_association_set(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association_set(var_1054);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Subnet$Tags */ => {
let var_1055 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1055);
}
,
s if s.matches("subnetArn") /* SubnetArn com.amazonaws.ec2#Subnet$SubnetArn */ => {
let var_1056 =
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_subnet_arn(var_1056);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Subnet$OutpostArn */ => {
let var_1057 =
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_outpost_arn(var_1057);
}
,
s if s.matches("enableDns64") /* EnableDns64 com.amazonaws.ec2#Subnet$EnableDns64 */ => {
let var_1058 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enable_dns64(var_1058);
}
,
s if s.matches("ipv6Native") /* Ipv6Native com.amazonaws.ec2#Subnet$Ipv6Native */ => {
let var_1059 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ipv6_native(var_1059);
}
,
s if s.matches("privateDnsNameOptionsOnLaunch") /* PrivateDnsNameOptionsOnLaunch com.amazonaws.ec2#Subnet$PrivateDnsNameOptionsOnLaunch */ => {
let var_1060 =
Some(
crate::xml_deser::deser_structure_crate_model_private_dns_name_options_on_launch(&mut tag)
?
)
;
builder = builder.set_private_dns_name_options_on_launch(var_1060);
}
,
_ => {}
}
}
Ok(builder.build())
}