1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. EipAssociation

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.ec2.EipAssociation

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

    Associates an Elastic IP address with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account. For more information about working with Elastic IP addresses, see Elastic IP address concepts and rules. You must specify AllocationId and either InstanceId, NetworkInterfaceId, or PrivateIpAddress.

    Create EipAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EipAssociation(name: string, args?: EipAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def EipAssociation(resource_name: str,
                       args: Optional[EipAssociationArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def EipAssociation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       allocation_id: Optional[str] = None,
                       eip: Optional[str] = None,
                       instance_id: Optional[str] = None,
                       network_interface_id: Optional[str] = None,
                       private_ip_address: Optional[str] = None)
    func NewEipAssociation(ctx *Context, name string, args *EipAssociationArgs, opts ...ResourceOption) (*EipAssociation, error)
    public EipAssociation(string name, EipAssociationArgs? args = null, CustomResourceOptions? opts = null)
    public EipAssociation(String name, EipAssociationArgs args)
    public EipAssociation(String name, EipAssociationArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:EipAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EipAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EipAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EipAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EipAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EipAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EipAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EipAssociation resource accepts the following input properties:

    AllocationId string
    The allocation ID. This is required.
    Eip string
    InstanceId string
    The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
    NetworkInterfaceId string
    The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
    PrivateIpAddress string
    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.
    AllocationId string
    The allocation ID. This is required.
    Eip string
    InstanceId string
    The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
    NetworkInterfaceId string
    The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
    PrivateIpAddress string
    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.
    allocationId String
    The allocation ID. This is required.
    eip String
    instanceId String
    The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
    networkInterfaceId String
    The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
    privateIpAddress String
    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.
    allocationId string
    The allocation ID. This is required.
    eip string
    instanceId string
    The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
    networkInterfaceId string
    The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
    privateIpAddress string
    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.
    allocation_id str
    The allocation ID. This is required.
    eip str
    instance_id str
    The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
    network_interface_id str
    The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
    private_ip_address str
    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.
    allocationId String
    The allocation ID. This is required.
    eip String
    instanceId String
    The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
    networkInterfaceId String
    The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
    privateIpAddress String
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EipAssociation resource produces the following output properties:

    AwsId string
    The ID of the association.
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    The ID of the association.
    Id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID of the association.
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    The ID of the association.
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    The ID of the association.
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID of the association.
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi