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

com.pulumi.linode.ImageArgs Maven / Gradle / Ivy

There is a newer version: 4.31.0-alpha.1732773076
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.linode;

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


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

    public static final ImageArgs Empty = new ImageArgs();

    /**
     * Whether this image supports cloud-init.
     * 
     */
    @Import(name="cloudInit")
    private @Nullable Output cloudInit;

    /**
     * @return Whether this image supports cloud-init.
     * 
     */
    public Optional> cloudInit() {
        return Optional.ofNullable(this.cloudInit);
    }

    /**
     * A detailed description of this Image.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return A detailed description of this Image.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The ID of the Linode Disk that this Image will be created from.
     * 
     */
    @Import(name="diskId")
    private @Nullable Output diskId;

    /**
     * @return The ID of the Linode Disk that this Image will be created from.
     * 
     */
    public Optional> diskId() {
        return Optional.ofNullable(this.diskId);
    }

    /**
     * The MD5 hash of the file to be uploaded. This is used to trigger file updates.
     * 
     */
    @Import(name="fileHash")
    private @Nullable Output fileHash;

    /**
     * @return The MD5 hash of the file to be uploaded. This is used to trigger file updates.
     * 
     */
    public Optional> fileHash() {
        return Optional.ofNullable(this.fileHash);
    }

    /**
     * The path of the image file to be uploaded.
     * 
     */
    @Import(name="filePath")
    private @Nullable Output filePath;

    /**
     * @return The path of the image file to be uploaded.
     * 
     */
    public Optional> filePath() {
        return Optional.ofNullable(this.filePath);
    }

    /**
     * A short description of the Image. Labels cannot contain special characters.
     * 
     */
    @Import(name="label", required=true)
    private Output label;

    /**
     * @return A short description of the Image. Labels cannot contain special characters.
     * 
     */
    public Output label() {
        return this.label;
    }

    /**
     * The ID of the Linode that this Image will be created from.
     * 
     * ***
     * 
     * > **NOTICE:** Uploading images is currently in beta. Ensure `LINODE_API_VERSION` is set to `v4beta` in order to use this functionality.
     * 
     * The following arguments apply to uploading an image:
     * 
     */
    @Import(name="linodeId")
    private @Nullable Output linodeId;

    /**
     * @return The ID of the Linode that this Image will be created from.
     * 
     * ***
     * 
     * > **NOTICE:** Uploading images is currently in beta. Ensure `LINODE_API_VERSION` is set to `v4beta` in order to use this functionality.
     * 
     * The following arguments apply to uploading an image:
     * 
     */
    public Optional> linodeId() {
        return Optional.ofNullable(this.linodeId);
    }

    /**
     * The region of the image. See all regions [here](https://techdocs.akamai.com/linode-api/reference/get-regions).
     * 
     */
    @Import(name="region")
    private @Nullable Output region;

    /**
     * @return The region of the image. See all regions [here](https://techdocs.akamai.com/linode-api/reference/get-regions).
     * 
     */
    public Optional> region() {
        return Optional.ofNullable(this.region);
    }

    /**
     * A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. **Note:** Image replication may not be available to all users. See Replicate an Image [here](https://techdocs.akamai.com/linode-api/reference/post-replicate-image) for more details.
     * 
     */
    @Import(name="replicaRegions")
    private @Nullable Output> replicaRegions;

    /**
     * @return A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. **Note:** Image replication may not be available to all users. See Replicate an Image [here](https://techdocs.akamai.com/linode-api/reference/post-replicate-image) for more details.
     * 
     */
    public Optional>> replicaRegions() {
        return Optional.ofNullable(this.replicaRegions);
    }

    /**
     * A list of customized tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A list of customized tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

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

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

    /**
     * Whether to wait for all image replications become `available`. Default to false.
     * 
     * ***
     * 
     * The following arguments apply to creating an image from an existing Linode Instance:
     * 
     */
    @Import(name="waitForReplications")
    private @Nullable Output waitForReplications;

    /**
     * @return Whether to wait for all image replications become `available`. Default to false.
     * 
     * ***
     * 
     * The following arguments apply to creating an image from an existing Linode Instance:
     * 
     */
    public Optional> waitForReplications() {
        return Optional.ofNullable(this.waitForReplications);
    }

    private ImageArgs() {}

    private ImageArgs(ImageArgs $) {
        this.cloudInit = $.cloudInit;
        this.description = $.description;
        this.diskId = $.diskId;
        this.fileHash = $.fileHash;
        this.filePath = $.filePath;
        this.label = $.label;
        this.linodeId = $.linodeId;
        this.region = $.region;
        this.replicaRegions = $.replicaRegions;
        this.tags = $.tags;
        this.timeouts = $.timeouts;
        this.waitForReplications = $.waitForReplications;
    }

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

    public static final class Builder {
        private ImageArgs $;

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

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

        /**
         * @param cloudInit Whether this image supports cloud-init.
         * 
         * @return builder
         * 
         */
        public Builder cloudInit(@Nullable Output cloudInit) {
            $.cloudInit = cloudInit;
            return this;
        }

        /**
         * @param cloudInit Whether this image supports cloud-init.
         * 
         * @return builder
         * 
         */
        public Builder cloudInit(Boolean cloudInit) {
            return cloudInit(Output.of(cloudInit));
        }

        /**
         * @param description A detailed description of this Image.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description A detailed description of this Image.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param diskId The ID of the Linode Disk that this Image will be created from.
         * 
         * @return builder
         * 
         */
        public Builder diskId(@Nullable Output diskId) {
            $.diskId = diskId;
            return this;
        }

        /**
         * @param diskId The ID of the Linode Disk that this Image will be created from.
         * 
         * @return builder
         * 
         */
        public Builder diskId(Integer diskId) {
            return diskId(Output.of(diskId));
        }

        /**
         * @param fileHash The MD5 hash of the file to be uploaded. This is used to trigger file updates.
         * 
         * @return builder
         * 
         */
        public Builder fileHash(@Nullable Output fileHash) {
            $.fileHash = fileHash;
            return this;
        }

        /**
         * @param fileHash The MD5 hash of the file to be uploaded. This is used to trigger file updates.
         * 
         * @return builder
         * 
         */
        public Builder fileHash(String fileHash) {
            return fileHash(Output.of(fileHash));
        }

        /**
         * @param filePath The path of the image file to be uploaded.
         * 
         * @return builder
         * 
         */
        public Builder filePath(@Nullable Output filePath) {
            $.filePath = filePath;
            return this;
        }

        /**
         * @param filePath The path of the image file to be uploaded.
         * 
         * @return builder
         * 
         */
        public Builder filePath(String filePath) {
            return filePath(Output.of(filePath));
        }

        /**
         * @param label A short description of the Image. Labels cannot contain special characters.
         * 
         * @return builder
         * 
         */
        public Builder label(Output label) {
            $.label = label;
            return this;
        }

        /**
         * @param label A short description of the Image. Labels cannot contain special characters.
         * 
         * @return builder
         * 
         */
        public Builder label(String label) {
            return label(Output.of(label));
        }

        /**
         * @param linodeId The ID of the Linode that this Image will be created from.
         * 
         * ***
         * 
         * > **NOTICE:** Uploading images is currently in beta. Ensure `LINODE_API_VERSION` is set to `v4beta` in order to use this functionality.
         * 
         * The following arguments apply to uploading an image:
         * 
         * @return builder
         * 
         */
        public Builder linodeId(@Nullable Output linodeId) {
            $.linodeId = linodeId;
            return this;
        }

        /**
         * @param linodeId The ID of the Linode that this Image will be created from.
         * 
         * ***
         * 
         * > **NOTICE:** Uploading images is currently in beta. Ensure `LINODE_API_VERSION` is set to `v4beta` in order to use this functionality.
         * 
         * The following arguments apply to uploading an image:
         * 
         * @return builder
         * 
         */
        public Builder linodeId(Integer linodeId) {
            return linodeId(Output.of(linodeId));
        }

        /**
         * @param region The region of the image. See all regions [here](https://techdocs.akamai.com/linode-api/reference/get-regions).
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output region) {
            $.region = region;
            return this;
        }

        /**
         * @param region The region of the image. See all regions [here](https://techdocs.akamai.com/linode-api/reference/get-regions).
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Output.of(region));
        }

        /**
         * @param replicaRegions A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. **Note:** Image replication may not be available to all users. See Replicate an Image [here](https://techdocs.akamai.com/linode-api/reference/post-replicate-image) for more details.
         * 
         * @return builder
         * 
         */
        public Builder replicaRegions(@Nullable Output> replicaRegions) {
            $.replicaRegions = replicaRegions;
            return this;
        }

        /**
         * @param replicaRegions A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. **Note:** Image replication may not be available to all users. See Replicate an Image [here](https://techdocs.akamai.com/linode-api/reference/post-replicate-image) for more details.
         * 
         * @return builder
         * 
         */
        public Builder replicaRegions(List replicaRegions) {
            return replicaRegions(Output.of(replicaRegions));
        }

        /**
         * @param replicaRegions A list of regions that customer wants to replicate this image in. At least one valid region is required and only core regions allowed. Existing images in the regions not passed will be removed. **Note:** Image replication may not be available to all users. See Replicate an Image [here](https://techdocs.akamai.com/linode-api/reference/post-replicate-image) for more details.
         * 
         * @return builder
         * 
         */
        public Builder replicaRegions(String... replicaRegions) {
            return replicaRegions(List.of(replicaRegions));
        }

        /**
         * @param tags A list of customized tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A list of customized tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(List tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tags A list of customized tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(String... tags) {
            return tags(List.of(tags));
        }

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

        public Builder timeouts(ImageTimeoutsArgs timeouts) {
            return timeouts(Output.of(timeouts));
        }

        /**
         * @param waitForReplications Whether to wait for all image replications become `available`. Default to false.
         * 
         * ***
         * 
         * The following arguments apply to creating an image from an existing Linode Instance:
         * 
         * @return builder
         * 
         */
        public Builder waitForReplications(@Nullable Output waitForReplications) {
            $.waitForReplications = waitForReplications;
            return this;
        }

        /**
         * @param waitForReplications Whether to wait for all image replications become `available`. Default to false.
         * 
         * ***
         * 
         * The following arguments apply to creating an image from an existing Linode Instance:
         * 
         * @return builder
         * 
         */
        public Builder waitForReplications(Boolean waitForReplications) {
            return waitForReplications(Output.of(waitForReplications));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy