com.pulumi.docker.outputs.ServiceUpdateConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker Show documentation
Show all versions of docker Show documentation
A Pulumi package for interacting with Docker in Pulumi programs
// *** 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.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ServiceUpdateConfig {
/**
* @return Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
*
*/
private @Nullable String delay;
/**
* @return Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
*
*/
private @Nullable String failureAction;
/**
* @return Failure rate to tolerate during an update. Defaults to `0.0`.
*
*/
private @Nullable String maxFailureRatio;
/**
* @return Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
*
*/
private @Nullable String monitor;
/**
* @return Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
*
*/
private @Nullable String order;
/**
* @return Maximum number of tasks to be updated in one iteration. Defaults to `1`
*
*/
private @Nullable Integer parallelism;
private ServiceUpdateConfig() {}
/**
* @return Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
*
*/
public Optional delay() {
return Optional.ofNullable(this.delay);
}
/**
* @return Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
*
*/
public Optional failureAction() {
return Optional.ofNullable(this.failureAction);
}
/**
* @return Failure rate to tolerate during an update. Defaults to `0.0`.
*
*/
public Optional maxFailureRatio() {
return Optional.ofNullable(this.maxFailureRatio);
}
/**
* @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);
}
/**
* @return Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
*
*/
public Optional order() {
return Optional.ofNullable(this.order);
}
/**
* @return Maximum number of tasks to be updated in one iteration. Defaults to `1`
*
*/
public Optional parallelism() {
return Optional.ofNullable(this.parallelism);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ServiceUpdateConfig defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String delay;
private @Nullable String failureAction;
private @Nullable String maxFailureRatio;
private @Nullable String monitor;
private @Nullable String order;
private @Nullable Integer parallelism;
public Builder() {}
public Builder(ServiceUpdateConfig defaults) {
Objects.requireNonNull(defaults);
this.delay = defaults.delay;
this.failureAction = defaults.failureAction;
this.maxFailureRatio = defaults.maxFailureRatio;
this.monitor = defaults.monitor;
this.order = defaults.order;
this.parallelism = defaults.parallelism;
}
@CustomType.Setter
public Builder delay(@Nullable String delay) {
this.delay = delay;
return this;
}
@CustomType.Setter
public Builder failureAction(@Nullable String failureAction) {
this.failureAction = failureAction;
return this;
}
@CustomType.Setter
public Builder maxFailureRatio(@Nullable String maxFailureRatio) {
this.maxFailureRatio = maxFailureRatio;
return this;
}
@CustomType.Setter
public Builder monitor(@Nullable String monitor) {
this.monitor = monitor;
return this;
}
@CustomType.Setter
public Builder order(@Nullable String order) {
this.order = order;
return this;
}
@CustomType.Setter
public Builder parallelism(@Nullable Integer parallelism) {
this.parallelism = parallelism;
return this;
}
public ServiceUpdateConfig build() {
final var _resultValue = new ServiceUpdateConfig();
_resultValue.delay = delay;
_resultValue.failureAction = failureAction;
_resultValue.maxFailureRatio = maxFailureRatio;
_resultValue.monitor = monitor;
_resultValue.order = order;
_resultValue.parallelism = parallelism;
return _resultValue;
}
}
}