describeNatGateways
inline suspend fun Ec2Client.describeNatGateways(crossinline block: DescribeNatGatewaysRequest.Builder.() -> Unit): DescribeNatGatewaysResponse
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.
Samples
import aws.sdk.kotlin.services.ec2.model.Filter
fun main() {
//sampleStart
// This example describes the NAT gateway for the specified VPC.
val resp = ec2Client.describeNatGateways {
filter = listOf<Filter>(
Filter {
name = "vpc-id"
values = listOf<String>(
"vpc-1a2b3c4d"
)
}
)
}
//sampleEnd
}