com.pulumi.aws.batch.outputs.JobDefinitionRetryStrategyEvaluateOnExit 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.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class JobDefinitionRetryStrategyEvaluateOnExit {
/**
* @return Action to take if all of the specified conditions are met. The values are not case sensitive. Valid values: `retry`, `exit`.
*
*/
private String action;
/**
* @return Glob pattern to match against the decimal representation of the exit code returned for a job.
*
*/
private @Nullable String onExitCode;
/**
* @return Glob pattern to match against the reason returned for a job.
*
*/
private @Nullable String onReason;
/**
* @return Glob pattern to match against the status reason returned for a job.
*
*/
private @Nullable String onStatusReason;
private JobDefinitionRetryStrategyEvaluateOnExit() {}
/**
* @return Action to take if all of the specified conditions are met. The values are not case sensitive. Valid values: `retry`, `exit`.
*
*/
public String action() {
return this.action;
}
/**
* @return Glob pattern to match against the decimal representation of the exit code returned for a job.
*
*/
public Optional onExitCode() {
return Optional.ofNullable(this.onExitCode);
}
/**
* @return Glob pattern to match against the reason returned for a job.
*
*/
public Optional onReason() {
return Optional.ofNullable(this.onReason);
}
/**
* @return Glob pattern to match against the status reason returned for a job.
*
*/
public Optional onStatusReason() {
return Optional.ofNullable(this.onStatusReason);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(JobDefinitionRetryStrategyEvaluateOnExit defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String action;
private @Nullable String onExitCode;
private @Nullable String onReason;
private @Nullable String onStatusReason;
public Builder() {}
public Builder(JobDefinitionRetryStrategyEvaluateOnExit defaults) {
Objects.requireNonNull(defaults);
this.action = defaults.action;
this.onExitCode = defaults.onExitCode;
this.onReason = defaults.onReason;
this.onStatusReason = defaults.onStatusReason;
}
@CustomType.Setter
public Builder action(String action) {
if (action == null) {
throw new MissingRequiredPropertyException("JobDefinitionRetryStrategyEvaluateOnExit", "action");
}
this.action = action;
return this;
}
@CustomType.Setter
public Builder onExitCode(@Nullable String onExitCode) {
this.onExitCode = onExitCode;
return this;
}
@CustomType.Setter
public Builder onReason(@Nullable String onReason) {
this.onReason = onReason;
return this;
}
@CustomType.Setter
public Builder onStatusReason(@Nullable String onStatusReason) {
this.onStatusReason = onStatusReason;
return this;
}
public JobDefinitionRetryStrategyEvaluateOnExit build() {
final var _resultValue = new JobDefinitionRetryStrategyEvaluateOnExit();
_resultValue.action = action;
_resultValue.onExitCode = onExitCode;
_resultValue.onReason = onReason;
_resultValue.onStatusReason = onStatusReason;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy