describe_nat_gateways
¶
describe_nat_gateways(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
filter: Optional[FilterList] = None,
max_results: Optional[DescribeNatGatewaysMaxResults] = None,
nat_gateway_ids: Optional[NatGatewayIdStringList] = None,
next_token: Optional[String] = None,
) -> DescribeNatGatewaysResult
Describes your NAT gateways. The default is to describe all your NAT gateways. Alternatively, you can specify specific NAT gateway IDs or filter the results to include only the NAT gateways that match specific criteria.
Parameters:
-
dry_run(Optional[Boolean], default:None) –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
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
filter(Optional[FilterList], default:None) –The filters.
-
nat-gateway-id- The ID of the NAT gateway. -
state- The state of the NAT gateway (pending|failed|available|deleting|deleted). -
subnet-id- The ID of the subnet in which the NAT gateway resides. -
tag- The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the keyOwnerand the valueTeamA, specifytag:Ownerfor the filter name andTeamAfor the filter value. -
tag-key- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. -
vpc-id- The ID of the VPC in which the NAT gateway resides.
-
-
max_results(Optional[DescribeNatGatewaysMaxResults], default:None) –The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
-
nat_gateway_ids(Optional[NatGatewayIdStringList], default:None) –The IDs of the NAT gateways.
-
next_token(Optional[String], default:None) –The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe a NAT gateway This example describes the NAT gateway for the specified VPC.
Source code in docs_src/capo_ec2/_services/ec2.py
29971 29972 29973 29974 29975 29976 29977 29978 29979 29980 29981 29982 29983 29984 29985 29986 29987 29988 29989 29990 29991 29992 29993 29994 29995 29996 29997 29998 29999 30000 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 30011 30012 30013 30014 30015 30016 30017 30018 30019 30020 30021 30022 30023 30024 30025 30026 30027 30028 30029 30030 30031 30032 30033 30034 30035 30036 30037 30038 30039 | |