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

com.pulumi.azure.streamanalytics.JobSchedule Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.streamanalytics;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.streamanalytics.JobScheduleArgs;
import com.pulumi.azure.streamanalytics.inputs.JobScheduleState;
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.String;
import javax.annotation.Nullable;

/**
 * Manages a Stream Analytics Job Schedule.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.storage.Container;
 * import com.pulumi.azure.storage.ContainerArgs;
 * import com.pulumi.azure.storage.Blob;
 * import com.pulumi.azure.storage.BlobArgs;
 * import com.pulumi.azure.streamanalytics.Job;
 * import com.pulumi.azure.streamanalytics.JobArgs;
 * import com.pulumi.azure.streamanalytics.StreamInputBlob;
 * import com.pulumi.azure.streamanalytics.StreamInputBlobArgs;
 * import com.pulumi.azure.streamanalytics.inputs.StreamInputBlobSerializationArgs;
 * import com.pulumi.azure.streamanalytics.OutputBlob;
 * import com.pulumi.azure.streamanalytics.OutputBlobArgs;
 * import com.pulumi.azure.streamanalytics.inputs.OutputBlobSerializationArgs;
 * import com.pulumi.azure.streamanalytics.JobSchedule;
 * import com.pulumi.azure.streamanalytics.JobScheduleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import com.pulumi.asset.FileAsset;
 * 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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 * 
 *         var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
 *             .name("example")
 *             .storageAccountName(exampleAccount.name())
 *             .containerAccessType("private")
 *             .build());
 * 
 *         var exampleBlob = new Blob("exampleBlob", BlobArgs.builder()
 *             .name("example")
 *             .storageAccountName(exampleAccount.name())
 *             .storageContainerName(exampleContainer.name())
 *             .type("Block")
 *             .source(new FileAsset("example.csv"))
 *             .build());
 * 
 *         var exampleJob = new Job("exampleJob", JobArgs.builder()
 *             .name("example-job")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .compatibilityLevel("1.2")
 *             .dataLocale("en-GB")
 *             .eventsLateArrivalMaxDelayInSeconds(60)
 *             .eventsOutOfOrderMaxDelayInSeconds(50)
 *             .eventsOutOfOrderPolicy("Adjust")
 *             .outputErrorPolicy("Drop")
 *             .streamingUnits(3)
 *             .tags(Map.of("environment", "Example"))
 *             .transformationQuery("""
 *     SELECT *
 *     INTO [exampleoutput]
 *     FROM [exampleinput]
 *             """)
 *             .build());
 * 
 *         var exampleStreamInputBlob = new StreamInputBlob("exampleStreamInputBlob", StreamInputBlobArgs.builder()
 *             .name("exampleinput")
 *             .streamAnalyticsJobName(exampleJob.name())
 *             .resourceGroupName(exampleJob.resourceGroupName())
 *             .storageAccountName(exampleAccount.name())
 *             .storageAccountKey(exampleAccount.primaryAccessKey())
 *             .storageContainerName(exampleContainer.name())
 *             .pathPattern("")
 *             .dateFormat("yyyy/MM/dd")
 *             .timeFormat("HH")
 *             .serialization(StreamInputBlobSerializationArgs.builder()
 *                 .type("Csv")
 *                 .encoding("UTF8")
 *                 .fieldDelimiter(",")
 *                 .build())
 *             .build());
 * 
 *         var exampleOutputBlob = new OutputBlob("exampleOutputBlob", OutputBlobArgs.builder()
 *             .name("exampleoutput")
 *             .streamAnalyticsJobName(exampleJob.name())
 *             .resourceGroupName(exampleJob.resourceGroupName())
 *             .storageAccountName(exampleAccount.name())
 *             .storageAccountKey(exampleAccount.primaryAccessKey())
 *             .storageContainerName(exampleContainer.name())
 *             .pathPattern("example-{date}-{time}")
 *             .dateFormat("yyyy-MM-dd")
 *             .timeFormat("HH")
 *             .serialization(OutputBlobSerializationArgs.builder()
 *                 .type("Avro")
 *                 .build())
 *             .build());
 * 
 *         var exampleJobSchedule = new JobSchedule("exampleJobSchedule", JobScheduleArgs.builder()
 *             .streamAnalyticsJobId(exampleJob.id())
 *             .startMode("CustomTime")
 *             .startTime("2022-09-21T00:00:00Z")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(                
 *                     exampleJob,
 *                     exampleStreamInputBlob,
 *                     exampleOutputBlob)
 *                 .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Stream Analytics Job's can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:streamanalytics/jobSchedule:JobSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/schedule/default * ``` * */ @ResourceType(type="azure:streamanalytics/jobSchedule:JobSchedule") public class JobSchedule extends com.pulumi.resources.CustomResource { /** * The time at which the Stream Analytics job last produced an output. * */ @Export(name="lastOutputTime", refs={String.class}, tree="[0]") private Output lastOutputTime; /** * @return The time at which the Stream Analytics job last produced an output. * */ public Output lastOutputTime() { return this.lastOutputTime; } /** * The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. * * > **Note:** Setting `start_mode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. * */ @Export(name="startMode", refs={String.class}, tree="[0]") private Output startMode; /** * @return The starting mode of the Stream Analytics Job. Possible values are `JobStartTime`, `CustomTime` and `LastOutputEventTime`. * * > **Note:** Setting `start_mode` to `LastOutputEventTime` is only possible if the job had been previously started and produced output. * */ public Output startMode() { return this.startMode; } /** * The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `start_mode` is set to `CustomTime` * */ @Export(name="startTime", refs={String.class}, tree="[0]") private Output startTime; /** * @return The time in ISO8601 format at which the Stream Analytics Job should be started e.g. `2022-04-01T00:00:00Z`. This property can only be specified if `start_mode` is set to `CustomTime` * */ public Output startTime() { return this.startTime; } /** * The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. * */ @Export(name="streamAnalyticsJobId", refs={String.class}, tree="[0]") private Output streamAnalyticsJobId; /** * @return The ID of the Stream Analytics Job that should be scheduled or started. Changing this forces a new resource to be created. * */ public Output streamAnalyticsJobId() { return this.streamAnalyticsJobId; } /** * * @param name The _unique_ name of the resulting resource. */ public JobSchedule(java.lang.String name) { this(name, JobScheduleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public JobSchedule(java.lang.String name, JobScheduleArgs 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 JobSchedule(java.lang.String name, JobScheduleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:streamanalytics/jobSchedule:JobSchedule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private JobSchedule(java.lang.String name, Output id, @Nullable JobScheduleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:streamanalytics/jobSchedule:JobSchedule", name, state, makeResourceOptions(options, id), false); } private static JobScheduleArgs makeArgs(JobScheduleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? JobScheduleArgs.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()) .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 state * @param options Optional settings to control the behavior of the CustomResource. */ public static JobSchedule get(java.lang.String name, Output id, @Nullable JobScheduleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new JobSchedule(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy