Package com.pulumi.aws.ec2
Class NatGatewayEipAssociation
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.NatGatewayEipAssociation
-
public class NatGatewayEipAssociation extends com.pulumi.resources.CustomResourceResource for managing an AWS VPC NAT Gateway EIP Association. > **WARNING:** You should not use the `aws.ec2.NatGatewayEipAssociation` resource in conjunction with an `aws.ec2.NatGateway` resource that has `secondaryAllocationIds` configured. Doing so may cause perpetual differences, and result in associations being overwritten. ## Example Usage ### Basic Usage
## Import Using `pulumi import`, import VPC NAT Gateway EIP Association using the `nat_gateway_id,allocation_id`. For example: ```sh $ pulumi import aws:ec2/natGatewayEipAssociation:NatGatewayEipAssociation example nat-1234567890abcdef1,eipalloc-1234567890abcdef1 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ec2.NatGatewayEipAssociation; import com.pulumi.aws.ec2.NatGatewayEipAssociationArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new NatGatewayEipAssociation("example", NatGatewayEipAssociationArgs.builder() .allocationId(exampleAwsEip.id()) .natGatewayId(exampleAwsNatGateway.id()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description NatGatewayEipAssociation(java.lang.String name)NatGatewayEipAssociation(java.lang.String name, NatGatewayEipAssociationArgs args)NatGatewayEipAssociation(java.lang.String name, NatGatewayEipAssociationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>allocationId()com.pulumi.core.Output<java.lang.String>associationId()static NatGatewayEipAssociationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, NatGatewayEipAssociationState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>natGatewayId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<NatGatewayEipAssociationTimeouts>>timeouts()
-
-
-
Constructor Detail
-
NatGatewayEipAssociation
public NatGatewayEipAssociation(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
NatGatewayEipAssociation
public NatGatewayEipAssociation(java.lang.String name, NatGatewayEipAssociationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
NatGatewayEipAssociation
public NatGatewayEipAssociation(java.lang.String name, NatGatewayEipAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
allocationId
public com.pulumi.core.Output<java.lang.String> allocationId()
- Returns:
- The ID of the Elastic IP Allocation to associate with the NAT Gateway.
-
associationId
public com.pulumi.core.Output<java.lang.String> associationId()
-
natGatewayId
public com.pulumi.core.Output<java.lang.String> natGatewayId()
- Returns:
- The ID of the NAT Gateway to associate the Elastic IP Allocation to. The following arguments are optional:
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<NatGatewayEipAssociationTimeouts>> timeouts()
-
get
public static NatGatewayEipAssociation get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable NatGatewayEipAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-