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

com.pulumi.azurenative.app.inputs.JobConfigurationArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.app.inputs;

import com.pulumi.azurenative.app.enums.TriggerType;
import com.pulumi.azurenative.app.inputs.JobConfigurationEventTriggerConfigArgs;
import com.pulumi.azurenative.app.inputs.JobConfigurationManualTriggerConfigArgs;
import com.pulumi.azurenative.app.inputs.JobConfigurationScheduleTriggerConfigArgs;
import com.pulumi.azurenative.app.inputs.RegistryCredentialsArgs;
import com.pulumi.azurenative.app.inputs.SecretArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Non versioned Container Apps Job configuration properties
 * 
 */
public final class JobConfigurationArgs extends com.pulumi.resources.ResourceArgs {

    public static final JobConfigurationArgs Empty = new JobConfigurationArgs();

    /**
     * Trigger configuration of an event driven job.
     * 
     */
    @Import(name="eventTriggerConfig")
    private @Nullable Output eventTriggerConfig;

    /**
     * @return Trigger configuration of an event driven job.
     * 
     */
    public Optional> eventTriggerConfig() {
        return Optional.ofNullable(this.eventTriggerConfig);
    }

    /**
     * Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default
     * 
     */
    @Import(name="manualTriggerConfig")
    private @Nullable Output manualTriggerConfig;

    /**
     * @return Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default
     * 
     */
    public Optional> manualTriggerConfig() {
        return Optional.ofNullable(this.manualTriggerConfig);
    }

    /**
     * Collection of private container registry credentials used by a Container apps job
     * 
     */
    @Import(name="registries")
    private @Nullable Output> registries;

    /**
     * @return Collection of private container registry credentials used by a Container apps job
     * 
     */
    public Optional>> registries() {
        return Optional.ofNullable(this.registries);
    }

    /**
     * Maximum number of retries before failing the job.
     * 
     */
    @Import(name="replicaRetryLimit")
    private @Nullable Output replicaRetryLimit;

    /**
     * @return Maximum number of retries before failing the job.
     * 
     */
    public Optional> replicaRetryLimit() {
        return Optional.ofNullable(this.replicaRetryLimit);
    }

    /**
     * Maximum number of seconds a replica is allowed to run.
     * 
     */
    @Import(name="replicaTimeout", required=true)
    private Output replicaTimeout;

    /**
     * @return Maximum number of seconds a replica is allowed to run.
     * 
     */
    public Output replicaTimeout() {
        return this.replicaTimeout;
    }

    /**
     * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default
     * 
     */
    @Import(name="scheduleTriggerConfig")
    private @Nullable Output scheduleTriggerConfig;

    /**
     * @return Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default
     * 
     */
    public Optional> scheduleTriggerConfig() {
        return Optional.ofNullable(this.scheduleTriggerConfig);
    }

    /**
     * Collection of secrets used by a Container Apps Job
     * 
     */
    @Import(name="secrets")
    private @Nullable Output> secrets;

    /**
     * @return Collection of secrets used by a Container Apps Job
     * 
     */
    public Optional>> secrets() {
        return Optional.ofNullable(this.secrets);
    }

    /**
     * Trigger type of the job
     * 
     */
    @Import(name="triggerType", required=true)
    private Output> triggerType;

    /**
     * @return Trigger type of the job
     * 
     */
    public Output> triggerType() {
        return this.triggerType;
    }

    private JobConfigurationArgs() {}

    private JobConfigurationArgs(JobConfigurationArgs $) {
        this.eventTriggerConfig = $.eventTriggerConfig;
        this.manualTriggerConfig = $.manualTriggerConfig;
        this.registries = $.registries;
        this.replicaRetryLimit = $.replicaRetryLimit;
        this.replicaTimeout = $.replicaTimeout;
        this.scheduleTriggerConfig = $.scheduleTriggerConfig;
        this.secrets = $.secrets;
        this.triggerType = $.triggerType;
    }

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

    public static final class Builder {
        private JobConfigurationArgs $;

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

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

        /**
         * @param eventTriggerConfig Trigger configuration of an event driven job.
         * 
         * @return builder
         * 
         */
        public Builder eventTriggerConfig(@Nullable Output eventTriggerConfig) {
            $.eventTriggerConfig = eventTriggerConfig;
            return this;
        }

        /**
         * @param eventTriggerConfig Trigger configuration of an event driven job.
         * 
         * @return builder
         * 
         */
        public Builder eventTriggerConfig(JobConfigurationEventTriggerConfigArgs eventTriggerConfig) {
            return eventTriggerConfig(Output.of(eventTriggerConfig));
        }

        /**
         * @param manualTriggerConfig Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default
         * 
         * @return builder
         * 
         */
        public Builder manualTriggerConfig(@Nullable Output manualTriggerConfig) {
            $.manualTriggerConfig = manualTriggerConfig;
            return this;
        }

        /**
         * @param manualTriggerConfig Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default
         * 
         * @return builder
         * 
         */
        public Builder manualTriggerConfig(JobConfigurationManualTriggerConfigArgs manualTriggerConfig) {
            return manualTriggerConfig(Output.of(manualTriggerConfig));
        }

        /**
         * @param registries Collection of private container registry credentials used by a Container apps job
         * 
         * @return builder
         * 
         */
        public Builder registries(@Nullable Output> registries) {
            $.registries = registries;
            return this;
        }

        /**
         * @param registries Collection of private container registry credentials used by a Container apps job
         * 
         * @return builder
         * 
         */
        public Builder registries(List registries) {
            return registries(Output.of(registries));
        }

        /**
         * @param registries Collection of private container registry credentials used by a Container apps job
         * 
         * @return builder
         * 
         */
        public Builder registries(RegistryCredentialsArgs... registries) {
            return registries(List.of(registries));
        }

        /**
         * @param replicaRetryLimit Maximum number of retries before failing the job.
         * 
         * @return builder
         * 
         */
        public Builder replicaRetryLimit(@Nullable Output replicaRetryLimit) {
            $.replicaRetryLimit = replicaRetryLimit;
            return this;
        }

        /**
         * @param replicaRetryLimit Maximum number of retries before failing the job.
         * 
         * @return builder
         * 
         */
        public Builder replicaRetryLimit(Integer replicaRetryLimit) {
            return replicaRetryLimit(Output.of(replicaRetryLimit));
        }

        /**
         * @param replicaTimeout Maximum number of seconds a replica is allowed to run.
         * 
         * @return builder
         * 
         */
        public Builder replicaTimeout(Output replicaTimeout) {
            $.replicaTimeout = replicaTimeout;
            return this;
        }

        /**
         * @param replicaTimeout Maximum number of seconds a replica is allowed to run.
         * 
         * @return builder
         * 
         */
        public Builder replicaTimeout(Integer replicaTimeout) {
            return replicaTimeout(Output.of(replicaTimeout));
        }

        /**
         * @param scheduleTriggerConfig Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default
         * 
         * @return builder
         * 
         */
        public Builder scheduleTriggerConfig(@Nullable Output scheduleTriggerConfig) {
            $.scheduleTriggerConfig = scheduleTriggerConfig;
            return this;
        }

        /**
         * @param scheduleTriggerConfig Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default
         * 
         * @return builder
         * 
         */
        public Builder scheduleTriggerConfig(JobConfigurationScheduleTriggerConfigArgs scheduleTriggerConfig) {
            return scheduleTriggerConfig(Output.of(scheduleTriggerConfig));
        }

        /**
         * @param secrets Collection of secrets used by a Container Apps Job
         * 
         * @return builder
         * 
         */
        public Builder secrets(@Nullable Output> secrets) {
            $.secrets = secrets;
            return this;
        }

        /**
         * @param secrets Collection of secrets used by a Container Apps Job
         * 
         * @return builder
         * 
         */
        public Builder secrets(List secrets) {
            return secrets(Output.of(secrets));
        }

        /**
         * @param secrets Collection of secrets used by a Container Apps Job
         * 
         * @return builder
         * 
         */
        public Builder secrets(SecretArgs... secrets) {
            return secrets(List.of(secrets));
        }

        /**
         * @param triggerType Trigger type of the job
         * 
         * @return builder
         * 
         */
        public Builder triggerType(Output> triggerType) {
            $.triggerType = triggerType;
            return this;
        }

        /**
         * @param triggerType Trigger type of the job
         * 
         * @return builder
         * 
         */
        public Builder triggerType(Either triggerType) {
            return triggerType(Output.of(triggerType));
        }

        /**
         * @param triggerType Trigger type of the job
         * 
         * @return builder
         * 
         */
        public Builder triggerType(String triggerType) {
            return triggerType(Either.ofLeft(triggerType));
        }

        /**
         * @param triggerType Trigger type of the job
         * 
         * @return builder
         * 
         */
        public Builder triggerType(TriggerType triggerType) {
            return triggerType(Either.ofRight(triggerType));
        }

        public JobConfigurationArgs build() {
            if ($.replicaTimeout == null) {
                throw new MissingRequiredPropertyException("JobConfigurationArgs", "replicaTimeout");
            }
            $.triggerType = Codegen.stringProp("triggerType").left(TriggerType.class).output().arg($.triggerType).def("Manual").require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy