AWS SDK for .NET Documentation
AssociatePublicIpAddress Property
AmazonAmazon.EC2.ModelInstanceNetworkInterfaceSpecificationAssociatePublicIpAddress Did this page help you?   Yes   No    Tell us about it...
Indicates whether to assign a public IP address to an instance in a VPC.
Declaration Syntax
C#
public bool AssociatePublicIpAddress { get; set; }
Remarks

The public IP address is associated with a specific network interface. If set to true, the following rules apply:

  1. Can only be associated with a single network interface with the device index of 0. You can't associate a public IP address with a second network interface, and you can't associate a public IP address if you are launching more than one network interface.

  2. Can only be associated with a new network interface, not an existing one.

Default: If launching into a default subnet, the default value is true. If launching into a nondefault subnet, the default value is false.

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)