
com.pulumi.azure.containerapp.kotlin.JobArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.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=azure.containerapp.JobManualTriggerConfigArgs(
* parallelism=4,
* replica_completion_count=1,
* ),
* template=azure.containerapp.JobTemplateArgs(
* containers=[azure.containerapp.JobTemplateContainerArgs(
* image="repo/testcontainerAppsJob0:v1",
* name="testcontainerappsjob0",
* readiness_probes=[azure.containerapp.JobTemplateContainerReadinessProbeArgs(
* transport="HTTP",
* port=5000,
* )],
* liveness_probes=[azure.containerapp.JobTemplateContainerLivenessProbeArgs(
* transport="HTTP",
* port=5000,
* path="/health",
* headers=[azure.containerapp.JobTemplateContainerLivenessProbeHeaderArgs(
* name="Cache-Control",
* value="no-cache",
* )],
* initial_delay=5,
* interval_seconds=20,
* timeout=2,
* failure_count_threshold=1,
* )],
* startup_probes=[azure.containerapp.JobTemplateContainerStartupProbeArgs(
* 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 A `registries` block 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 secrets A `secrets` block as defined below.
* @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,
public val registries: Output>? = null,
public val replicaRetryLimit: Output? = null,
public val replicaTimeoutInSeconds: Output? = null,
public val resourceGroupName: Output? = null,
public val scheduleTriggerConfig: Output? = null,
public val secrets: Output>? = null,
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy