
com.pulumi.aws.batch.outputs.JobDefinitionRetryStrategy Maven / Gradle / Ivy
// *** 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.aws.batch.outputs;
import com.pulumi.aws.batch.outputs.JobDefinitionRetryStrategyEvaluateOnExit;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class JobDefinitionRetryStrategy {
/**
* @return Number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts.
*
*/
private @Nullable Integer attempts;
/**
* @return Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
*
*/
private @Nullable List evaluateOnExits;
private JobDefinitionRetryStrategy() {}
/**
* @return Number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts.
*
*/
public Optional attempts() {
return Optional.ofNullable(this.attempts);
}
/**
* @return Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
*
*/
public List evaluateOnExits() {
return this.evaluateOnExits == null ? List.of() : this.evaluateOnExits;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(JobDefinitionRetryStrategy defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer attempts;
private @Nullable List evaluateOnExits;
public Builder() {}
public Builder(JobDefinitionRetryStrategy defaults) {
Objects.requireNonNull(defaults);
this.attempts = defaults.attempts;
this.evaluateOnExits = defaults.evaluateOnExits;
}
@CustomType.Setter
public Builder attempts(@Nullable Integer attempts) {
this.attempts = attempts;
return this;
}
@CustomType.Setter
public Builder evaluateOnExits(@Nullable List evaluateOnExits) {
this.evaluateOnExits = evaluateOnExits;
return this;
}
public Builder evaluateOnExits(JobDefinitionRetryStrategyEvaluateOnExit... evaluateOnExits) {
return evaluateOnExits(List.of(evaluateOnExits));
}
public JobDefinitionRetryStrategy build() {
final var _resultValue = new JobDefinitionRetryStrategy();
_resultValue.attempts = attempts;
_resultValue.evaluateOnExits = evaluateOnExits;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy