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

com.pulumi.kubernetes.batch.v1.inputs.SuccessPolicyPatchArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.kubernetes.batch.v1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.kubernetes.batch.v1.inputs.SuccessPolicyRulePatchArgs;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.
 * 
 */
public final class SuccessPolicyPatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final SuccessPolicyPatchArgs Empty = new SuccessPolicyPatchArgs();

    /**
     * rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
     * 
     */
    @Import(name="rules")
    private @Nullable Output> rules;

    /**
     * @return rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
     * 
     */
    public Optional>> rules() {
        return Optional.ofNullable(this.rules);
    }

    private SuccessPolicyPatchArgs() {}

    private SuccessPolicyPatchArgs(SuccessPolicyPatchArgs $) {
        this.rules = $.rules;
    }

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

    public static final class Builder {
        private SuccessPolicyPatchArgs $;

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

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

        /**
         * @param rules rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
         * 
         * @return builder
         * 
         */
        public Builder rules(@Nullable Output> rules) {
            $.rules = rules;
            return this;
        }

        /**
         * @param rules rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
         * 
         * @return builder
         * 
         */
        public Builder rules(List rules) {
            return rules(Output.of(rules));
        }

        /**
         * @param rules rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
         * 
         * @return builder
         * 
         */
        public Builder rules(SuccessPolicyRulePatchArgs... rules) {
            return rules(List.of(rules));
        }

        public SuccessPolicyPatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy