All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.ec2.EipAssociationArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.ec2;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class EipAssociationArgs extends com.pulumi.resources.ResourceArgs {

    public static final EipAssociationArgs Empty = new EipAssociationArgs();

    /**
     * The allocation ID. This is required for EC2-VPC.
     * 
     */
    @Import(name="allocationId")
    private @Nullable Output allocationId;

    /**
     * @return The allocation ID. This is required for EC2-VPC.
     * 
     */
    public Optional> allocationId() {
        return Optional.ofNullable(this.allocationId);
    }

    /**
     * Whether to allow an Elastic IP to
     * be re-associated. Defaults to `true` in VPC.
     * 
     */
    @Import(name="allowReassociation")
    private @Nullable Output allowReassociation;

    /**
     * @return Whether to allow an Elastic IP to
     * be re-associated. Defaults to `true` in VPC.
     * 
     */
    public Optional> allowReassociation() {
        return Optional.ofNullable(this.allowReassociation);
    }

    /**
     * The ID of the instance. This is required for
     * EC2-Classic. For EC2-VPC, you can specify either the instance ID or the
     * network interface ID, but not both. The operation fails if you specify an
     * instance ID unless exactly one network interface is attached.
     * 
     */
    @Import(name="instanceId")
    private @Nullable Output instanceId;

    /**
     * @return The ID of the instance. This is required for
     * EC2-Classic. For EC2-VPC, you can specify either the instance ID or the
     * network interface ID, but not both. The operation fails if you specify an
     * instance ID unless exactly one network interface is attached.
     * 
     */
    public Optional> instanceId() {
        return Optional.ofNullable(this.instanceId);
    }

    /**
     * The ID of the network interface. If the
     * instance has more than one network interface, you must specify a network
     * interface ID.
     * 
     */
    @Import(name="networkInterfaceId")
    private @Nullable Output networkInterfaceId;

    /**
     * @return The ID of the network interface. If the
     * instance has more than one network interface, you must specify a network
     * interface ID.
     * 
     */
    public Optional> networkInterfaceId() {
        return Optional.ofNullable(this.networkInterfaceId);
    }

    /**
     * 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.
     * 
     */
    @Import(name="privateIpAddress")
    private @Nullable Output privateIpAddress;

    /**
     * @return 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.
     * 
     */
    public Optional> privateIpAddress() {
        return Optional.ofNullable(this.privateIpAddress);
    }

    /**
     * The Elastic IP address. This is required for EC2-Classic.
     * 
     */
    @Import(name="publicIp")
    private @Nullable Output publicIp;

    /**
     * @return The Elastic IP address. This is required for EC2-Classic.
     * 
     */
    public Optional> publicIp() {
        return Optional.ofNullable(this.publicIp);
    }

    private EipAssociationArgs() {}

    private EipAssociationArgs(EipAssociationArgs $) {
        this.allocationId = $.allocationId;
        this.allowReassociation = $.allowReassociation;
        this.instanceId = $.instanceId;
        this.networkInterfaceId = $.networkInterfaceId;
        this.privateIpAddress = $.privateIpAddress;
        this.publicIp = $.publicIp;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(EipAssociationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private EipAssociationArgs $;

        public Builder() {
            $ = new EipAssociationArgs();
        }

        public Builder(EipAssociationArgs defaults) {
            $ = new EipAssociationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param allocationId The allocation ID. This is required for EC2-VPC.
         * 
         * @return builder
         * 
         */
        public Builder allocationId(@Nullable Output allocationId) {
            $.allocationId = allocationId;
            return this;
        }

        /**
         * @param allocationId The allocation ID. This is required for EC2-VPC.
         * 
         * @return builder
         * 
         */
        public Builder allocationId(String allocationId) {
            return allocationId(Output.of(allocationId));
        }

        /**
         * @param allowReassociation Whether to allow an Elastic IP to
         * be re-associated. Defaults to `true` in VPC.
         * 
         * @return builder
         * 
         */
        public Builder allowReassociation(@Nullable Output allowReassociation) {
            $.allowReassociation = allowReassociation;
            return this;
        }

        /**
         * @param allowReassociation Whether to allow an Elastic IP to
         * be re-associated. Defaults to `true` in VPC.
         * 
         * @return builder
         * 
         */
        public Builder allowReassociation(Boolean allowReassociation) {
            return allowReassociation(Output.of(allowReassociation));
        }

        /**
         * @param instanceId The ID of the instance. This is required for
         * EC2-Classic. For EC2-VPC, you can specify either the instance ID or the
         * network interface ID, but not both. The operation fails if you specify an
         * instance ID unless exactly one network interface is attached.
         * 
         * @return builder
         * 
         */
        public Builder instanceId(@Nullable Output instanceId) {
            $.instanceId = instanceId;
            return this;
        }

        /**
         * @param instanceId The ID of the instance. This is required for
         * EC2-Classic. For EC2-VPC, you can specify either the instance ID or the
         * network interface ID, but not both. The operation fails if you specify an
         * instance ID unless exactly one network interface is attached.
         * 
         * @return builder
         * 
         */
        public Builder instanceId(String instanceId) {
            return instanceId(Output.of(instanceId));
        }

        /**
         * @param networkInterfaceId The ID of the network interface. If the
         * instance has more than one network interface, you must specify a network
         * interface ID.
         * 
         * @return builder
         * 
         */
        public Builder networkInterfaceId(@Nullable Output networkInterfaceId) {
            $.networkInterfaceId = networkInterfaceId;
            return this;
        }

        /**
         * @param networkInterfaceId The ID of the network interface. If the
         * instance has more than one network interface, you must specify a network
         * interface ID.
         * 
         * @return builder
         * 
         */
        public Builder networkInterfaceId(String networkInterfaceId) {
            return networkInterfaceId(Output.of(networkInterfaceId));
        }

        /**
         * @param privateIpAddress 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.
         * 
         * @return builder
         * 
         */
        public Builder privateIpAddress(@Nullable Output privateIpAddress) {
            $.privateIpAddress = privateIpAddress;
            return this;
        }

        /**
         * @param privateIpAddress 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.
         * 
         * @return builder
         * 
         */
        public Builder privateIpAddress(String privateIpAddress) {
            return privateIpAddress(Output.of(privateIpAddress));
        }

        /**
         * @param publicIp The Elastic IP address. This is required for EC2-Classic.
         * 
         * @return builder
         * 
         */
        public Builder publicIp(@Nullable Output publicIp) {
            $.publicIp = publicIp;
            return this;
        }

        /**
         * @param publicIp The Elastic IP address. This is required for EC2-Classic.
         * 
         * @return builder
         * 
         */
        public Builder publicIp(String publicIp) {
            return publicIp(Output.of(publicIp));
        }

        public EipAssociationArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy