Skip to content

AWS::EC2::EIP

Specifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance.

Generated by cfn-typegen --out cfn_types AWS::EC2::EIP into cfn_types/ec2.py:

# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::EC2 resources."""

from collections.abc import Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr


CONSTRAINTS:dict[str,Any]={
}


ATTRIBUTES:dict[str,Any]={"AWS::EC2::EIP":["AllocationId","PublicIp"]}


RULES:dict[str,Any]={}
Nested types (3)

These are defined above the properties in the generated module.

class EIPProps(TypedDict, closed=True):
    'Specifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance.'
    Domain: NotRequired[Expr[str]]
    'The network (``vpc``).'
    NetworkBorderGroup: NotRequired[Expr[str]]
    'A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.'
    TransferAddress: NotRequired[Expr[str]]
    'The Elastic IP address you are accepting for transfer.'
    InstanceId: NotRequired[Expr[str]]
    'The ID of the instance.'
    PublicIpv4Pool: NotRequired[Expr[str]]
    'The ID of an address pool that you own.'
    IpamPoolId: NotRequired[Expr[str]]
    'The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it.'
    Address: NotRequired[Expr[str]]
    'An Elastic IP address or a carrier IP address in a Wavelength Zone.'
    Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
    'Any tags assigned to the Elastic IP address.'


class EIP(ResourceAttrs):
    'Specifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance.'
    Type: Literal['AWS::EC2::EIP']
    Properties: NotRequired[EIPProps]


def eip(
    *,
    depends_on: DependsOn | None = None,
    deletion_policy: DeletionPolicy | None = None,
    update_replace_policy: UpdateReplacePolicy | None = None,
    condition: str | None = None,
    metadata: dict[str, Any] | None = None,
    **props: Unpack[EIPProps],
) -> EIP:
    return build('AWS::EC2::EIP', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)

Attributes

Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.

  • AllocationId
  • PublicIp