describe_nat_gateways
async
¶
describe_nat_gateways(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
30380 30381 30382 30383 30384 30385 30386 30387 30388 30389 30390 30391 30392 30393 30394 30395 30396 30397 30398 30399 30400 30401 30402 30403 30404 30405 30406 30407 30408 30409 30410 30411 30412 30413 30414 30415 30416 30417 30418 30419 30420 30421 30422 30423 30424 30425 30426 30427 30428 30429 30430 30431 30432 30433 30434 30435 30436 30437 30438 30439 30440 30441 30442 30443 30444 30445 30446 30447 30448 30449 | |