Indicates whether to assign a public IP address to an instance in a VPC.
Declaration Syntax
C# |
public InstanceNetworkInterfaceSpecification WithAssociatePublicIpAddress( bool associatePublicIpAddress )
Parameters
- associatePublicIpAddress (Boolean)
- Indicates whether to assign a public IP address to an instance in a VPC.
Return Value
this instance
Remarks
The public IP address is associated with a specific network interface. If set to true, the following rules apply:
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.
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.