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

com.pulumi.azure.datafactory.kotlin.PipelineArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.datafactory.kotlin

import com.pulumi.azure.datafactory.PipelineArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Pipeline inside a Azure Data Factory.
 * ## 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 exampleFactory = new azure.datafactory.Factory("example", {
 *     name: "example",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const examplePipeline = new azure.datafactory.Pipeline("example", {
 *     name: "example",
 *     dataFactoryId: exampleFactory.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_factory = azure.datafactory.Factory("example",
 *     name="example",
 *     location=example.location,
 *     resource_group_name=example.name)
 * example_pipeline = azure.datafactory.Pipeline("example",
 *     name="example",
 *     data_factory_id=example_factory.id)
 * ```
 * ```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 exampleFactory = new Azure.DataFactory.Factory("example", new()
 *     {
 *         Name = "example",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var examplePipeline = new Azure.DataFactory.Pipeline("example", new()
 *     {
 *         Name = "example",
 *         DataFactoryId = exampleFactory.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datafactory"
 * 	"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
 * 		}
 * 		exampleFactory, err := datafactory.NewFactory(ctx, "example", &datafactory.FactoryArgs{
 * 			Name:              pulumi.String("example"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = datafactory.NewPipeline(ctx, "example", &datafactory.PipelineArgs{
 * 			Name:          pulumi.String("example"),
 * 			DataFactoryId: exampleFactory.ID(),
 * 		})
 * 		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.datafactory.Factory;
 * import com.pulumi.azure.datafactory.FactoryArgs;
 * import com.pulumi.azure.datafactory.Pipeline;
 * import com.pulumi.azure.datafactory.PipelineArgs;
 * 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 exampleFactory = new Factory("exampleFactory", FactoryArgs.builder()
 *             .name("example")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var examplePipeline = new Pipeline("examplePipeline", PipelineArgs.builder()
 *             .name("example")
 *             .dataFactoryId(exampleFactory.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleFactory:
 *     type: azure:datafactory:Factory
 *     name: example
 *     properties:
 *       name: example
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   examplePipeline:
 *     type: azure:datafactory:Pipeline
 *     name: example
 *     properties:
 *       name: example
 *       dataFactoryId: ${exampleFactory.id}
 * ```
 * 
 * ### With Activities
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const test = new azure.datafactory.Pipeline("test", {
 *     name: "example",
 *     dataFactoryId: testAzurermDataFactory.id,
 *     variables: {
 *         bob: "item1",
 *     },
 *     activitiesJson: `[
 *     {
 *         "name": "Append variable1",
 *         "type": "AppendVariable",
 *         "dependsOn": [],
 *         "userProperties": [],
 *         "typeProperties": {
 *           "variableName": "bob",
 *           "value": "something"
 *         }
 *     }
 * ]
 * `,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * test = azure.datafactory.Pipeline("test",
 *     name="example",
 *     data_factory_id=test_azurerm_data_factory["id"],
 *     variables={
 *         "bob": "item1",
 *     },
 *     activities_json="""[
 *     {
 *         "name": "Append variable1",
 *         "type": "AppendVariable",
 *         "dependsOn": [],
 *         "userProperties": [],
 *         "typeProperties": {
 *           "variableName": "bob",
 *           "value": "something"
 *         }
 *     }
 * ]
 * """)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Azure.DataFactory.Pipeline("test", new()
 *     {
 *         Name = "example",
 *         DataFactoryId = testAzurermDataFactory.Id,
 *         Variables =
 *         {
 *             { "bob", "item1" },
 *         },
 *         ActivitiesJson = @"[
 *     {
 *         ""name"": ""Append variable1"",
 *         ""type"": ""AppendVariable"",
 *         ""dependsOn"": [],
 *         ""userProperties"": [],
 *         ""typeProperties"": {
 *           ""variableName"": ""bob"",
 *           ""value"": ""something""
 *         }
 *     }
 * ]
 * ",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datafactory"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := datafactory.NewPipeline(ctx, "test", &datafactory.PipelineArgs{
 * 			Name:          pulumi.String("example"),
 * 			DataFactoryId: pulumi.Any(testAzurermDataFactory.Id),
 * 			Variables: pulumi.StringMap{
 * 				"bob": pulumi.String("item1"),
 * 			},
 * 			ActivitiesJson: pulumi.String(`[
 *     {
 *         "name": "Append variable1",
 *         "type": "AppendVariable",
 *         "dependsOn": [],
 *         "userProperties": [],
 *         "typeProperties": {
 *           "variableName": "bob",
 *           "value": "something"
 *         }
 *     }
 * ]
 * `),
 * 		})
 * 		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.datafactory.Pipeline;
 * import com.pulumi.azure.datafactory.PipelineArgs;
 * 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 test = new Pipeline("test", PipelineArgs.builder()
 *             .name("example")
 *             .dataFactoryId(testAzurermDataFactory.id())
 *             .variables(Map.of("bob", "item1"))
 *             .activitiesJson("""
 * [
 *     {
 *         "name": "Append variable1",
 *         "type": "AppendVariable",
 *         "dependsOn": [],
 *         "userProperties": [],
 *         "typeProperties": {
 *           "variableName": "bob",
 *           "value": "something"
 *         }
 *     }
 * ]
 *             """)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: azure:datafactory:Pipeline
 *     properties:
 *       name: example
 *       dataFactoryId: ${testAzurermDataFactory.id}
 *       variables:
 *         bob: item1
 *       activitiesJson: |
 *         [
 *             {
 *                 "name": "Append variable1",
 *                 "type": "AppendVariable",
 *                 "dependsOn": [],
 *                 "userProperties": [],
 *                 "typeProperties": {
 *                   "variableName": "bob",
 *                   "value": "something"
 *                 }
 *             }
 *         ]
 * ```
 * 
 * ## Import
 * Data Factory Pipeline's can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:datafactory/pipeline:Pipeline example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/pipelines/example
 * ```
 * @property activitiesJson A JSON object that contains the activities that will be associated with the Data Factory Pipeline.
 * @property annotations List of tags that can be used for describing the Data Factory Pipeline.
 * @property concurrency The max number of concurrent runs for the Data Factory Pipeline. Must be between `1` and `50`.
 * @property dataFactoryId The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
 * @property description The description for the Data Factory Pipeline.
 * @property folder The folder that this Pipeline is in. If not specified, the Pipeline will appear at the root level.
 * @property moniterMetricsAfterDuration The TimeSpan value after which an Azure Monitoring Metric is fired.
 * @property name Specifies the name of the Data Factory Pipeline. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
 * @property parameters A map of parameters to associate with the Data Factory Pipeline.
 * @property variables A map of variables to associate with the Data Factory Pipeline.
 */
public data class PipelineArgs(
    public val activitiesJson: Output? = null,
    public val annotations: Output>? = null,
    public val concurrency: Output? = null,
    public val dataFactoryId: Output? = null,
    public val description: Output? = null,
    public val folder: Output? = null,
    public val moniterMetricsAfterDuration: Output? = null,
    public val name: Output? = null,
    public val parameters: Output>? = null,
    public val variables: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.datafactory.PipelineArgs =
        com.pulumi.azure.datafactory.PipelineArgs.builder()
            .activitiesJson(activitiesJson?.applyValue({ args0 -> args0 }))
            .annotations(annotations?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .concurrency(concurrency?.applyValue({ args0 -> args0 }))
            .dataFactoryId(dataFactoryId?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .folder(folder?.applyValue({ args0 -> args0 }))
            .moniterMetricsAfterDuration(moniterMetricsAfterDuration?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .variables(
                variables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [PipelineArgs].
 */
@PulumiTagMarker
public class PipelineArgsBuilder internal constructor() {
    private var activitiesJson: Output? = null

    private var annotations: Output>? = null

    private var concurrency: Output? = null

    private var dataFactoryId: Output? = null

    private var description: Output? = null

    private var folder: Output? = null

    private var moniterMetricsAfterDuration: Output? = null

    private var name: Output? = null

    private var parameters: Output>? = null

    private var variables: Output>? = null

    /**
     * @param value A JSON object that contains the activities that will be associated with the Data Factory Pipeline.
     */
    @JvmName("xtpgcuffbvaopnwa")
    public suspend fun activitiesJson(`value`: Output) {
        this.activitiesJson = value
    }

    /**
     * @param value List of tags that can be used for describing the Data Factory Pipeline.
     */
    @JvmName("vmjhpkrxqfsffwkg")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    @JvmName("mstfkqqhfkhgclmx")
    public suspend fun annotations(vararg values: Output) {
        this.annotations = Output.all(values.asList())
    }

    /**
     * @param values List of tags that can be used for describing the Data Factory Pipeline.
     */
    @JvmName("rmgdoldpntrngfwu")
    public suspend fun annotations(values: List>) {
        this.annotations = Output.all(values)
    }

    /**
     * @param value The max number of concurrent runs for the Data Factory Pipeline. Must be between `1` and `50`.
     */
    @JvmName("uxnqmgiqeafunwlh")
    public suspend fun concurrency(`value`: Output) {
        this.concurrency = value
    }

    /**
     * @param value The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
     */
    @JvmName("poxlemnwhsravugj")
    public suspend fun dataFactoryId(`value`: Output) {
        this.dataFactoryId = value
    }

    /**
     * @param value The description for the Data Factory Pipeline.
     */
    @JvmName("tjrntkdtmscioytj")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The folder that this Pipeline is in. If not specified, the Pipeline will appear at the root level.
     */
    @JvmName("ivffrdyqyisloitw")
    public suspend fun folder(`value`: Output) {
        this.folder = value
    }

    /**
     * @param value The TimeSpan value after which an Azure Monitoring Metric is fired.
     */
    @JvmName("bqunuevtoupnjkvv")
    public suspend fun moniterMetricsAfterDuration(`value`: Output) {
        this.moniterMetricsAfterDuration = value
    }

    /**
     * @param value Specifies the name of the Data Factory Pipeline. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
     */
    @JvmName("rvaargyogwufbfrl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A map of parameters to associate with the Data Factory Pipeline.
     */
    @JvmName("icekvdajvlrxaodh")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value A map of variables to associate with the Data Factory Pipeline.
     */
    @JvmName("gvbjdycuhsmndwlr")
    public suspend fun variables(`value`: Output>) {
        this.variables = value
    }

    /**
     * @param value A JSON object that contains the activities that will be associated with the Data Factory Pipeline.
     */
    @JvmName("dpdubhdrkjkqwquu")
    public suspend fun activitiesJson(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activitiesJson = mapped
    }

    /**
     * @param value List of tags that can be used for describing the Data Factory Pipeline.
     */
    @JvmName("rhxxnopsbclckicl")
    public suspend fun annotations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values List of tags that can be used for describing the Data Factory Pipeline.
     */
    @JvmName("lmopfidpccjineqr")
    public suspend fun annotations(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value The max number of concurrent runs for the Data Factory Pipeline. Must be between `1` and `50`.
     */
    @JvmName("rfisvgefcysbpngc")
    public suspend fun concurrency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.concurrency = mapped
    }

    /**
     * @param value The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
     */
    @JvmName("bluswksvnbbnrdbx")
    public suspend fun dataFactoryId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataFactoryId = mapped
    }

    /**
     * @param value The description for the Data Factory Pipeline.
     */
    @JvmName("xfcynncygxcujkue")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The folder that this Pipeline is in. If not specified, the Pipeline will appear at the root level.
     */
    @JvmName("bhyebjxefsbqlxxs")
    public suspend fun folder(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.folder = mapped
    }

    /**
     * @param value The TimeSpan value after which an Azure Monitoring Metric is fired.
     */
    @JvmName("jfsqullbbleuhlgl")
    public suspend fun moniterMetricsAfterDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.moniterMetricsAfterDuration = mapped
    }

    /**
     * @param value Specifies the name of the Data Factory Pipeline. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
     */
    @JvmName("wplejbgomwxfariv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A map of parameters to associate with the Data Factory Pipeline.
     */
    @JvmName("mctumppgrkjbkfkd")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values A map of parameters to associate with the Data Factory Pipeline.
     */
    @JvmName("efgwdndqsiomyxyh")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value A map of variables to associate with the Data Factory Pipeline.
     */
    @JvmName("uphqbfmisptiiwux")
    public suspend fun variables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    /**
     * @param values A map of variables to associate with the Data Factory Pipeline.
     */
    @JvmName("ecfgcsmxqkslrjgc")
    public fun variables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    internal fun build(): PipelineArgs = PipelineArgs(
        activitiesJson = activitiesJson,
        annotations = annotations,
        concurrency = concurrency,
        dataFactoryId = dataFactoryId,
        description = description,
        folder = folder,
        moniterMetricsAfterDuration = moniterMetricsAfterDuration,
        name = name,
        parameters = parameters,
        variables = variables,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy