Struct aws_sdk_ec2::model::NatGateway
source · #[non_exhaustive]pub struct NatGateway { /* private fields */ }
Expand description
Describes a NAT gateway.
Implementations§
source§impl NatGateway
impl NatGateway
sourcepub fn create_time(&self) -> Option<&DateTime>
pub fn create_time(&self) -> Option<&DateTime>
The date and time the NAT gateway was created.
sourcepub fn delete_time(&self) -> Option<&DateTime>
pub fn delete_time(&self) -> Option<&DateTime>
The date and time the NAT gateway was deleted, if applicable.
sourcepub fn failure_code(&self) -> Option<&str>
pub fn failure_code(&self) -> Option<&str>
If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet
| Gateway.NotAttached
| InvalidAllocationID.NotFound
| Resource.AlreadyAssociated
| InternalError
| InvalidSubnetID.NotFound
)
sourcepub fn failure_message(&self) -> Option<&str>
pub fn failure_message(&self) -> Option<&str>
If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.
-
For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"
-
For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"
-
For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"
-
For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"
-
For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."
-
For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."
sourcepub fn nat_gateway_addresses(&self) -> Option<&[NatGatewayAddress]>
pub fn nat_gateway_addresses(&self) -> Option<&[NatGatewayAddress]>
Information about the IP addresses and network interface associated with the NAT gateway.
sourcepub fn nat_gateway_id(&self) -> Option<&str>
pub fn nat_gateway_id(&self) -> Option<&str>
The ID of the NAT gateway.
sourcepub fn provisioned_bandwidth(&self) -> Option<&ProvisionedBandwidth>
pub fn provisioned_bandwidth(&self) -> Option<&ProvisionedBandwidth>
Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center.
sourcepub fn state(&self) -> Option<&NatGatewayState>
pub fn state(&self) -> Option<&NatGatewayState>
The state of the NAT gateway.
-
pending
: The NAT gateway is being created and is not ready to process traffic. -
failed
: The NAT gateway could not be created. Check thefailureCode
andfailureMessage
fields for the reason. -
available
: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway. -
deleting
: The NAT gateway is in the process of being terminated and may still be processing traffic. -
deleted
: The NAT gateway has been terminated and is no longer processing traffic.
sourcepub fn subnet_id(&self) -> Option<&str>
pub fn subnet_id(&self) -> Option<&str>
The ID of the subnet in which the NAT gateway is located.
The tags for the NAT gateway.
sourcepub fn connectivity_type(&self) -> Option<&ConnectivityType>
pub fn connectivity_type(&self) -> Option<&ConnectivityType>
Indicates whether the NAT gateway supports public or private connectivity.
source§impl NatGateway
impl NatGateway
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture NatGateway
.
Examples found in repository?
28639 28640 28641 28642 28643 28644 28645 28646 28647 28648 28649 28650 28651 28652 28653 28654 28655 28656 28657 28658 28659 28660 28661 28662 28663 28664 28665 28666 28667 28668 28669 28670 28671 28672 28673 28674 28675 28676 28677 28678 28679 28680 28681 28682 28683 28684 28685 28686 28687 28688 28689 28690 28691 28692 28693 28694 28695 28696 28697 28698 28699 28700 28701 28702 28703 28704 28705 28706 28707 28708 28709 28710 28711 28712 28713 28714 28715 28716 28717 28718 28719 28720 28721 28722 28723 28724 28725 28726 28727 28728 28729 28730 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 28746 28747 28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774 28775 28776 28777 28778 28779 28780 28781 28782 28783 28784 28785 28786 28787 28788 28789 28790 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801
pub fn deser_structure_crate_model_nat_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NatGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NatGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#NatGateway$CreateTime */ => {
let var_1194 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_1194);
}
,
s if s.matches("deleteTime") /* DeleteTime com.amazonaws.ec2#NatGateway$DeleteTime */ => {
let var_1195 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_delete_time(var_1195);
}
,
s if s.matches("failureCode") /* FailureCode com.amazonaws.ec2#NatGateway$FailureCode */ => {
let var_1196 =
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_failure_code(var_1196);
}
,
s if s.matches("failureMessage") /* FailureMessage com.amazonaws.ec2#NatGateway$FailureMessage */ => {
let var_1197 =
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_failure_message(var_1197);
}
,
s if s.matches("natGatewayAddressSet") /* NatGatewayAddresses com.amazonaws.ec2#NatGateway$NatGatewayAddresses */ => {
let var_1198 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_nat_gateway_address_list(&mut tag)
?
)
;
builder = builder.set_nat_gateway_addresses(var_1198);
}
,
s if s.matches("natGatewayId") /* NatGatewayId com.amazonaws.ec2#NatGateway$NatGatewayId */ => {
let var_1199 =
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_nat_gateway_id(var_1199);
}
,
s if s.matches("provisionedBandwidth") /* ProvisionedBandwidth com.amazonaws.ec2#NatGateway$ProvisionedBandwidth */ => {
let var_1200 =
Some(
crate::xml_deser::deser_structure_crate_model_provisioned_bandwidth(&mut tag)
?
)
;
builder = builder.set_provisioned_bandwidth(var_1200);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#NatGateway$State */ => {
let var_1201 =
Some(
Result::<crate::model::NatGatewayState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::NatGatewayState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1201);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#NatGateway$SubnetId */ => {
let var_1202 =
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_1202);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#NatGateway$VpcId */ => {
let var_1203 =
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_1203);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#NatGateway$Tags */ => {
let var_1204 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1204);
}
,
s if s.matches("connectivityType") /* ConnectivityType com.amazonaws.ec2#NatGateway$ConnectivityType */ => {
let var_1205 =
Some(
Result::<crate::model::ConnectivityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ConnectivityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_connectivity_type(var_1205);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for NatGateway
impl Clone for NatGateway
source§fn clone(&self) -> NatGateway
fn clone(&self) -> NatGateway
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more