Job

class Job : KotlinCustomResource

Manages a Batch Job.

Example Usage

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.batch.Account;
import com.pulumi.azure.batch.AccountArgs;
import com.pulumi.azure.batch.Pool;
import com.pulumi.azure.batch.PoolArgs;
import com.pulumi.azure.batch.inputs.PoolFixedScaleArgs;
import com.pulumi.azure.batch.inputs.PoolStorageImageReferenceArgs;
import com.pulumi.azure.batch.Job;
import com.pulumi.azure.batch.JobArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("west europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
var examplePool = new Pool("examplePool", PoolArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.accountName(exampleAccount.name())
.nodeAgentSkuId("batch.node.ubuntu 16.04")
.vmSize("Standard_A1")
.fixedScale(PoolFixedScaleArgs.builder()
.targetDedicatedNodes(1)
.build())
.storageImageReference(PoolStorageImageReferenceArgs.builder()
.publisher("Canonical")
.offer("UbuntuServer")
.sku("16.04.0-LTS")
.version("latest")
.build())
.build());
var exampleJob = new Job("exampleJob", JobArgs.builder()
.batchPoolId(examplePool.id())
.build());
}
}

Import

Batch Jobs can be imported using the resource id, e.g.

$ pulumi import azure:batch/job:Job example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Batch/batchAccounts/account1/pools/pool1/jobs/job1

Properties

Link copied to clipboard
val batchPoolId: Output<String>

The ID of the Batch Pool. Changing this forces a new Batch Job to be created.

Link copied to clipboard

Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.

Link copied to clipboard
val displayName: Output<String>?

The display name of this Batch Job. Changing this forces a new Batch Job to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.

Link copied to clipboard
val priority: Output<Int>?

The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to 0.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val taskRetryMaximum: Output<Int>?

The number of retries to each Batch Task belongs to this Batch Job. If this is set to 0, the Batch service does not retry Tasks. If this is set to -1, the Batch service retries Batch Tasks without limit. Default value is 0.

Link copied to clipboard
val urn: Output<String>