CfnEIPAssociationProps

class aws_cdk.aws_ec2.CfnEIPAssociationProps(*, allocation_id=None, eip=None, instance_id=None, network_interface_id=None, private_ip_address=None)

Bases: object

Properties for defining a CfnEIPAssociation.

Parameters
  • allocation_id (Optional[str]) – [EC2-VPC] The allocation ID. This is required for EC2-VPC.

  • eip (Optional[str]) – [EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.

  • instance_id (Optional[str]) – The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.

  • network_interface_id (Optional[str]) – [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

  • private_ip_address (Optional[str]) – [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2

cfn_eIPAssociation_props = ec2.CfnEIPAssociationProps(
    allocation_id="allocationId",
    eip="eip",
    instance_id="instanceId",
    network_interface_id="networkInterfaceId",
    private_ip_address="privateIpAddress"
)

Attributes

allocation_id

[EC2-VPC] The allocation ID.

This is required for EC2-VPC.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html#cfn-ec2-eipassociation-allocationid

Return type

Optional[str]

eip

[EC2-Classic] The Elastic IP address to associate with the instance.

This is required for EC2-Classic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html#cfn-ec2-eipassociation-eip

Return type

Optional[str]

instance_id

The ID of the instance.

The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html#cfn-ec2-eipassociation-instanceid

Return type

Optional[str]

network_interface_id

[EC2-VPC] The ID of the network interface.

If the instance has more than one network interface, you must specify a network interface ID.

For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html#cfn-ec2-eipassociation-networkinterfaceid

Return type

Optional[str]

private_ip_address

[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address.

If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html#cfn-ec2-eipassociation-PrivateIpAddress

Return type

Optional[str]