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

com.pulumi.aws.ec2.inputs.InstanceNetworkInterfaceArgs 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.inputs;

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


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

    public static final InstanceNetworkInterfaceArgs Empty = new InstanceNetworkInterfaceArgs();

    /**
     * Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
     * 
     */
    @Import(name="deleteOnTermination")
    private @Nullable Output deleteOnTermination;

    /**
     * @return Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
     * 
     */
    public Optional> deleteOnTermination() {
        return Optional.ofNullable(this.deleteOnTermination);
    }

    /**
     * Integer index of the network interface attachment. Limited by instance type.
     * 
     */
    @Import(name="deviceIndex", required=true)
    private Output deviceIndex;

    /**
     * @return Integer index of the network interface attachment. Limited by instance type.
     * 
     */
    public Output deviceIndex() {
        return this.deviceIndex;
    }

    /**
     * Integer index of the network card. Limited by instance type. The default index is `0`.
     * 
     */
    @Import(name="networkCardIndex")
    private @Nullable Output networkCardIndex;

    /**
     * @return Integer index of the network card. Limited by instance type. The default index is `0`.
     * 
     */
    public Optional> networkCardIndex() {
        return Optional.ofNullable(this.networkCardIndex);
    }

    /**
     * ID of the network interface to attach.
     * 
     */
    @Import(name="networkInterfaceId", required=true)
    private Output networkInterfaceId;

    /**
     * @return ID of the network interface to attach.
     * 
     */
    public Output networkInterfaceId() {
        return this.networkInterfaceId;
    }

    private InstanceNetworkInterfaceArgs() {}

    private InstanceNetworkInterfaceArgs(InstanceNetworkInterfaceArgs $) {
        this.deleteOnTermination = $.deleteOnTermination;
        this.deviceIndex = $.deviceIndex;
        this.networkCardIndex = $.networkCardIndex;
        this.networkInterfaceId = $.networkInterfaceId;
    }

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

    public static final class Builder {
        private InstanceNetworkInterfaceArgs $;

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

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

        /**
         * @param deleteOnTermination Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
         * 
         * @return builder
         * 
         */
        public Builder deleteOnTermination(@Nullable Output deleteOnTermination) {
            $.deleteOnTermination = deleteOnTermination;
            return this;
        }

        /**
         * @param deleteOnTermination Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
         * 
         * @return builder
         * 
         */
        public Builder deleteOnTermination(Boolean deleteOnTermination) {
            return deleteOnTermination(Output.of(deleteOnTermination));
        }

        /**
         * @param deviceIndex Integer index of the network interface attachment. Limited by instance type.
         * 
         * @return builder
         * 
         */
        public Builder deviceIndex(Output deviceIndex) {
            $.deviceIndex = deviceIndex;
            return this;
        }

        /**
         * @param deviceIndex Integer index of the network interface attachment. Limited by instance type.
         * 
         * @return builder
         * 
         */
        public Builder deviceIndex(Integer deviceIndex) {
            return deviceIndex(Output.of(deviceIndex));
        }

        /**
         * @param networkCardIndex Integer index of the network card. Limited by instance type. The default index is `0`.
         * 
         * @return builder
         * 
         */
        public Builder networkCardIndex(@Nullable Output networkCardIndex) {
            $.networkCardIndex = networkCardIndex;
            return this;
        }

        /**
         * @param networkCardIndex Integer index of the network card. Limited by instance type. The default index is `0`.
         * 
         * @return builder
         * 
         */
        public Builder networkCardIndex(Integer networkCardIndex) {
            return networkCardIndex(Output.of(networkCardIndex));
        }

        /**
         * @param networkInterfaceId ID of the network interface to attach.
         * 
         * @return builder
         * 
         */
        public Builder networkInterfaceId(Output networkInterfaceId) {
            $.networkInterfaceId = networkInterfaceId;
            return this;
        }

        /**
         * @param networkInterfaceId ID of the network interface to attach.
         * 
         * @return builder
         * 
         */
        public Builder networkInterfaceId(String networkInterfaceId) {
            return networkInterfaceId(Output.of(networkInterfaceId));
        }

        public InstanceNetworkInterfaceArgs build() {
            if ($.deviceIndex == null) {
                throw new MissingRequiredPropertyException("InstanceNetworkInterfaceArgs", "deviceIndex");
            }
            if ($.networkInterfaceId == null) {
                throw new MissingRequiredPropertyException("InstanceNetworkInterfaceArgs", "networkInterfaceId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy