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

com.pulumi.azurenative.containerservice.AutoUpgradeProfileArgs 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.containerservice;

import com.pulumi.azurenative.containerservice.enums.UpgradeChannel;
import com.pulumi.azurenative.containerservice.inputs.AutoUpgradeNodeImageSelectionArgs;
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.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AutoUpgradeProfileArgs Empty = new AutoUpgradeProfileArgs();

    /**
     * The name of the AutoUpgradeProfile resource.
     * 
     */
    @Import(name="autoUpgradeProfileName")
    private @Nullable Output autoUpgradeProfileName;

    /**
     * @return The name of the AutoUpgradeProfile resource.
     * 
     */
    public Optional> autoUpgradeProfileName() {
        return Optional.ofNullable(this.autoUpgradeProfileName);
    }

    /**
     * Configures how auto-upgrade will be run.
     * 
     */
    @Import(name="channel", required=true)
    private Output> channel;

    /**
     * @return Configures how auto-upgrade will be run.
     * 
     */
    public Output> channel() {
        return this.channel;
    }

    /**
     * If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
     * If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
     * This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
     * By default, this is set to False.
     * 
     */
    @Import(name="disabled")
    private @Nullable Output disabled;

    /**
     * @return If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
     * If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
     * This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
     * By default, this is set to False.
     * 
     */
    public Optional> disabled() {
        return Optional.ofNullable(this.disabled);
    }

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

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

    /**
     * The node image upgrade to be applied to the target clusters in auto upgrade.
     * 
     */
    @Import(name="nodeImageSelection")
    private @Nullable Output nodeImageSelection;

    /**
     * @return The node image upgrade to be applied to the target clusters in auto upgrade.
     * 
     */
    public Optional> nodeImageSelection() {
        return Optional.ofNullable(this.nodeImageSelection);
    }

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

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

    /**
     * The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.
     * 
     */
    @Import(name="updateStrategyId")
    private @Nullable Output updateStrategyId;

    /**
     * @return The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.
     * 
     */
    public Optional> updateStrategyId() {
        return Optional.ofNullable(this.updateStrategyId);
    }

    private AutoUpgradeProfileArgs() {}

    private AutoUpgradeProfileArgs(AutoUpgradeProfileArgs $) {
        this.autoUpgradeProfileName = $.autoUpgradeProfileName;
        this.channel = $.channel;
        this.disabled = $.disabled;
        this.fleetName = $.fleetName;
        this.nodeImageSelection = $.nodeImageSelection;
        this.resourceGroupName = $.resourceGroupName;
        this.updateStrategyId = $.updateStrategyId;
    }

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

    public static final class Builder {
        private AutoUpgradeProfileArgs $;

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

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

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

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

        /**
         * @param channel Configures how auto-upgrade will be run.
         * 
         * @return builder
         * 
         */
        public Builder channel(Output> channel) {
            $.channel = channel;
            return this;
        }

        /**
         * @param channel Configures how auto-upgrade will be run.
         * 
         * @return builder
         * 
         */
        public Builder channel(Either channel) {
            return channel(Output.of(channel));
        }

        /**
         * @param channel Configures how auto-upgrade will be run.
         * 
         * @return builder
         * 
         */
        public Builder channel(String channel) {
            return channel(Either.ofLeft(channel));
        }

        /**
         * @param channel Configures how auto-upgrade will be run.
         * 
         * @return builder
         * 
         */
        public Builder channel(UpgradeChannel channel) {
            return channel(Either.ofRight(channel));
        }

        /**
         * @param disabled If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
         * If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
         * This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
         * By default, this is set to False.
         * 
         * @return builder
         * 
         */
        public Builder disabled(@Nullable Output disabled) {
            $.disabled = disabled;
            return this;
        }

        /**
         * @param disabled If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule.
         * If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters.
         * This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile.
         * By default, this is set to False.
         * 
         * @return builder
         * 
         */
        public Builder disabled(Boolean disabled) {
            return disabled(Output.of(disabled));
        }

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

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

        /**
         * @param nodeImageSelection The node image upgrade to be applied to the target clusters in auto upgrade.
         * 
         * @return builder
         * 
         */
        public Builder nodeImageSelection(@Nullable Output nodeImageSelection) {
            $.nodeImageSelection = nodeImageSelection;
            return this;
        }

        /**
         * @param nodeImageSelection The node image upgrade to be applied to the target clusters in auto upgrade.
         * 
         * @return builder
         * 
         */
        public Builder nodeImageSelection(AutoUpgradeNodeImageSelectionArgs nodeImageSelection) {
            return nodeImageSelection(Output.of(nodeImageSelection));
        }

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

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

        /**
         * @param updateStrategyId The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.
         * 
         * @return builder
         * 
         */
        public Builder updateStrategyId(@Nullable Output updateStrategyId) {
            $.updateStrategyId = updateStrategyId;
            return this;
        }

        /**
         * @param updateStrategyId The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.
         * 
         * @return builder
         * 
         */
        public Builder updateStrategyId(String updateStrategyId) {
            return updateStrategyId(Output.of(updateStrategyId));
        }

        public AutoUpgradeProfileArgs build() {
            if ($.channel == null) {
                throw new MissingRequiredPropertyException("AutoUpgradeProfileArgs", "channel");
            }
            if ($.fleetName == null) {
                throw new MissingRequiredPropertyException("AutoUpgradeProfileArgs", "fleetName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("AutoUpgradeProfileArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy