AddNatGatewayOptions Struct
Options for adding a NAT gateway to a public subnet.
| Source | aws-ec2/lib/vpc.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const addNatGatewayOptions: ec2.AddNatGatewayOptions = {
maxDrainDuration: cdk.Duration.minutes(30),
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2
add_nat_gateway_options = ec2.AddNatGatewayOptions(
max_drain_duration=cdk.Duration.minutes(30)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
AddNatGatewayOptions addNatGatewayOptions = AddNatGatewayOptions.builder()
.maxDrainDuration(Duration.minutes(30))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
var addNatGatewayOptions = new AddNatGatewayOptions {
MaxDrainDuration = Duration.Minutes(30)
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
addNatGatewayOptions := &AddNatGatewayOptions{
MaxDrainDuration: cdk.Duration_Minutes(jsii.Number(30)),
}