CfnEIPProps

class aws_cdk.aws_ec2.CfnEIPProps(*, domain=None, instance_id=None, public_ipv4_pool=None, tags=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.

  • 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[CfnTag]]) – 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.

ExampleMetadata

infused

Link

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

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-properties-ec2-eip.html#cfn-ec2-eip-domain

Return type

Optional[str]

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-properties-ec2-eip.html#cfn-ec2-eip-instanceid

Return type

Optional[str]

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-properties-ec2-eip.html#cfn-ec2-eip-publicipv4pool

Return type

Optional[str]

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-properties-ec2-eip.html#cfn-ec2-eip-tags

Return type

Optional[List[CfnTag]]