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

com.pulumi.azurenative.scvmm.MachineExtensionArgs 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.scvmm;

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


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

    public static final MachineExtensionArgs Empty = new MachineExtensionArgs();

    /**
     * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
     * 
     */
    @Import(name="autoUpgradeMinorVersion")
    private @Nullable Output autoUpgradeMinorVersion;

    /**
     * @return Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
     * 
     */
    public Optional> autoUpgradeMinorVersion() {
        return Optional.ofNullable(this.autoUpgradeMinorVersion);
    }

    /**
     * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
     * 
     */
    @Import(name="enableAutomaticUpgrade")
    private @Nullable Output enableAutomaticUpgrade;

    /**
     * @return Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
     * 
     */
    public Optional> enableAutomaticUpgrade() {
        return Optional.ofNullable(this.enableAutomaticUpgrade);
    }

    /**
     * The name of the machine extension.
     * 
     */
    @Import(name="extensionName")
    private @Nullable Output extensionName;

    /**
     * @return The name of the machine extension.
     * 
     */
    public Optional> extensionName() {
        return Optional.ofNullable(this.extensionName);
    }

    /**
     * How the extension handler should be forced to update even if the extension configuration has not changed.
     * 
     */
    @Import(name="forceUpdateTag")
    private @Nullable Output forceUpdateTag;

    /**
     * @return How the extension handler should be forced to update even if the extension configuration has not changed.
     * 
     */
    public Optional> forceUpdateTag() {
        return Optional.ofNullable(this.forceUpdateTag);
    }

    /**
     * The geo-location where the resource lives
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The geo-location where the resource lives
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
     * 
     */
    @Import(name="protectedSettings")
    private @Nullable Output protectedSettings;

    /**
     * @return The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
     * 
     */
    public Optional> protectedSettings() {
        return Optional.ofNullable(this.protectedSettings);
    }

    /**
     * The name of the extension handler publisher.
     * 
     */
    @Import(name="publisher")
    private @Nullable Output publisher;

    /**
     * @return The name of the extension handler publisher.
     * 
     */
    public Optional> publisher() {
        return Optional.ofNullable(this.publisher);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Json formatted public settings for the extension.
     * 
     */
    @Import(name="settings")
    private @Nullable Output settings;

    /**
     * @return Json formatted public settings for the extension.
     * 
     */
    public Optional> settings() {
        return Optional.ofNullable(this.settings);
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specifies the type of the extension; an example is "CustomScriptExtension".
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return Specifies the type of the extension; an example is "CustomScriptExtension".
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    /**
     * Specifies the version of the script handler.
     * 
     */
    @Import(name="typeHandlerVersion")
    private @Nullable Output typeHandlerVersion;

    /**
     * @return Specifies the version of the script handler.
     * 
     */
    public Optional> typeHandlerVersion() {
        return Optional.ofNullable(this.typeHandlerVersion);
    }

    /**
     * The name of the machine where the extension should be created or updated.
     * 
     */
    @Import(name="virtualMachineName", required=true)
    private Output virtualMachineName;

    /**
     * @return The name of the machine where the extension should be created or updated.
     * 
     */
    public Output virtualMachineName() {
        return this.virtualMachineName;
    }

    private MachineExtensionArgs() {}

    private MachineExtensionArgs(MachineExtensionArgs $) {
        this.autoUpgradeMinorVersion = $.autoUpgradeMinorVersion;
        this.enableAutomaticUpgrade = $.enableAutomaticUpgrade;
        this.extensionName = $.extensionName;
        this.forceUpdateTag = $.forceUpdateTag;
        this.location = $.location;
        this.protectedSettings = $.protectedSettings;
        this.publisher = $.publisher;
        this.resourceGroupName = $.resourceGroupName;
        this.settings = $.settings;
        this.tags = $.tags;
        this.type = $.type;
        this.typeHandlerVersion = $.typeHandlerVersion;
        this.virtualMachineName = $.virtualMachineName;
    }

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

    public static final class Builder {
        private MachineExtensionArgs $;

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

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

        /**
         * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
         * 
         * @return builder
         * 
         */
        public Builder autoUpgradeMinorVersion(@Nullable Output autoUpgradeMinorVersion) {
            $.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
            return this;
        }

        /**
         * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
         * 
         * @return builder
         * 
         */
        public Builder autoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
            return autoUpgradeMinorVersion(Output.of(autoUpgradeMinorVersion));
        }

        /**
         * @param enableAutomaticUpgrade Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticUpgrade(@Nullable Output enableAutomaticUpgrade) {
            $.enableAutomaticUpgrade = enableAutomaticUpgrade;
            return this;
        }

        /**
         * @param enableAutomaticUpgrade Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticUpgrade(Boolean enableAutomaticUpgrade) {
            return enableAutomaticUpgrade(Output.of(enableAutomaticUpgrade));
        }

        /**
         * @param extensionName The name of the machine extension.
         * 
         * @return builder
         * 
         */
        public Builder extensionName(@Nullable Output extensionName) {
            $.extensionName = extensionName;
            return this;
        }

        /**
         * @param extensionName The name of the machine extension.
         * 
         * @return builder
         * 
         */
        public Builder extensionName(String extensionName) {
            return extensionName(Output.of(extensionName));
        }

        /**
         * @param forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(@Nullable Output forceUpdateTag) {
            $.forceUpdateTag = forceUpdateTag;
            return this;
        }

        /**
         * @param forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(String forceUpdateTag) {
            return forceUpdateTag(Output.of(forceUpdateTag));
        }

        /**
         * @param location The geo-location where the resource lives
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The geo-location where the resource lives
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param protectedSettings The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
         * 
         * @return builder
         * 
         */
        public Builder protectedSettings(@Nullable Output protectedSettings) {
            $.protectedSettings = protectedSettings;
            return this;
        }

        /**
         * @param protectedSettings The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
         * 
         * @return builder
         * 
         */
        public Builder protectedSettings(Object protectedSettings) {
            return protectedSettings(Output.of(protectedSettings));
        }

        /**
         * @param publisher The name of the extension handler publisher.
         * 
         * @return builder
         * 
         */
        public Builder publisher(@Nullable Output publisher) {
            $.publisher = publisher;
            return this;
        }

        /**
         * @param publisher The name of the extension handler publisher.
         * 
         * @return builder
         * 
         */
        public Builder publisher(String publisher) {
            return publisher(Output.of(publisher));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param settings Json formatted public settings for the extension.
         * 
         * @return builder
         * 
         */
        public Builder settings(@Nullable Output settings) {
            $.settings = settings;
            return this;
        }

        /**
         * @param settings Json formatted public settings for the extension.
         * 
         * @return builder
         * 
         */
        public Builder settings(Object settings) {
            return settings(Output.of(settings));
        }

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

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param type Specifies the type of the extension; an example is "CustomScriptExtension".
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Specifies the type of the extension; an example is "CustomScriptExtension".
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param typeHandlerVersion Specifies the version of the script handler.
         * 
         * @return builder
         * 
         */
        public Builder typeHandlerVersion(@Nullable Output typeHandlerVersion) {
            $.typeHandlerVersion = typeHandlerVersion;
            return this;
        }

        /**
         * @param typeHandlerVersion Specifies the version of the script handler.
         * 
         * @return builder
         * 
         */
        public Builder typeHandlerVersion(String typeHandlerVersion) {
            return typeHandlerVersion(Output.of(typeHandlerVersion));
        }

        /**
         * @param virtualMachineName The name of the machine where the extension should be created or updated.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineName(Output virtualMachineName) {
            $.virtualMachineName = virtualMachineName;
            return this;
        }

        /**
         * @param virtualMachineName The name of the machine where the extension should be created or updated.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineName(String virtualMachineName) {
            return virtualMachineName(Output.of(virtualMachineName));
        }

        public MachineExtensionArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("MachineExtensionArgs", "resourceGroupName");
            }
            if ($.virtualMachineName == null) {
                throw new MissingRequiredPropertyException("MachineExtensionArgs", "virtualMachineName");
            }
            return $;
        }
    }

}