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

com.pulumi.azurenative.compute.inputs.CreationDataArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.compute.inputs;

import com.pulumi.azurenative.compute.enums.DiskCreateOption;
import com.pulumi.azurenative.compute.inputs.ImageDiskReferenceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Data used when creating a disk.
 * 
 */
public final class CreationDataArgs extends com.pulumi.resources.ResourceArgs {

    public static final CreationDataArgs Empty = new CreationDataArgs();

    /**
     * This enumerates the possible sources of a disk's creation.
     * 
     */
    @Import(name="createOption", required=true)
    private Output> createOption;

    /**
     * @return This enumerates the possible sources of a disk's creation.
     * 
     */
    public Output> createOption() {
        return this.createOption;
    }

    /**
     * Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
     * 
     */
    @Import(name="galleryImageReference")
    private @Nullable Output galleryImageReference;

    /**
     * @return Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
     * 
     */
    public Optional> galleryImageReference() {
        return Optional.ofNullable(this.galleryImageReference);
    }

    /**
     * Disk source information for PIR or user images.
     * 
     */
    @Import(name="imageReference")
    private @Nullable Output imageReference;

    /**
     * @return Disk source information for PIR or user images.
     * 
     */
    public Optional> imageReference() {
        return Optional.ofNullable(this.imageReference);
    }

    /**
     * Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
     * 
     */
    @Import(name="logicalSectorSize")
    private @Nullable Output logicalSectorSize;

    /**
     * @return Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
     * 
     */
    public Optional> logicalSectorSize() {
        return Optional.ofNullable(this.logicalSectorSize);
    }

    /**
     * Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.
     * 
     */
    @Import(name="performancePlus")
    private @Nullable Output performancePlus;

    /**
     * @return Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.
     * 
     */
    public Optional> performancePlus() {
        return Optional.ofNullable(this.performancePlus);
    }

    /**
     * If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
     * 
     */
    @Import(name="securityDataUri")
    private @Nullable Output securityDataUri;

    /**
     * @return If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
     * 
     */
    public Optional> securityDataUri() {
        return Optional.ofNullable(this.securityDataUri);
    }

    /**
     * If createOption is Copy, this is the ARM id of the source snapshot or disk.
     * 
     */
    @Import(name="sourceResourceId")
    private @Nullable Output sourceResourceId;

    /**
     * @return If createOption is Copy, this is the ARM id of the source snapshot or disk.
     * 
     */
    public Optional> sourceResourceId() {
        return Optional.ofNullable(this.sourceResourceId);
    }

    /**
     * If createOption is Import, this is the URI of a blob to be imported into a managed disk.
     * 
     */
    @Import(name="sourceUri")
    private @Nullable Output sourceUri;

    /**
     * @return If createOption is Import, this is the URI of a blob to be imported into a managed disk.
     * 
     */
    public Optional> sourceUri() {
        return Optional.ofNullable(this.sourceUri);
    }

    /**
     * Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
     * 
     */
    @Import(name="storageAccountId")
    private @Nullable Output storageAccountId;

    /**
     * @return Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
     * 
     */
    public Optional> storageAccountId() {
        return Optional.ofNullable(this.storageAccountId);
    }

    /**
     * If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
     * 
     */
    @Import(name="uploadSizeBytes")
    private @Nullable Output uploadSizeBytes;

    /**
     * @return If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
     * 
     */
    public Optional> uploadSizeBytes() {
        return Optional.ofNullable(this.uploadSizeBytes);
    }

    private CreationDataArgs() {}

    private CreationDataArgs(CreationDataArgs $) {
        this.createOption = $.createOption;
        this.galleryImageReference = $.galleryImageReference;
        this.imageReference = $.imageReference;
        this.logicalSectorSize = $.logicalSectorSize;
        this.performancePlus = $.performancePlus;
        this.securityDataUri = $.securityDataUri;
        this.sourceResourceId = $.sourceResourceId;
        this.sourceUri = $.sourceUri;
        this.storageAccountId = $.storageAccountId;
        this.uploadSizeBytes = $.uploadSizeBytes;
    }

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

    public static final class Builder {
        private CreationDataArgs $;

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

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

        /**
         * @param createOption This enumerates the possible sources of a disk's creation.
         * 
         * @return builder
         * 
         */
        public Builder createOption(Output> createOption) {
            $.createOption = createOption;
            return this;
        }

        /**
         * @param createOption This enumerates the possible sources of a disk's creation.
         * 
         * @return builder
         * 
         */
        public Builder createOption(Either createOption) {
            return createOption(Output.of(createOption));
        }

        /**
         * @param createOption This enumerates the possible sources of a disk's creation.
         * 
         * @return builder
         * 
         */
        public Builder createOption(String createOption) {
            return createOption(Either.ofLeft(createOption));
        }

        /**
         * @param createOption This enumerates the possible sources of a disk's creation.
         * 
         * @return builder
         * 
         */
        public Builder createOption(DiskCreateOption createOption) {
            return createOption(Either.ofRight(createOption));
        }

        /**
         * @param galleryImageReference Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
         * 
         * @return builder
         * 
         */
        public Builder galleryImageReference(@Nullable Output galleryImageReference) {
            $.galleryImageReference = galleryImageReference;
            return this;
        }

        /**
         * @param galleryImageReference Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
         * 
         * @return builder
         * 
         */
        public Builder galleryImageReference(ImageDiskReferenceArgs galleryImageReference) {
            return galleryImageReference(Output.of(galleryImageReference));
        }

        /**
         * @param imageReference Disk source information for PIR or user images.
         * 
         * @return builder
         * 
         */
        public Builder imageReference(@Nullable Output imageReference) {
            $.imageReference = imageReference;
            return this;
        }

        /**
         * @param imageReference Disk source information for PIR or user images.
         * 
         * @return builder
         * 
         */
        public Builder imageReference(ImageDiskReferenceArgs imageReference) {
            return imageReference(Output.of(imageReference));
        }

        /**
         * @param logicalSectorSize Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
         * 
         * @return builder
         * 
         */
        public Builder logicalSectorSize(@Nullable Output logicalSectorSize) {
            $.logicalSectorSize = logicalSectorSize;
            return this;
        }

        /**
         * @param logicalSectorSize Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
         * 
         * @return builder
         * 
         */
        public Builder logicalSectorSize(Integer logicalSectorSize) {
            return logicalSectorSize(Output.of(logicalSectorSize));
        }

        /**
         * @param performancePlus Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.
         * 
         * @return builder
         * 
         */
        public Builder performancePlus(@Nullable Output performancePlus) {
            $.performancePlus = performancePlus;
            return this;
        }

        /**
         * @param performancePlus Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.
         * 
         * @return builder
         * 
         */
        public Builder performancePlus(Boolean performancePlus) {
            return performancePlus(Output.of(performancePlus));
        }

        /**
         * @param securityDataUri If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
         * 
         * @return builder
         * 
         */
        public Builder securityDataUri(@Nullable Output securityDataUri) {
            $.securityDataUri = securityDataUri;
            return this;
        }

        /**
         * @param securityDataUri If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
         * 
         * @return builder
         * 
         */
        public Builder securityDataUri(String securityDataUri) {
            return securityDataUri(Output.of(securityDataUri));
        }

        /**
         * @param sourceResourceId If createOption is Copy, this is the ARM id of the source snapshot or disk.
         * 
         * @return builder
         * 
         */
        public Builder sourceResourceId(@Nullable Output sourceResourceId) {
            $.sourceResourceId = sourceResourceId;
            return this;
        }

        /**
         * @param sourceResourceId If createOption is Copy, this is the ARM id of the source snapshot or disk.
         * 
         * @return builder
         * 
         */
        public Builder sourceResourceId(String sourceResourceId) {
            return sourceResourceId(Output.of(sourceResourceId));
        }

        /**
         * @param sourceUri If createOption is Import, this is the URI of a blob to be imported into a managed disk.
         * 
         * @return builder
         * 
         */
        public Builder sourceUri(@Nullable Output sourceUri) {
            $.sourceUri = sourceUri;
            return this;
        }

        /**
         * @param sourceUri If createOption is Import, this is the URI of a blob to be imported into a managed disk.
         * 
         * @return builder
         * 
         */
        public Builder sourceUri(String sourceUri) {
            return sourceUri(Output.of(sourceUri));
        }

        /**
         * @param storageAccountId Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountId(@Nullable Output storageAccountId) {
            $.storageAccountId = storageAccountId;
            return this;
        }

        /**
         * @param storageAccountId Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountId(String storageAccountId) {
            return storageAccountId(Output.of(storageAccountId));
        }

        /**
         * @param uploadSizeBytes If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
         * 
         * @return builder
         * 
         */
        public Builder uploadSizeBytes(@Nullable Output uploadSizeBytes) {
            $.uploadSizeBytes = uploadSizeBytes;
            return this;
        }

        /**
         * @param uploadSizeBytes If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
         * 
         * @return builder
         * 
         */
        public Builder uploadSizeBytes(Double uploadSizeBytes) {
            return uploadSizeBytes(Output.of(uploadSizeBytes));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy