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

com.pulumi.azurenative.datafactory.DataFlow 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.datafactory;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.datafactory.DataFlowArgs;
import com.pulumi.azurenative.datafactory.outputs.FlowletResponse;
import com.pulumi.azurenative.datafactory.outputs.MappingDataFlowResponse;
import com.pulumi.azurenative.datafactory.outputs.WranglingDataFlowResponse;
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;

/**
 * Data flow resource type.
 * Azure REST API version: 2018-06-01. Prior API version in Azure Native 1.x: 2018-06-01.
 * 
 * ## Example Usage
 * ### DataFlows_Create
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.datafactory.DataFlow;
 * import com.pulumi.azurenative.datafactory.DataFlowArgs;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var dataFlow = new DataFlow("dataFlow", DataFlowArgs.builder()
 *             .dataFlowName("exampleDataFlow")
 *             .factoryName("exampleFactoryName")
 *             .properties(MappingDataFlowArgs.builder()
 *                 .description("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.")
 *                 .scriptLines(                
 *                     "source(output(",
 *                     "PreviousConversionRate as double,",
 *                     "Country as string,",
 *                     "DateTime1 as string,",
 *                     "CurrentConversionRate as double",
 *                     "),",
 *                     "allowSchemaDrift: false,",
 *                     "validateSchema: false) ~> USDCurrency",
 *                     "source(output(",
 *                     "PreviousConversionRate as double,",
 *                     "Country as string,",
 *                     "DateTime1 as string,",
 *                     "CurrentConversionRate as double",
 *                     "),",
 *                     "allowSchemaDrift: true,",
 *                     "validateSchema: false) ~> CADSource",
 *                     "USDCurrency, CADSource union(byName: true)~> Union",
 *                     "Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn",
 *                     "NewCurrencyColumn split(Country == 'USD',",
 *                     "Country == 'CAD',disjoint: false) ~> ConditionalSplit1}{@literal @}{@code (USD, CAD)",
 *                     "ConditionalSplit1}{@literal @}{@code USD sink(saveMode:'overwrite' ) ~> USDSink",
 *                     "ConditionalSplit1}{@literal @}{@code CAD sink(saveMode:'overwrite' ) ~> CADSink")
 *                 .sinks(                
 *                     DataFlowSinkArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("USDOutput")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("USDSink")
 *                         .build(),
 *                     DataFlowSinkArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("CADOutput")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("CADSink")
 *                         .build())
 *                 .sources(                
 *                     DataFlowSourceArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("CurrencyDatasetUSD")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("USDCurrency")
 *                         .build(),
 *                     DataFlowSourceArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("CurrencyDatasetCAD")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("CADSource")
 *                         .build())
 *                 .type("MappingDataFlow")
 *                 .build())
 *             .resourceGroupName("exampleResourceGroup")
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* ### DataFlows_Update * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.datafactory.DataFlow;
 * import com.pulumi.azurenative.datafactory.DataFlowArgs;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var dataFlow = new DataFlow("dataFlow", DataFlowArgs.builder()
 *             .dataFlowName("exampleDataFlow")
 *             .factoryName("exampleFactoryName")
 *             .properties(MappingDataFlowArgs.builder()
 *                 .description("Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.")
 *                 .scriptLines(                
 *                     "source(output(",
 *                     "PreviousConversionRate as double,",
 *                     "Country as string,",
 *                     "DateTime1 as string,",
 *                     "CurrentConversionRate as double",
 *                     "),",
 *                     "allowSchemaDrift: false,",
 *                     "validateSchema: false) ~> USDCurrency",
 *                     "source(output(",
 *                     "PreviousConversionRate as double,",
 *                     "Country as string,",
 *                     "DateTime1 as string,",
 *                     "CurrentConversionRate as double",
 *                     "),",
 *                     "allowSchemaDrift: true,",
 *                     "validateSchema: false) ~> CADSource",
 *                     "USDCurrency, CADSource union(byName: true)~> Union",
 *                     "Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn",
 *                     "NewCurrencyColumn split(Country == 'USD',",
 *                     "Country == 'CAD',disjoint: false) ~> ConditionalSplit1}{@literal @}{@code (USD, CAD)",
 *                     "ConditionalSplit1}{@literal @}{@code USD sink(saveMode:'overwrite' ) ~> USDSink",
 *                     "ConditionalSplit1}{@literal @}{@code CAD sink(saveMode:'overwrite' ) ~> CADSink")
 *                 .sinks(                
 *                     DataFlowSinkArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("USDOutput")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("USDSink")
 *                         .build(),
 *                     DataFlowSinkArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("CADOutput")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("CADSink")
 *                         .build())
 *                 .sources(                
 *                     DataFlowSourceArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("CurrencyDatasetUSD")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("USDCurrency")
 *                         .build(),
 *                     DataFlowSourceArgs.builder()
 *                         .dataset(DatasetReferenceArgs.builder()
 *                             .referenceName("CurrencyDatasetCAD")
 *                             .type("DatasetReference")
 *                             .build())
 *                         .name("CADSource")
 *                         .build())
 *                 .type("MappingDataFlow")
 *                 .build())
 *             .resourceGroupName("exampleResourceGroup")
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:datafactory:DataFlow exampleDataFlow /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName} * ``` * */ @ResourceType(type="azure-native:datafactory:DataFlow") public class DataFlow extends com.pulumi.resources.CustomResource { /** * Etag identifies change in the resource. * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return Etag identifies change in the resource. * */ public Output etag() { return this.etag; } /** * The resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The resource name. * */ public Output name() { return this.name; } /** * Data flow properties. * */ @Export(name="properties", refs={Object.class}, tree="[0]") private Output properties; /** * @return Data flow properties. * */ public Output properties() { return this.properties; } /** * The resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public DataFlow(java.lang.String name) { this(name, DataFlowArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public DataFlow(java.lang.String name, DataFlowArgs 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 DataFlow(java.lang.String name, DataFlowArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:datafactory:DataFlow", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private DataFlow(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:datafactory:DataFlow", name, null, makeResourceOptions(options, id), false); } private static DataFlowArgs makeArgs(DataFlowArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DataFlowArgs.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:datafactory/v20180601:DataFlow").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 DataFlow get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DataFlow(name, id, options); } }