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

com.pulumi.azurenative.machinelearningservices.Job 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.machinelearningservices;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.machinelearningservices.JobArgs;
import com.pulumi.azurenative.machinelearningservices.outputs.AutoMLJobResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.CommandJobResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.PipelineJobResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.SweepJobResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * Azure Resource Manager resource envelope.
 * Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2021-03-01-preview.
 * 
 * Other available API versions: 2021-03-01-preview, 2022-02-01-preview, 2023-04-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2023-10-01, 2024-01-01-preview, 2024-04-01, 2024-04-01-preview, 2024-07-01-preview.
 * 
 * ## Example Usage
 * ### CreateOrUpdate AutoML Job.
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.machinelearningservices.Job;
 * import com.pulumi.azurenative.machinelearningservices.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 job = new Job("job", JobArgs.builder()
 *             .id("string")
 *             .jobBaseProperties(AutoMLJobArgs.builder()
 *                 .computeId("string")
 *                 .description("string")
 *                 .displayName("string")
 *                 .environmentId("string")
 *                 .environmentVariables(Map.of("string", "string"))
 *                 .experimentName("string")
 *                 .identity(AmlTokenArgs.builder()
 *                     .identityType("AMLToken")
 *                     .build())
 *                 .isArchived(false)
 *                 .jobType("AutoML")
 *                 .outputs(Map.of("string", Map.ofEntries(
 *                     Map.entry("description", "string"),
 *                     Map.entry("jobOutputType", "uri_file"),
 *                     Map.entry("mode", "ReadWriteMount"),
 *                     Map.entry("uri", "string")
 *                 )))
 *                 .properties(Map.of("string", "string"))
 *                 .resources(JobResourceConfigurationArgs.builder()
 *                     .instanceCount(1)
 *                     .instanceType("string")
 *                     .properties(Map.of("string", Map.of("9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad", null)))
 *                     .build())
 *                 .services(Map.of("string", Map.ofEntries(
 *                     Map.entry("endpoint", "string"),
 *                     Map.entry("jobServiceType", "string"),
 *                     Map.entry("port", 1),
 *                     Map.entry("properties", Map.of("string", "string"))
 *                 )))
 *                 .tags(Map.of("string", "string"))
 *                 .taskDetails(ImageClassificationArgs.builder()
 *                     .limitSettings(ImageLimitSettingsArgs.builder()
 *                         .maxTrials(2)
 *                         .build())
 *                     .modelSettings(ImageModelSettingsClassificationArgs.builder()
 *                         .validationCropSize(2)
 *                         .build())
 *                     .searchSpace(ImageModelDistributionSettingsClassificationArgs.builder()
 *                         .validationCropSize("choice(2, 360)")
 *                         .build())
 *                     .targetColumnName("string")
 *                     .taskType("ImageClassification")
 *                     .trainingData(MLTableJobInputArgs.builder()
 *                         .jobInputType("mltable")
 *                         .uri("string")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .workspaceName("my-aml-workspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### CreateOrUpdate Command Job. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.machinelearningservices.Job;
 * import com.pulumi.azurenative.machinelearningservices.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 job = new Job("job", JobArgs.builder()
 *             .id("string")
 *             .jobBaseProperties(CommandJobArgs.builder()
 *                 .codeId("string")
 *                 .command("string")
 *                 .computeId("string")
 *                 .description("string")
 *                 .displayName("string")
 *                 .distribution(TensorFlowArgs.builder()
 *                     .distributionType("TensorFlow")
 *                     .parameterServerCount(1)
 *                     .workerCount(1)
 *                     .build())
 *                 .environmentId("string")
 *                 .environmentVariables(Map.of("string", "string"))
 *                 .experimentName("string")
 *                 .identity(AmlTokenArgs.builder()
 *                     .identityType("AMLToken")
 *                     .build())
 *                 .inputs(Map.of("string", Map.ofEntries(
 *                     Map.entry("description", "string"),
 *                     Map.entry("jobInputType", "literal"),
 *                     Map.entry("value", "string")
 *                 )))
 *                 .jobType("Command")
 *                 .limits(CommandJobLimitsArgs.builder()
 *                     .jobLimitsType("Command")
 *                     .timeout("PT5M")
 *                     .build())
 *                 .outputs(Map.of("string", Map.ofEntries(
 *                     Map.entry("description", "string"),
 *                     Map.entry("jobOutputType", "uri_file"),
 *                     Map.entry("mode", "ReadWriteMount"),
 *                     Map.entry("uri", "string")
 *                 )))
 *                 .properties(Map.of("string", "string"))
 *                 .resources(JobResourceConfigurationArgs.builder()
 *                     .instanceCount(1)
 *                     .instanceType("string")
 *                     .properties(Map.of("string", Map.of("e6b6493e-7d5e-4db3-be1e-306ec641327e", null)))
 *                     .build())
 *                 .services(Map.of("string", Map.ofEntries(
 *                     Map.entry("endpoint", "string"),
 *                     Map.entry("jobServiceType", "string"),
 *                     Map.entry("port", 1),
 *                     Map.entry("properties", Map.of("string", "string"))
 *                 )))
 *                 .tags(Map.of("string", "string"))
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .workspaceName("my-aml-workspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### CreateOrUpdate Pipeline Job. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.machinelearningservices.Job;
 * import com.pulumi.azurenative.machinelearningservices.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 job = new Job("job", JobArgs.builder()
 *             .id("string")
 *             .jobBaseProperties(PipelineJobArgs.builder()
 *                 .computeId("string")
 *                 .description("string")
 *                 .displayName("string")
 *                 .experimentName("string")
 *                 .inputs(Map.of("string", Map.ofEntries(
 *                     Map.entry("description", "string"),
 *                     Map.entry("jobInputType", "literal"),
 *                     Map.entry("value", "string")
 *                 )))
 *                 .jobType("Pipeline")
 *                 .outputs(Map.of("string", Map.ofEntries(
 *                     Map.entry("description", "string"),
 *                     Map.entry("jobOutputType", "uri_file"),
 *                     Map.entry("mode", "Upload"),
 *                     Map.entry("uri", "string")
 *                 )))
 *                 .properties(Map.of("string", "string"))
 *                 .services(Map.of("string", Map.ofEntries(
 *                     Map.entry("endpoint", "string"),
 *                     Map.entry("jobServiceType", "string"),
 *                     Map.entry("port", 1),
 *                     Map.entry("properties", Map.of("string", "string"))
 *                 )))
 *                 .settings()
 *                 .tags(Map.of("string", "string"))
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .workspaceName("my-aml-workspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### CreateOrUpdate Sweep Job. * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.machinelearningservices.Job;
 * import com.pulumi.azurenative.machinelearningservices.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 job = new Job("job", JobArgs.builder()
 *             .id("string")
 *             .jobBaseProperties(SweepJobArgs.builder()
 *                 .computeId("string")
 *                 .description("string")
 *                 .displayName("string")
 *                 .earlyTermination(MedianStoppingPolicyArgs.builder()
 *                     .delayEvaluation(1)
 *                     .evaluationInterval(1)
 *                     .policyType("MedianStopping")
 *                     .build())
 *                 .experimentName("string")
 *                 .jobType("Sweep")
 *                 .limits(SweepJobLimitsArgs.builder()
 *                     .jobLimitsType("Sweep")
 *                     .maxConcurrentTrials(1)
 *                     .maxTotalTrials(1)
 *                     .trialTimeout("PT1S")
 *                     .build())
 *                 .objective(ObjectiveArgs.builder()
 *                     .goal("Minimize")
 *                     .primaryMetric("string")
 *                     .build())
 *                 .properties(Map.of("string", "string"))
 *                 .samplingAlgorithm(GridSamplingAlgorithmArgs.builder()
 *                     .samplingAlgorithmType("Grid")
 *                     .build())
 *                 .searchSpace(Map.of("string", ))
 *                 .services(Map.of("string", Map.ofEntries(
 *                     Map.entry("endpoint", "string"),
 *                     Map.entry("jobServiceType", "string"),
 *                     Map.entry("port", 1),
 *                     Map.entry("properties", Map.of("string", "string"))
 *                 )))
 *                 .tags(Map.of("string", "string"))
 *                 .trial(TrialComponentArgs.builder()
 *                     .codeId("string")
 *                     .command("string")
 *                     .distribution(MpiArgs.builder()
 *                         .distributionType("Mpi")
 *                         .processCountPerInstance(1)
 *                         .build())
 *                     .environmentId("string")
 *                     .environmentVariables(Map.of("string", "string"))
 *                     .resources(JobResourceConfigurationArgs.builder()
 *                         .instanceCount(1)
 *                         .instanceType("string")
 *                         .properties(Map.of("string", Map.of("e6b6493e-7d5e-4db3-be1e-306ec641327e", null)))
 *                         .build())
 *                     .build())
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .workspaceName("my-aml-workspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:machinelearningservices:Job string /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} * ``` * */ @ResourceType(type="azure-native:machinelearningservices:Job") public class Job extends com.pulumi.resources.CustomResource { /** * [Required] Additional attributes of the entity. * */ @Export(name="jobBaseProperties", refs={Object.class}, tree="[0]") private Output jobBaseProperties; /** * @return [Required] Additional attributes of the entity. * */ public Output jobBaseProperties() { return this.jobBaseProperties; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ public Output systemData() { return this.systemData; } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public Job(java.lang.String name) { this(name, JobArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Job(java.lang.String name, JobArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Job(java.lang.String name, JobArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:machinelearningservices:Job", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Job(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:machinelearningservices:Job", name, null, makeResourceOptions(options, id), false); } private static JobArgs makeArgs(JobArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? JobArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:machinelearningservices/v20210301preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20220201preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20220501:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20220601preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20221001:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20221001preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20221201preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20230201preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20230401:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20230401preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20230601preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20230801preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20231001:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20240101preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20240401:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20240401preview:Job").build()), Output.of(Alias.builder().type("azure-native:machinelearningservices/v20240701preview:Job").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static Job get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Job(name, id, options); } }