CfnEIPProps

class aws_cdk.aws_ec2.CfnEIPProps(*, domain=None, instance_id=None, network_border_group=None, public_ipv4_pool=None, tags=None, transfer_address=None)

Bases: object

Properties for defining a CfnEIP.

Parameters
  • domain (Optional[str]) – Indicates whether the Elastic IP address is for use with instances in a VPC or instance in EC2-Classic. Default: If the Region supports EC2-Classic, the default is standard . Otherwise, the default is vpc . Use when allocating an address for use with a VPC if the Region supports EC2-Classic. If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the DependsOn Attribute on this resource.

  • instance_id (Optional[str]) – The ID of the instance. .. epigraph:: Updates to the InstanceId property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.

  • network_border_group (Optional[str]) – A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups. Use DescribeAvailabilityZones to view the network border groups. You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic, you receive an InvalidParameterCombination error.

  • public_ipv4_pool (Optional[str]) – The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. .. epigraph:: Updates to the PublicIpv4Pool property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Any tags assigned to the Elastic IP address. .. epigraph:: Updates to the Tags property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.

  • transfer_address (Optional[str]) – The Elastic IP address you are accepting for transfer.

Link

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

ExampleMetadata

infused

Example:

# instance: ec2.Instance

# my_zone: route53.HostedZone


elastic_ip = ec2.CfnEIP(self, "EIP",
    domain="vpc",
    instance_id=instance.instance_id
)
route53.ARecord(self, "ARecord",
    zone=my_zone,
    target=route53.RecordTarget.from_ip_addresses(elastic_ip.ref)
)

Attributes

domain

Indicates whether the Elastic IP address is for use with instances in a VPC or instance in EC2-Classic.

Default: If the Region supports EC2-Classic, the default is standard . Otherwise, the default is vpc .

Use when allocating an address for use with a VPC if the Region supports EC2-Classic.

If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the DependsOn Attribute on this resource.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eip.html#cfn-ec2-eip-domain

instance_id

The ID of the instance.

Updates to the InstanceId property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.

Link

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

network_border_group

A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.

Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.

Use DescribeAvailabilityZones to view the network border groups.

You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic, you receive an InvalidParameterCombination error.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eip.html#cfn-ec2-eip-networkbordergroup

public_ipv4_pool

The ID of an address pool that you own.

Use this parameter to let Amazon EC2 select an address from the address pool. .. epigraph:

Updates to the ``PublicIpv4Pool`` property may require *some interruptions* . Updates on an EIP reassociates the address on its associated resource.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eip.html#cfn-ec2-eip-publicipv4pool

tags

Any tags assigned to the Elastic IP address.

Updates to the Tags property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eip.html#cfn-ec2-eip-tags

transfer_address

The Elastic IP address you are accepting for transfer.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eip.html#cfn-ec2-eip-transferaddress