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

com.pulumi.azure.containerapp.kotlin.JobArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.containerapp.kotlin

import com.pulumi.azure.containerapp.JobArgs.builder
import com.pulumi.azure.containerapp.kotlin.inputs.JobEventTriggerConfigArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobEventTriggerConfigArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.JobIdentityArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobIdentityArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.JobManualTriggerConfigArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobManualTriggerConfigArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.JobRegistryArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobRegistryArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.JobScheduleTriggerConfigArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobScheduleTriggerConfigArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.JobSecretArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobSecretArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.JobTemplateArgs
import com.pulumi.azure.containerapp.kotlin.inputs.JobTemplateArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Container App Job.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
 *     name: "example-log-analytics-workspace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "PerGB2018",
 *     retentionInDays: 30,
 * });
 * const exampleEnvironment = new azure.containerapp.Environment("example", {
 *     name: "example-container-app-environment",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     logAnalyticsWorkspaceId: exampleAnalyticsWorkspace.id,
 * });
 * const exampleJob = new azure.containerapp.Job("example", {
 *     name: "example-container-app-job",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     containerAppEnvironmentId: exampleEnvironment.id,
 *     replicaTimeoutInSeconds: 10,
 *     replicaRetryLimit: 10,
 *     manualTriggerConfig: {
 *         parallelism: 4,
 *         replicaCompletionCount: 1,
 *     },
 *     template: {
 *         containers: [{
 *             image: "repo/testcontainerAppsJob0:v1",
 *             name: "testcontainerappsjob0",
 *             readinessProbes: [{
 *                 transport: "HTTP",
 *                 port: 5000,
 *             }],
 *             livenessProbes: [{
 *                 transport: "HTTP",
 *                 port: 5000,
 *                 path: "/health",
 *                 headers: [{
 *                     name: "Cache-Control",
 *                     value: "no-cache",
 *                 }],
 *                 initialDelay: 5,
 *                 intervalSeconds: 20,
 *                 timeout: 2,
 *                 failureCountThreshold: 1,
 *             }],
 *             startupProbes: [{
 *                 transport: "TCP",
 *                 port: 5000,
 *             }],
 *             cpu: 0.5,
 *             memory: "1Gi",
 *         }],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
 *     name="example-log-analytics-workspace",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="PerGB2018",
 *     retention_in_days=30)
 * example_environment = azure.containerapp.Environment("example",
 *     name="example-container-app-environment",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     log_analytics_workspace_id=example_analytics_workspace.id)
 * example_job = azure.containerapp.Job("example",
 *     name="example-container-app-job",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     container_app_environment_id=example_environment.id,
 *     replica_timeout_in_seconds=10,
 *     replica_retry_limit=10,
 *     manual_trigger_config={
 *         "parallelism": 4,
 *         "replica_completion_count": 1,
 *     },
 *     template={
 *         "containers": [{
 *             "image": "repo/testcontainerAppsJob0:v1",
 *             "name": "testcontainerappsjob0",
 *             "readiness_probes": [{
 *                 "transport": "HTTP",
 *                 "port": 5000,
 *             }],
 *             "liveness_probes": [{
 *                 "transport": "HTTP",
 *                 "port": 5000,
 *                 "path": "/health",
 *                 "headers": [{
 *                     "name": "Cache-Control",
 *                     "value": "no-cache",
 *                 }],
 *                 "initial_delay": 5,
 *                 "interval_seconds": 20,
 *                 "timeout": 2,
 *                 "failure_count_threshold": 1,
 *             }],
 *             "startup_probes": [{
 *                 "transport": "TCP",
 *                 "port": 5000,
 *             }],
 *             "cpu": 0.5,
 *             "memory": "1Gi",
 *         }],
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
 *     {
 *         Name = "example-log-analytics-workspace",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "PerGB2018",
 *         RetentionInDays = 30,
 *     });
 *     var exampleEnvironment = new Azure.ContainerApp.Environment("example", new()
 *     {
 *         Name = "example-container-app-environment",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         LogAnalyticsWorkspaceId = exampleAnalyticsWorkspace.Id,
 *     });
 *     var exampleJob = new Azure.ContainerApp.Job("example", new()
 *     {
 *         Name = "example-container-app-job",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         ContainerAppEnvironmentId = exampleEnvironment.Id,
 *         ReplicaTimeoutInSeconds = 10,
 *         ReplicaRetryLimit = 10,
 *         ManualTriggerConfig = new Azure.ContainerApp.Inputs.JobManualTriggerConfigArgs
 *         {
 *             Parallelism = 4,
 *             ReplicaCompletionCount = 1,
 *         },
 *         Template = new Azure.ContainerApp.Inputs.JobTemplateArgs
 *         {
 *             Containers = new[]
 *             {
 *                 new Azure.ContainerApp.Inputs.JobTemplateContainerArgs
 *                 {
 *                     Image = "repo/testcontainerAppsJob0:v1",
 *                     Name = "testcontainerappsjob0",
 *                     ReadinessProbes = new[]
 *                     {
 *                         new Azure.ContainerApp.Inputs.JobTemplateContainerReadinessProbeArgs
 *                         {
 *                             Transport = "HTTP",
 *                             Port = 5000,
 *                         },
 *                     },
 *                     LivenessProbes = new[]
 *                     {
 *                         new Azure.ContainerApp.Inputs.JobTemplateContainerLivenessProbeArgs
 *                         {
 *                             Transport = "HTTP",
 *                             Port = 5000,
 *                             Path = "/health",
 *                             Headers = new[]
 *                             {
 *                                 new Azure.ContainerApp.Inputs.JobTemplateContainerLivenessProbeHeaderArgs
 *                                 {
 *                                     Name = "Cache-Control",
 *                                     Value = "no-cache",
 *                                 },
 *                             },
 *                             InitialDelay = 5,
 *                             IntervalSeconds = 20,
 *                             Timeout = 2,
 *                             FailureCountThreshold = 1,
 *                         },
 *                     },
 *                     StartupProbes = new[]
 *                     {
 *                         new Azure.ContainerApp.Inputs.JobTemplateContainerStartupProbeArgs
 *                         {
 *                             Transport = "TCP",
 *                             Port = 5000,
 *                         },
 *                     },
 *                     Cpu = 0.5,
 *                     Memory = "1Gi",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerapp"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
 * 			Name:              pulumi.String("example-log-analytics-workspace"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("PerGB2018"),
 * 			RetentionInDays:   pulumi.Int(30),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleEnvironment, err := containerapp.NewEnvironment(ctx, "example", &containerapp.EnvironmentArgs{
 * 			Name:                    pulumi.String("example-container-app-environment"),
 * 			Location:                example.Location,
 * 			ResourceGroupName:       example.Name,
 * 			LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = containerapp.NewJob(ctx, "example", &containerapp.JobArgs{
 * 			Name:                      pulumi.String("example-container-app-job"),
 * 			Location:                  example.Location,
 * 			ResourceGroupName:         example.Name,
 * 			ContainerAppEnvironmentId: exampleEnvironment.ID(),
 * 			ReplicaTimeoutInSeconds:   pulumi.Int(10),
 * 			ReplicaRetryLimit:         pulumi.Int(10),
 * 			ManualTriggerConfig: &containerapp.JobManualTriggerConfigArgs{
 * 				Parallelism:            pulumi.Int(4),
 * 				ReplicaCompletionCount: pulumi.Int(1),
 * 			},
 * 			Template: &containerapp.JobTemplateArgs{
 * 				Containers: containerapp.JobTemplateContainerArray{
 * 					&containerapp.JobTemplateContainerArgs{
 * 						Image: pulumi.String("repo/testcontainerAppsJob0:v1"),
 * 						Name:  pulumi.String("testcontainerappsjob0"),
 * 						ReadinessProbes: containerapp.JobTemplateContainerReadinessProbeArray{
 * 							&containerapp.JobTemplateContainerReadinessProbeArgs{
 * 								Transport: pulumi.String("HTTP"),
 * 								Port:      pulumi.Int(5000),
 * 							},
 * 						},
 * 						LivenessProbes: containerapp.JobTemplateContainerLivenessProbeArray{
 * 							&containerapp.JobTemplateContainerLivenessProbeArgs{
 * 								Transport: pulumi.String("HTTP"),
 * 								Port:      pulumi.Int(5000),
 * 								Path:      pulumi.String("/health"),
 * 								Headers: containerapp.JobTemplateContainerLivenessProbeHeaderArray{
 * 									&containerapp.JobTemplateContainerLivenessProbeHeaderArgs{
 * 										Name:  pulumi.String("Cache-Control"),
 * 										Value: pulumi.String("no-cache"),
 * 									},
 * 								},
 * 								InitialDelay:          pulumi.Int(5),
 * 								IntervalSeconds:       pulumi.Int(20),
 * 								Timeout:               pulumi.Int(2),
 * 								FailureCountThreshold: pulumi.Int(1),
 * 							},
 * 						},
 * 						StartupProbes: containerapp.JobTemplateContainerStartupProbeArray{
 * 							&containerapp.JobTemplateContainerStartupProbeArgs{
 * 								Transport: pulumi.String("TCP"),
 * 								Port:      pulumi.Int(5000),
 * 							},
 * 						},
 * 						Cpu:    pulumi.Float64(0.5),
 * 						Memory: pulumi.String("1Gi"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
 * import com.pulumi.azure.containerapp.Environment;
 * import com.pulumi.azure.containerapp.EnvironmentArgs;
 * import com.pulumi.azure.containerapp.Job;
 * import com.pulumi.azure.containerapp.JobArgs;
 * import com.pulumi.azure.containerapp.inputs.JobManualTriggerConfigArgs;
 * import com.pulumi.azure.containerapp.inputs.JobTemplateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
 *             .name("example-log-analytics-workspace")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("PerGB2018")
 *             .retentionInDays(30)
 *             .build());
 *         var exampleEnvironment = new Environment("exampleEnvironment", EnvironmentArgs.builder()
 *             .name("example-container-app-environment")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .logAnalyticsWorkspaceId(exampleAnalyticsWorkspace.id())
 *             .build());
 *         var exampleJob = new Job("exampleJob", JobArgs.builder()
 *             .name("example-container-app-job")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .containerAppEnvironmentId(exampleEnvironment.id())
 *             .replicaTimeoutInSeconds(10)
 *             .replicaRetryLimit(10)
 *             .manualTriggerConfig(JobManualTriggerConfigArgs.builder()
 *                 .parallelism(4)
 *                 .replicaCompletionCount(1)
 *                 .build())
 *             .template(JobTemplateArgs.builder()
 *                 .containers(JobTemplateContainerArgs.builder()
 *                     .image("repo/testcontainerAppsJob0:v1")
 *                     .name("testcontainerappsjob0")
 *                     .readinessProbes(JobTemplateContainerReadinessProbeArgs.builder()
 *                         .transport("HTTP")
 *                         .port(5000)
 *                         .build())
 *                     .livenessProbes(JobTemplateContainerLivenessProbeArgs.builder()
 *                         .transport("HTTP")
 *                         .port(5000)
 *                         .path("/health")
 *                         .headers(JobTemplateContainerLivenessProbeHeaderArgs.builder()
 *                             .name("Cache-Control")
 *                             .value("no-cache")
 *                             .build())
 *                         .initialDelay(5)
 *                         .intervalSeconds(20)
 *                         .timeout(2)
 *                         .failureCountThreshold(1)
 *                         .build())
 *                     .startupProbes(JobTemplateContainerStartupProbeArgs.builder()
 *                         .transport("TCP")
 *                         .port(5000)
 *                         .build())
 *                     .cpu(0.5)
 *                     .memory("1Gi")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleAnalyticsWorkspace:
 *     type: azure:operationalinsights:AnalyticsWorkspace
 *     name: example
 *     properties:
 *       name: example-log-analytics-workspace
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: PerGB2018
 *       retentionInDays: 30
 *   exampleEnvironment:
 *     type: azure:containerapp:Environment
 *     name: example
 *     properties:
 *       name: example-container-app-environment
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       logAnalyticsWorkspaceId: ${exampleAnalyticsWorkspace.id}
 *   exampleJob:
 *     type: azure:containerapp:Job
 *     name: example
 *     properties:
 *       name: example-container-app-job
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       containerAppEnvironmentId: ${exampleEnvironment.id}
 *       replicaTimeoutInSeconds: 10
 *       replicaRetryLimit: 10
 *       manualTriggerConfig:
 *         parallelism: 4
 *         replicaCompletionCount: 1
 *       template:
 *         containers:
 *           - image: repo/testcontainerAppsJob0:v1
 *             name: testcontainerappsjob0
 *             readinessProbes:
 *               - transport: HTTP
 *                 port: 5000
 *             livenessProbes:
 *               - transport: HTTP
 *                 port: 5000
 *                 path: /health
 *                 headers:
 *                   - name: Cache-Control
 *                     value: no-cache
 *                 initialDelay: 5
 *                 intervalSeconds: 20
 *                 timeout: 2
 *                 failureCountThreshold: 1
 *             startupProbes:
 *               - transport: TCP
 *                 port: 5000
 *             cpu: 0.5
 *             memory: 1Gi
 * ```
 * 
 * ## Import
 * A Container App Job can be imported using the resource id, e.g.
 * ```sh
 * $ pulumi import azure:containerapp/job:Job example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.App/jobs/example-container-app-job"
 * ```
 * @property containerAppEnvironmentId The ID of the Container App Environment in which to create the Container App Job. Changing this forces a new resource to be created.
 * @property eventTriggerConfig A `event_trigger_config` block as defined below.
 * @property identity A `identity` block as defined below.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property manualTriggerConfig A `manual_trigger_config` block as defined below.
 * @property name Specifies the name of the Container App Job resource. Changing this forces a new resource to be created.
 * @property registries
 * @property registry One or more `registry` blocks as defined below.
 * @property replicaRetryLimit The maximum number of times a replica is allowed to retry.
 * @property replicaTimeoutInSeconds The maximum number of seconds a replica is allowed to run.
 * @property resourceGroupName The name of the resource group in which to create the Container App Job. Changing this forces a new resource to be created.
 * @property scheduleTriggerConfig A `schedule_trigger_config` block as defined below.
 * > ** NOTE **: Only one of `manual_trigger_config`, `event_trigger_config` or `schedule_trigger_config` can be specified.
 * @property secret One or more `secret` blocks as defined below.
 * @property secrets
 * @property tags A mapping of tags to assign to the resource.
 * @property template A `template` block as defined below.
 * @property workloadProfileName The name of the workload profile to use for the Container App Job.
 */
public data class JobArgs(
    public val containerAppEnvironmentId: Output? = null,
    public val eventTriggerConfig: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val manualTriggerConfig: Output? = null,
    public val name: Output? = null,
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    public val registries: Output>? = null,
    public val registry: Output>? = null,
    public val replicaRetryLimit: Output? = null,
    public val replicaTimeoutInSeconds: Output? = null,
    public val resourceGroupName: Output? = null,
    public val scheduleTriggerConfig: Output? = null,
    public val secret: Output>? = null,
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    public val secrets: Output>? = null,
    public val tags: Output>? = null,
    public val template: Output? = null,
    public val workloadProfileName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerapp.JobArgs =
        com.pulumi.azure.containerapp.JobArgs.builder()
            .containerAppEnvironmentId(containerAppEnvironmentId?.applyValue({ args0 -> args0 }))
            .eventTriggerConfig(
                eventTriggerConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .manualTriggerConfig(
                manualTriggerConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .registries(
                registries?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .registry(
                registry?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .replicaRetryLimit(replicaRetryLimit?.applyValue({ args0 -> args0 }))
            .replicaTimeoutInSeconds(replicaTimeoutInSeconds?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .scheduleTriggerConfig(
                scheduleTriggerConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .secret(secret?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .secrets(
                secrets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .template(template?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .workloadProfileName(workloadProfileName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobArgs].
 */
@PulumiTagMarker
public class JobArgsBuilder internal constructor() {
    private var containerAppEnvironmentId: Output? = null

    private var eventTriggerConfig: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var manualTriggerConfig: Output? = null

    private var name: Output? = null

    private var registries: Output>? = null

    private var registry: Output>? = null

    private var replicaRetryLimit: Output? = null

    private var replicaTimeoutInSeconds: Output? = null

    private var resourceGroupName: Output? = null

    private var scheduleTriggerConfig: Output? = null

    private var secret: Output>? = null

    private var secrets: Output>? = null

    private var tags: Output>? = null

    private var template: Output? = null

    private var workloadProfileName: Output? = null

    /**
     * @param value The ID of the Container App Environment in which to create the Container App Job. Changing this forces a new resource to be created.
     */
    @JvmName("cebqsvsadrhhjmmj")
    public suspend fun containerAppEnvironmentId(`value`: Output) {
        this.containerAppEnvironmentId = value
    }

    /**
     * @param value A `event_trigger_config` block as defined below.
     */
    @JvmName("xexsgxldrtmnifor")
    public suspend fun eventTriggerConfig(`value`: Output) {
        this.eventTriggerConfig = value
    }

    /**
     * @param value A `identity` block as defined below.
     */
    @JvmName("gvqupdrxnbftrhyu")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("jlrucbmvprfflnvd")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A `manual_trigger_config` block as defined below.
     */
    @JvmName("hrsaipwmdvvbowqw")
    public suspend fun manualTriggerConfig(`value`: Output) {
        this.manualTriggerConfig = value
    }

    /**
     * @param value Specifies the name of the Container App Job resource. Changing this forces a new resource to be created.
     */
    @JvmName("xlfucopfhqwugfju")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("ofcxpatidygeovmx")
    public suspend fun registries(`value`: Output>) {
        this.registries = value
    }

    @JvmName("fniloruycfpgrbvu")
    public suspend fun registries(vararg values: Output) {
        this.registries = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("pasrbmdjefnxrunr")
    public suspend fun registries(values: List>) {
        this.registries = Output.all(values)
    }

    /**
     * @param value One or more `registry` blocks as defined below.
     */
    @JvmName("lvtwacsekxhcjoxa")
    public suspend fun registry(`value`: Output>) {
        this.registry = value
    }

    @JvmName("ipwuqhhtkciqexuh")
    public suspend fun registry(vararg values: Output) {
        this.registry = Output.all(values.asList())
    }

    /**
     * @param values One or more `registry` blocks as defined below.
     */
    @JvmName("fusyibooqitdewes")
    public suspend fun registry(values: List>) {
        this.registry = Output.all(values)
    }

    /**
     * @param value The maximum number of times a replica is allowed to retry.
     */
    @JvmName("uejwhkmdrglrwgiq")
    public suspend fun replicaRetryLimit(`value`: Output) {
        this.replicaRetryLimit = value
    }

    /**
     * @param value The maximum number of seconds a replica is allowed to run.
     */
    @JvmName("ojsigqssrkcuxdka")
    public suspend fun replicaTimeoutInSeconds(`value`: Output) {
        this.replicaTimeoutInSeconds = value
    }

    /**
     * @param value The name of the resource group in which to create the Container App Job. Changing this forces a new resource to be created.
     */
    @JvmName("gihmylplkdcwdref")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `schedule_trigger_config` block as defined below.
     * > ** NOTE **: Only one of `manual_trigger_config`, `event_trigger_config` or `schedule_trigger_config` can be specified.
     */
    @JvmName("upxvlfqbvftfhvsm")
    public suspend fun scheduleTriggerConfig(`value`: Output) {
        this.scheduleTriggerConfig = value
    }

    /**
     * @param value One or more `secret` blocks as defined below.
     */
    @JvmName("imlnepatxtudqslu")
    public suspend fun secret(`value`: Output>) {
        this.secret = value
    }

    @JvmName("geqsdrdnunbnkfvd")
    public suspend fun secret(vararg values: Output) {
        this.secret = Output.all(values.asList())
    }

    /**
     * @param values One or more `secret` blocks as defined below.
     */
    @JvmName("ufhywkiffvlqrldb")
    public suspend fun secret(values: List>) {
        this.secret = Output.all(values)
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("qqjhpdgkjqicbtow")
    public suspend fun secrets(`value`: Output>) {
        this.secrets = value
    }

    @JvmName("rpuxrbxafbxrcqhv")
    public suspend fun secrets(vararg values: Output) {
        this.secrets = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("fnfqhsrcrfhjeoto")
    public suspend fun secrets(values: List>) {
        this.secrets = Output.all(values)
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("fddrfutipfflkoou")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `template` block as defined below.
     */
    @JvmName("jftdddgnsdlmtcoq")
    public suspend fun template(`value`: Output) {
        this.template = value
    }

    /**
     * @param value The name of the workload profile to use for the Container App Job.
     */
    @JvmName("upybodclwuiisgth")
    public suspend fun workloadProfileName(`value`: Output) {
        this.workloadProfileName = value
    }

    /**
     * @param value The ID of the Container App Environment in which to create the Container App Job. Changing this forces a new resource to be created.
     */
    @JvmName("qosdkdbospojyloi")
    public suspend fun containerAppEnvironmentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerAppEnvironmentId = mapped
    }

    /**
     * @param value A `event_trigger_config` block as defined below.
     */
    @JvmName("knvttpfkudfxlhaf")
    public suspend fun eventTriggerConfig(`value`: JobEventTriggerConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventTriggerConfig = mapped
    }

    /**
     * @param argument A `event_trigger_config` block as defined below.
     */
    @JvmName("ylomhlftngeharvi")
    public suspend fun eventTriggerConfig(argument: suspend JobEventTriggerConfigArgsBuilder.() -> Unit) {
        val toBeMapped = JobEventTriggerConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.eventTriggerConfig = mapped
    }

    /**
     * @param value A `identity` block as defined below.
     */
    @JvmName("hqxoqsjlbuvadsec")
    public suspend fun identity(`value`: JobIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument A `identity` block as defined below.
     */
    @JvmName("ocammmosyqxqejwi")
    public suspend fun identity(argument: suspend JobIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = JobIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("wgkytuqndmshejlw")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value A `manual_trigger_config` block as defined below.
     */
    @JvmName("cqdhxrvdpkownlum")
    public suspend fun manualTriggerConfig(`value`: JobManualTriggerConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.manualTriggerConfig = mapped
    }

    /**
     * @param argument A `manual_trigger_config` block as defined below.
     */
    @JvmName("ltfgrxwgllnjxfpp")
    public suspend fun manualTriggerConfig(argument: suspend JobManualTriggerConfigArgsBuilder.() -> Unit) {
        val toBeMapped = JobManualTriggerConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.manualTriggerConfig = mapped
    }

    /**
     * @param value Specifies the name of the Container App Job resource. Changing this forces a new resource to be created.
     */
    @JvmName("cycqqnxojnhohsxj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("tnsyssxhwlcbiidq")
    public suspend fun registries(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("tacifxajswiuujbf")
    public suspend fun registries(argument: List Unit>) {
        val toBeMapped = argument.toList().map { JobRegistryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("ocdcadludbyvlwhp")
    public suspend fun registries(vararg argument: suspend JobRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { JobRegistryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("fnwnuupwjxpqkqyc")
    public suspend fun registries(argument: suspend JobRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(JobRegistryArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `registries` has been renamed to `registry` and will be removed in version 4.0 of the AzureRM
      Provider.
  """,
    )
    @JvmName("fpmplptnmayneqys")
    public suspend fun registries(vararg values: JobRegistryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param value One or more `registry` blocks as defined below.
     */
    @JvmName("qurnebubpuejbldy")
    public suspend fun registry(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registry = mapped
    }

    /**
     * @param argument One or more `registry` blocks as defined below.
     */
    @JvmName("ngxopthrehmmyfww")
    public suspend fun registry(argument: List Unit>) {
        val toBeMapped = argument.toList().map { JobRegistryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.registry = mapped
    }

    /**
     * @param argument One or more `registry` blocks as defined below.
     */
    @JvmName("mdqkfsmnuaomrhvl")
    public suspend fun registry(vararg argument: suspend JobRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { JobRegistryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.registry = mapped
    }

    /**
     * @param argument One or more `registry` blocks as defined below.
     */
    @JvmName("pufkkmqlwvulgcwg")
    public suspend fun registry(argument: suspend JobRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(JobRegistryArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.registry = mapped
    }

    /**
     * @param values One or more `registry` blocks as defined below.
     */
    @JvmName("xtgbuduhfpfjolts")
    public suspend fun registry(vararg values: JobRegistryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.registry = mapped
    }

    /**
     * @param value The maximum number of times a replica is allowed to retry.
     */
    @JvmName("muqrarwjofsyagwn")
    public suspend fun replicaRetryLimit(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicaRetryLimit = mapped
    }

    /**
     * @param value The maximum number of seconds a replica is allowed to run.
     */
    @JvmName("ietbtodapwhncdbm")
    public suspend fun replicaTimeoutInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicaTimeoutInSeconds = mapped
    }

    /**
     * @param value The name of the resource group in which to create the Container App Job. Changing this forces a new resource to be created.
     */
    @JvmName("kxkwmmawjwmqbxkh")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `schedule_trigger_config` block as defined below.
     * > ** NOTE **: Only one of `manual_trigger_config`, `event_trigger_config` or `schedule_trigger_config` can be specified.
     */
    @JvmName("whxwlvhuvycgbijd")
    public suspend fun scheduleTriggerConfig(`value`: JobScheduleTriggerConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleTriggerConfig = mapped
    }

    /**
     * @param argument A `schedule_trigger_config` block as defined below.
     * > ** NOTE **: Only one of `manual_trigger_config`, `event_trigger_config` or `schedule_trigger_config` can be specified.
     */
    @JvmName("nsrtpxpqpnmwyhys")
    public suspend fun scheduleTriggerConfig(argument: suspend JobScheduleTriggerConfigArgsBuilder.() -> Unit) {
        val toBeMapped = JobScheduleTriggerConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scheduleTriggerConfig = mapped
    }

    /**
     * @param value One or more `secret` blocks as defined below.
     */
    @JvmName("ujylcpppymiqbjct")
    public suspend fun secret(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secret = mapped
    }

    /**
     * @param argument One or more `secret` blocks as defined below.
     */
    @JvmName("pvnvnxsxbtfecvet")
    public suspend fun secret(argument: List Unit>) {
        val toBeMapped = argument.toList().map { JobSecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secret = mapped
    }

    /**
     * @param argument One or more `secret` blocks as defined below.
     */
    @JvmName("gvsfrxfwjtlbjkrk")
    public suspend fun secret(vararg argument: suspend JobSecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { JobSecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secret = mapped
    }

    /**
     * @param argument One or more `secret` blocks as defined below.
     */
    @JvmName("cixvffdetempmsdt")
    public suspend fun secret(argument: suspend JobSecretArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(JobSecretArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.secret = mapped
    }

    /**
     * @param values One or more `secret` blocks as defined below.
     */
    @JvmName("voacxttevmuegwon")
    public suspend fun secret(vararg values: JobSecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secret = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("utsjybgklhbmxwea")
    public suspend fun secrets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("irvbhikcqfvphshs")
    public suspend fun secrets(argument: List Unit>) {
        val toBeMapped = argument.toList().map { JobSecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("olgqfgmldrlncofo")
    public suspend fun secrets(vararg argument: suspend JobSecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { JobSecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("batwgskrqaprdigp")
    public suspend fun secrets(argument: suspend JobSecretArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(JobSecretArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `secrets` has been renamed to `secret` and will be removed in version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("cumjpsoregkotogn")
    public suspend fun secrets(vararg values: JobSecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("hhmpfpmstbguknng")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("sstbmhvqdpopptsg")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `template` block as defined below.
     */
    @JvmName("plpirtnthkljwqki")
    public suspend fun template(`value`: JobTemplateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.template = mapped
    }

    /**
     * @param argument A `template` block as defined below.
     */
    @JvmName("eoaqfuyllvxsuuva")
    public suspend fun template(argument: suspend JobTemplateArgsBuilder.() -> Unit) {
        val toBeMapped = JobTemplateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.template = mapped
    }

    /**
     * @param value The name of the workload profile to use for the Container App Job.
     */
    @JvmName("tnbsmpbypikkopmy")
    public suspend fun workloadProfileName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workloadProfileName = mapped
    }

    internal fun build(): JobArgs = JobArgs(
        containerAppEnvironmentId = containerAppEnvironmentId,
        eventTriggerConfig = eventTriggerConfig,
        identity = identity,
        location = location,
        manualTriggerConfig = manualTriggerConfig,
        name = name,
        registries = registries,
        registry = registry,
        replicaRetryLimit = replicaRetryLimit,
        replicaTimeoutInSeconds = replicaTimeoutInSeconds,
        resourceGroupName = resourceGroupName,
        scheduleTriggerConfig = scheduleTriggerConfig,
        secret = secret,
        secrets = secrets,
        tags = tags,
        template = template,
        workloadProfileName = workloadProfileName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy