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

com.pulumi.aws.ec2.inputs.SpotInstanceRequestEbsBlockDeviceArgs Maven / Gradle / Ivy

// *** 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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SpotInstanceRequestEbsBlockDeviceArgs Empty = new SpotInstanceRequestEbsBlockDeviceArgs();

    /**
     * Whether the volume should be destroyed on instance termination. Defaults to `true`.
     * 
     */
    @Import(name="deleteOnTermination")
    private @Nullable Output deleteOnTermination;

    /**
     * @return Whether the volume should be destroyed on instance termination. Defaults to `true`.
     * 
     */
    public Optional> deleteOnTermination() {
        return Optional.ofNullable(this.deleteOnTermination);
    }

    /**
     * Name of the device to mount.
     * 
     */
    @Import(name="deviceName", required=true)
    private Output deviceName;

    /**
     * @return Name of the device to mount.
     * 
     */
    public Output deviceName() {
        return this.deviceName;
    }

    /**
     * Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
     * 
     */
    @Import(name="encrypted")
    private @Nullable Output encrypted;

    /**
     * @return Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
     * 
     */
    public Optional> encrypted() {
        return Optional.ofNullable(this.encrypted);
    }

    /**
     * Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
     * 
     */
    @Import(name="iops")
    private @Nullable Output iops;

    /**
     * @return Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
     * 
     */
    public Optional> iops() {
        return Optional.ofNullable(this.iops);
    }

    /**
     * Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
     * 
     */
    @Import(name="kmsKeyId")
    private @Nullable Output kmsKeyId;

    /**
     * @return Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
     * 
     */
    public Optional> kmsKeyId() {
        return Optional.ofNullable(this.kmsKeyId);
    }

    /**
     * Snapshot ID to mount.
     * 
     */
    @Import(name="snapshotId")
    private @Nullable Output snapshotId;

    /**
     * @return Snapshot ID to mount.
     * 
     */
    public Optional> snapshotId() {
        return Optional.ofNullable(this.snapshotId);
    }

    /**
     * Map of tags to assign to the device.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Map of tags to assign to the device.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
     * 
     */
    @Import(name="tagsAll")
    private @Nullable Output> tagsAll;

    /**
     * @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
     * 
     */
    public Optional>> tagsAll() {
        return Optional.ofNullable(this.tagsAll);
    }

    /**
     * Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
     * 
     */
    @Import(name="throughput")
    private @Nullable Output throughput;

    /**
     * @return Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
     * 
     */
    public Optional> throughput() {
        return Optional.ofNullable(this.throughput);
    }

    @Import(name="volumeId")
    private @Nullable Output volumeId;

    public Optional> volumeId() {
        return Optional.ofNullable(this.volumeId);
    }

    /**
     * Size of the volume in gibibytes (GiB).
     * 
     */
    @Import(name="volumeSize")
    private @Nullable Output volumeSize;

    /**
     * @return Size of the volume in gibibytes (GiB).
     * 
     */
    public Optional> volumeSize() {
        return Optional.ofNullable(this.volumeSize);
    }

    /**
     * Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
     * 
     * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
     * 
     */
    @Import(name="volumeType")
    private @Nullable Output volumeType;

    /**
     * @return Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
     * 
     * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
     * 
     */
    public Optional> volumeType() {
        return Optional.ofNullable(this.volumeType);
    }

    private SpotInstanceRequestEbsBlockDeviceArgs() {}

    private SpotInstanceRequestEbsBlockDeviceArgs(SpotInstanceRequestEbsBlockDeviceArgs $) {
        this.deleteOnTermination = $.deleteOnTermination;
        this.deviceName = $.deviceName;
        this.encrypted = $.encrypted;
        this.iops = $.iops;
        this.kmsKeyId = $.kmsKeyId;
        this.snapshotId = $.snapshotId;
        this.tags = $.tags;
        this.tagsAll = $.tagsAll;
        this.throughput = $.throughput;
        this.volumeId = $.volumeId;
        this.volumeSize = $.volumeSize;
        this.volumeType = $.volumeType;
    }

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

    public static final class Builder {
        private SpotInstanceRequestEbsBlockDeviceArgs $;

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

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

        /**
         * @param deleteOnTermination Whether the volume should be destroyed on instance termination. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder deleteOnTermination(@Nullable Output deleteOnTermination) {
            $.deleteOnTermination = deleteOnTermination;
            return this;
        }

        /**
         * @param deleteOnTermination Whether the volume should be destroyed on instance termination. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder deleteOnTermination(Boolean deleteOnTermination) {
            return deleteOnTermination(Output.of(deleteOnTermination));
        }

        /**
         * @param deviceName Name of the device to mount.
         * 
         * @return builder
         * 
         */
        public Builder deviceName(Output deviceName) {
            $.deviceName = deviceName;
            return this;
        }

        /**
         * @param deviceName Name of the device to mount.
         * 
         * @return builder
         * 
         */
        public Builder deviceName(String deviceName) {
            return deviceName(Output.of(deviceName));
        }

        /**
         * @param encrypted Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
         * 
         * @return builder
         * 
         */
        public Builder encrypted(@Nullable Output encrypted) {
            $.encrypted = encrypted;
            return this;
        }

        /**
         * @param encrypted Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
         * 
         * @return builder
         * 
         */
        public Builder encrypted(Boolean encrypted) {
            return encrypted(Output.of(encrypted));
        }

        /**
         * @param iops Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
         * 
         * @return builder
         * 
         */
        public Builder iops(@Nullable Output iops) {
            $.iops = iops;
            return this;
        }

        /**
         * @param iops Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
         * 
         * @return builder
         * 
         */
        public Builder iops(Integer iops) {
            return iops(Output.of(iops));
        }

        /**
         * @param kmsKeyId Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyId(@Nullable Output kmsKeyId) {
            $.kmsKeyId = kmsKeyId;
            return this;
        }

        /**
         * @param kmsKeyId Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyId(String kmsKeyId) {
            return kmsKeyId(Output.of(kmsKeyId));
        }

        /**
         * @param snapshotId Snapshot ID to mount.
         * 
         * @return builder
         * 
         */
        public Builder snapshotId(@Nullable Output snapshotId) {
            $.snapshotId = snapshotId;
            return this;
        }

        /**
         * @param snapshotId Snapshot ID to mount.
         * 
         * @return builder
         * 
         */
        public Builder snapshotId(String snapshotId) {
            return snapshotId(Output.of(snapshotId));
        }

        /**
         * @param tags Map of tags to assign to the device.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Map of tags to assign to the device.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
         * 
         * @return builder
         * 
         */
        public Builder tagsAll(@Nullable Output> tagsAll) {
            $.tagsAll = tagsAll;
            return this;
        }

        /**
         * @param tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
         * 
         * @return builder
         * 
         */
        public Builder tagsAll(Map tagsAll) {
            return tagsAll(Output.of(tagsAll));
        }

        /**
         * @param throughput Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
         * 
         * @return builder
         * 
         */
        public Builder throughput(@Nullable Output throughput) {
            $.throughput = throughput;
            return this;
        }

        /**
         * @param throughput Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
         * 
         * @return builder
         * 
         */
        public Builder throughput(Integer throughput) {
            return throughput(Output.of(throughput));
        }

        public Builder volumeId(@Nullable Output volumeId) {
            $.volumeId = volumeId;
            return this;
        }

        public Builder volumeId(String volumeId) {
            return volumeId(Output.of(volumeId));
        }

        /**
         * @param volumeSize Size of the volume in gibibytes (GiB).
         * 
         * @return builder
         * 
         */
        public Builder volumeSize(@Nullable Output volumeSize) {
            $.volumeSize = volumeSize;
            return this;
        }

        /**
         * @param volumeSize Size of the volume in gibibytes (GiB).
         * 
         * @return builder
         * 
         */
        public Builder volumeSize(Integer volumeSize) {
            return volumeSize(Output.of(volumeSize));
        }

        /**
         * @param volumeType Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
         * 
         * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
         * 
         * @return builder
         * 
         */
        public Builder volumeType(@Nullable Output volumeType) {
            $.volumeType = volumeType;
            return this;
        }

        /**
         * @param volumeType Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
         * 
         * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
         * 
         * @return builder
         * 
         */
        public Builder volumeType(String volumeType) {
            return volumeType(Output.of(volumeType));
        }

        public SpotInstanceRequestEbsBlockDeviceArgs build() {
            if ($.deviceName == null) {
                throw new MissingRequiredPropertyException("SpotInstanceRequestEbsBlockDeviceArgs", "deviceName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy