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

com.pulumi.azurenative.compute.VirtualMachineExtensionArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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;

import com.pulumi.azurenative.compute.inputs.KeyVaultSecretReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineExtensionInstanceViewArgs;
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.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final VirtualMachineExtensionArgs Empty = new VirtualMachineExtensionArgs();

    /**
     * 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 of the extension 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 of the extension available.
     * 
     */
    public Optional> enableAutomaticUpgrade() {
        return Optional.ofNullable(this.enableAutomaticUpgrade);
    }

    /**
     * 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 virtual machine extension instance view.
     * 
     */
    @Import(name="instanceView")
    private @Nullable Output instanceView;

    /**
     * @return The virtual machine extension instance view.
     * 
     */
    public Optional> instanceView() {
        return Optional.ofNullable(this.instanceView);
    }

    /**
     * Resource location
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location
     * 
     */
    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 extensions protected settings that are passed by reference, and consumed from key vault
     * 
     */
    @Import(name="protectedSettingsFromKeyVault")
    private @Nullable Output protectedSettingsFromKeyVault;

    /**
     * @return The extensions protected settings that are passed by reference, and consumed from key vault
     * 
     */
    public Optional> protectedSettingsFromKeyVault() {
        return Optional.ofNullable(this.protectedSettingsFromKeyVault);
    }

    /**
     * Collection of extension names after which this extension needs to be provisioned.
     * 
     */
    @Import(name="provisionAfterExtensions")
    private @Nullable Output> provisionAfterExtensions;

    /**
     * @return Collection of extension names after which this extension needs to be provisioned.
     * 
     */
    public Optional>> provisionAfterExtensions() {
        return Optional.ofNullable(this.provisionAfterExtensions);
    }

    /**
     * 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);
    }

    /**
     * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
     * 
     */
    @Import(name="suppressFailures")
    private @Nullable Output suppressFailures;

    /**
     * @return Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
     * 
     */
    public Optional> suppressFailures() {
        return Optional.ofNullable(this.suppressFailures);
    }

    /**
     * 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 virtual machine extension.
     * 
     */
    @Import(name="vmExtensionName")
    private @Nullable Output vmExtensionName;

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

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

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

    private VirtualMachineExtensionArgs() {}

    private VirtualMachineExtensionArgs(VirtualMachineExtensionArgs $) {
        this.autoUpgradeMinorVersion = $.autoUpgradeMinorVersion;
        this.enableAutomaticUpgrade = $.enableAutomaticUpgrade;
        this.forceUpdateTag = $.forceUpdateTag;
        this.instanceView = $.instanceView;
        this.location = $.location;
        this.protectedSettings = $.protectedSettings;
        this.protectedSettingsFromKeyVault = $.protectedSettingsFromKeyVault;
        this.provisionAfterExtensions = $.provisionAfterExtensions;
        this.publisher = $.publisher;
        this.resourceGroupName = $.resourceGroupName;
        this.settings = $.settings;
        this.suppressFailures = $.suppressFailures;
        this.tags = $.tags;
        this.type = $.type;
        this.typeHandlerVersion = $.typeHandlerVersion;
        this.vmExtensionName = $.vmExtensionName;
        this.vmName = $.vmName;
    }

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

    public static final class Builder {
        private VirtualMachineExtensionArgs $;

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

        public Builder(VirtualMachineExtensionArgs defaults) {
            $ = new VirtualMachineExtensionArgs(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 of the extension 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 of the extension available.
         * 
         * @return builder
         * 
         */
        public Builder enableAutomaticUpgrade(Boolean enableAutomaticUpgrade) {
            return enableAutomaticUpgrade(Output.of(enableAutomaticUpgrade));
        }

        /**
         * @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 instanceView The virtual machine extension instance view.
         * 
         * @return builder
         * 
         */
        public Builder instanceView(@Nullable Output instanceView) {
            $.instanceView = instanceView;
            return this;
        }

        /**
         * @param instanceView The virtual machine extension instance view.
         * 
         * @return builder
         * 
         */
        public Builder instanceView(VirtualMachineExtensionInstanceViewArgs instanceView) {
            return instanceView(Output.of(instanceView));
        }

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

        /**
         * @param location Resource location
         * 
         * @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 protectedSettingsFromKeyVault The extensions protected settings that are passed by reference, and consumed from key vault
         * 
         * @return builder
         * 
         */
        public Builder protectedSettingsFromKeyVault(@Nullable Output protectedSettingsFromKeyVault) {
            $.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault;
            return this;
        }

        /**
         * @param protectedSettingsFromKeyVault The extensions protected settings that are passed by reference, and consumed from key vault
         * 
         * @return builder
         * 
         */
        public Builder protectedSettingsFromKeyVault(KeyVaultSecretReferenceArgs protectedSettingsFromKeyVault) {
            return protectedSettingsFromKeyVault(Output.of(protectedSettingsFromKeyVault));
        }

        /**
         * @param provisionAfterExtensions Collection of extension names after which this extension needs to be provisioned.
         * 
         * @return builder
         * 
         */
        public Builder provisionAfterExtensions(@Nullable Output> provisionAfterExtensions) {
            $.provisionAfterExtensions = provisionAfterExtensions;
            return this;
        }

        /**
         * @param provisionAfterExtensions Collection of extension names after which this extension needs to be provisioned.
         * 
         * @return builder
         * 
         */
        public Builder provisionAfterExtensions(List provisionAfterExtensions) {
            return provisionAfterExtensions(Output.of(provisionAfterExtensions));
        }

        /**
         * @param provisionAfterExtensions Collection of extension names after which this extension needs to be provisioned.
         * 
         * @return builder
         * 
         */
        public Builder provisionAfterExtensions(String... provisionAfterExtensions) {
            return provisionAfterExtensions(List.of(provisionAfterExtensions));
        }

        /**
         * @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 suppressFailures Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
         * 
         * @return builder
         * 
         */
        public Builder suppressFailures(@Nullable Output suppressFailures) {
            $.suppressFailures = suppressFailures;
            return this;
        }

        /**
         * @param suppressFailures Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
         * 
         * @return builder
         * 
         */
        public Builder suppressFailures(Boolean suppressFailures) {
            return suppressFailures(Output.of(suppressFailures));
        }

        /**
         * @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 vmExtensionName The name of the virtual machine extension.
         * 
         * @return builder
         * 
         */
        public Builder vmExtensionName(@Nullable Output vmExtensionName) {
            $.vmExtensionName = vmExtensionName;
            return this;
        }

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

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

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

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

}