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

com.pulumi.docker.inputs.ServiceUpdateConfigArgs Maven / Gradle / Ivy

There is a newer version: 4.7.0-alpha.1705607229+34a07055
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.docker.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServiceUpdateConfigArgs Empty = new ServiceUpdateConfigArgs();

    /**
     * Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
     * 
     */
    @Import(name="delay")
    private @Nullable Output delay;

    /**
     * @return Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
     * 
     */
    public Optional> delay() {
        return Optional.ofNullable(this.delay);
    }

    /**
     * Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
     * 
     */
    @Import(name="failureAction")
    private @Nullable Output failureAction;

    /**
     * @return Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
     * 
     */
    public Optional> failureAction() {
        return Optional.ofNullable(this.failureAction);
    }

    /**
     * Failure rate to tolerate during an update. Defaults to `0.0`.
     * 
     */
    @Import(name="maxFailureRatio")
    private @Nullable Output maxFailureRatio;

    /**
     * @return Failure rate to tolerate during an update. Defaults to `0.0`.
     * 
     */
    public Optional> maxFailureRatio() {
        return Optional.ofNullable(this.maxFailureRatio);
    }

    /**
     * Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
     * 
     */
    @Import(name="monitor")
    private @Nullable Output monitor;

    /**
     * @return Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
     * 
     */
    public Optional> monitor() {
        return Optional.ofNullable(this.monitor);
    }

    /**
     * Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
     * 
     */
    @Import(name="order")
    private @Nullable Output order;

    /**
     * @return Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
     * 
     */
    public Optional> order() {
        return Optional.ofNullable(this.order);
    }

    /**
     * Maximum number of tasks to be updated in one iteration. Defaults to `1`
     * 
     */
    @Import(name="parallelism")
    private @Nullable Output parallelism;

    /**
     * @return Maximum number of tasks to be updated in one iteration. Defaults to `1`
     * 
     */
    public Optional> parallelism() {
        return Optional.ofNullable(this.parallelism);
    }

    private ServiceUpdateConfigArgs() {}

    private ServiceUpdateConfigArgs(ServiceUpdateConfigArgs $) {
        this.delay = $.delay;
        this.failureAction = $.failureAction;
        this.maxFailureRatio = $.maxFailureRatio;
        this.monitor = $.monitor;
        this.order = $.order;
        this.parallelism = $.parallelism;
    }

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

    public static final class Builder {
        private ServiceUpdateConfigArgs $;

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

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

        /**
         * @param delay Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
         * 
         * @return builder
         * 
         */
        public Builder delay(@Nullable Output delay) {
            $.delay = delay;
            return this;
        }

        /**
         * @param delay Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
         * 
         * @return builder
         * 
         */
        public Builder delay(String delay) {
            return delay(Output.of(delay));
        }

        /**
         * @param failureAction Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
         * 
         * @return builder
         * 
         */
        public Builder failureAction(@Nullable Output failureAction) {
            $.failureAction = failureAction;
            return this;
        }

        /**
         * @param failureAction Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
         * 
         * @return builder
         * 
         */
        public Builder failureAction(String failureAction) {
            return failureAction(Output.of(failureAction));
        }

        /**
         * @param maxFailureRatio Failure rate to tolerate during an update. Defaults to `0.0`.
         * 
         * @return builder
         * 
         */
        public Builder maxFailureRatio(@Nullable Output maxFailureRatio) {
            $.maxFailureRatio = maxFailureRatio;
            return this;
        }

        /**
         * @param maxFailureRatio Failure rate to tolerate during an update. Defaults to `0.0`.
         * 
         * @return builder
         * 
         */
        public Builder maxFailureRatio(String maxFailureRatio) {
            return maxFailureRatio(Output.of(maxFailureRatio));
        }

        /**
         * @param monitor Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
         * 
         * @return builder
         * 
         */
        public Builder monitor(@Nullable Output monitor) {
            $.monitor = monitor;
            return this;
        }

        /**
         * @param monitor Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
         * 
         * @return builder
         * 
         */
        public Builder monitor(String monitor) {
            return monitor(Output.of(monitor));
        }

        /**
         * @param order Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
         * 
         * @return builder
         * 
         */
        public Builder order(@Nullable Output order) {
            $.order = order;
            return this;
        }

        /**
         * @param order Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
         * 
         * @return builder
         * 
         */
        public Builder order(String order) {
            return order(Output.of(order));
        }

        /**
         * @param parallelism Maximum number of tasks to be updated in one iteration. Defaults to `1`
         * 
         * @return builder
         * 
         */
        public Builder parallelism(@Nullable Output parallelism) {
            $.parallelism = parallelism;
            return this;
        }

        /**
         * @param parallelism Maximum number of tasks to be updated in one iteration. Defaults to `1`
         * 
         * @return builder
         * 
         */
        public Builder parallelism(Integer parallelism) {
            return parallelism(Output.of(parallelism));
        }

        public ServiceUpdateConfigArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy