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

com.pulumi.azure.logicapps.kotlin.WorkflowArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.logicapps.kotlin

import com.pulumi.azure.logicapps.WorkflowArgs.builder
import com.pulumi.azure.logicapps.kotlin.inputs.WorkflowAccessControlArgs
import com.pulumi.azure.logicapps.kotlin.inputs.WorkflowAccessControlArgsBuilder
import com.pulumi.azure.logicapps.kotlin.inputs.WorkflowIdentityArgs
import com.pulumi.azure.logicapps.kotlin.inputs.WorkflowIdentityArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Logic App Workflow.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "workflow-resources",
 *     location: "West Europe",
 * });
 * const exampleWorkflow = new azure.logicapps.Workflow("example", {
 *     name: "workflow1",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="workflow-resources",
 *     location="West Europe")
 * example_workflow = azure.logicapps.Workflow("example",
 *     name="workflow1",
 *     location=example.location,
 *     resource_group_name=example.name)
 * ```
 * ```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 = "workflow-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleWorkflow = new Azure.LogicApps.Workflow("example", new()
 *     {
 *         Name = "workflow1",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/logicapps"
 * 	"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("workflow-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = logicapps.NewWorkflow(ctx, "example", &logicapps.WorkflowArgs{
 * 			Name:              pulumi.String("workflow1"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		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.logicapps.Workflow;
 * import com.pulumi.azure.logicapps.WorkflowArgs;
 * 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("workflow-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleWorkflow = new Workflow("exampleWorkflow", WorkflowArgs.builder()
 *             .name("workflow1")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: workflow-resources
 *       location: West Europe
 *   exampleWorkflow:
 *     type: azure:logicapps:Workflow
 *     name: example
 *     properties:
 *       name: workflow1
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 * ```
 * 
 * ## Import
 * Logic App Workflows can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:logicapps/workflow:Workflow workflow1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Logic/workflows/workflow1
 * ```
 * @property accessControl A `access_control` block as defined below.
 * @property enabled Is the Logic App Workflow enabled? Defaults to `true`.
 * @property identity An `identity` block as defined below.
 * @property integrationServiceEnvironmentId The ID of the Integration Service Environment to which this Logic App Workflow belongs. Changing this forces a new Logic App Workflow to be created.
 * @property location Specifies the supported Azure location where the Logic App Workflow exists. Changing this forces a new resource to be created.
 * @property logicAppIntegrationAccountId The ID of the integration account linked by this Logic App Workflow.
 * @property name Specifies the name of the Logic App Workflow. Changing this forces a new resource to be created.
 * @property parameters A map of Key-Value pairs.
 * > **NOTE:** Any parameters specified must exist in the Schema defined in `workflow_parameters`.
 * @property resourceGroupName The name of the Resource Group in which the Logic App Workflow should be created. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 * @property workflowParameters Specifies a map of Key-Value pairs of the Parameter Definitions to use for this Logic App Workflow. The key is the parameter name, and the value is a JSON encoded string of the parameter definition (see: ).
 * @property workflowSchema Specifies the Schema to use for this Logic App Workflow. Defaults to `https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#`. Changing this forces a new resource to be created.
 * @property workflowVersion Specifies the version of the Schema used for this Logic App Workflow. Defaults to `1.0.0.0`. Changing this forces a new resource to be created.
 */
public data class WorkflowArgs(
    public val accessControl: Output? = null,
    public val enabled: Output? = null,
    public val identity: Output? = null,
    public val integrationServiceEnvironmentId: Output? = null,
    public val location: Output? = null,
    public val logicAppIntegrationAccountId: Output? = null,
    public val name: Output? = null,
    public val parameters: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val workflowParameters: Output>? = null,
    public val workflowSchema: Output? = null,
    public val workflowVersion: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.logicapps.WorkflowArgs =
        com.pulumi.azure.logicapps.WorkflowArgs.builder()
            .accessControl(accessControl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .integrationServiceEnvironmentId(integrationServiceEnvironmentId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .logicAppIntegrationAccountId(logicAppIntegrationAccountId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workflowParameters(
                workflowParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .workflowSchema(workflowSchema?.applyValue({ args0 -> args0 }))
            .workflowVersion(workflowVersion?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkflowArgs].
 */
@PulumiTagMarker
public class WorkflowArgsBuilder internal constructor() {
    private var accessControl: Output? = null

    private var enabled: Output? = null

    private var identity: Output? = null

    private var integrationServiceEnvironmentId: Output? = null

    private var location: Output? = null

    private var logicAppIntegrationAccountId: Output? = null

    private var name: Output? = null

    private var parameters: Output>? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var workflowParameters: Output>? = null

    private var workflowSchema: Output? = null

    private var workflowVersion: Output? = null

    /**
     * @param value A `access_control` block as defined below.
     */
    @JvmName("llaodandkhybmckf")
    public suspend fun accessControl(`value`: Output) {
        this.accessControl = value
    }

    /**
     * @param value Is the Logic App Workflow enabled? Defaults to `true`.
     */
    @JvmName("djvgnpiaqrmugpih")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("wriplkyrwexfajkw")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The ID of the Integration Service Environment to which this Logic App Workflow belongs. Changing this forces a new Logic App Workflow to be created.
     */
    @JvmName("eyquccouxfieyypx")
    public suspend fun integrationServiceEnvironmentId(`value`: Output) {
        this.integrationServiceEnvironmentId = value
    }

    /**
     * @param value Specifies the supported Azure location where the Logic App Workflow exists. Changing this forces a new resource to be created.
     */
    @JvmName("usehpyctnkvoljbg")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The ID of the integration account linked by this Logic App Workflow.
     */
    @JvmName("hpdqwfgdksiugvrp")
    public suspend fun logicAppIntegrationAccountId(`value`: Output) {
        this.logicAppIntegrationAccountId = value
    }

    /**
     * @param value Specifies the name of the Logic App Workflow. Changing this forces a new resource to be created.
     */
    @JvmName("bvruumuelarvxbhn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A map of Key-Value pairs.
     * > **NOTE:** Any parameters specified must exist in the Schema defined in `workflow_parameters`.
     */
    @JvmName("fyltghiubdygmdad")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value The name of the Resource Group in which the Logic App Workflow should be created. Changing this forces a new resource to be created.
     */
    @JvmName("pmciohjobylewklp")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("ocjfjipbqbauktrx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specifies a map of Key-Value pairs of the Parameter Definitions to use for this Logic App Workflow. The key is the parameter name, and the value is a JSON encoded string of the parameter definition (see: ).
     */
    @JvmName("hbrkvwtfwclifarf")
    public suspend fun workflowParameters(`value`: Output>) {
        this.workflowParameters = value
    }

    /**
     * @param value Specifies the Schema to use for this Logic App Workflow. Defaults to `https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#`. Changing this forces a new resource to be created.
     */
    @JvmName("qwgspxqunrphbxro")
    public suspend fun workflowSchema(`value`: Output) {
        this.workflowSchema = value
    }

    /**
     * @param value Specifies the version of the Schema used for this Logic App Workflow. Defaults to `1.0.0.0`. Changing this forces a new resource to be created.
     */
    @JvmName("nwlsxnisqvxmkdii")
    public suspend fun workflowVersion(`value`: Output) {
        this.workflowVersion = value
    }

    /**
     * @param value A `access_control` block as defined below.
     */
    @JvmName("hqkeexqhgdaxrejt")
    public suspend fun accessControl(`value`: WorkflowAccessControlArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessControl = mapped
    }

    /**
     * @param argument A `access_control` block as defined below.
     */
    @JvmName("ibwkthcxptsyvqfr")
    public suspend fun accessControl(argument: suspend WorkflowAccessControlArgsBuilder.() -> Unit) {
        val toBeMapped = WorkflowAccessControlArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.accessControl = mapped
    }

    /**
     * @param value Is the Logic App Workflow enabled? Defaults to `true`.
     */
    @JvmName("cwbosgjrglihbshb")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("tqiubwceafwythjk")
    public suspend fun identity(`value`: WorkflowIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("qimiqoepbnffuwop")
    public suspend fun identity(argument: suspend WorkflowIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = WorkflowIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The ID of the Integration Service Environment to which this Logic App Workflow belongs. Changing this forces a new Logic App Workflow to be created.
     */
    @JvmName("hsqllcvyfisxgsat")
    public suspend fun integrationServiceEnvironmentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.integrationServiceEnvironmentId = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the Logic App Workflow exists. Changing this forces a new resource to be created.
     */
    @JvmName("pppgptipretsmrcv")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The ID of the integration account linked by this Logic App Workflow.
     */
    @JvmName("rpxowncutytkfixe")
    public suspend fun logicAppIntegrationAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logicAppIntegrationAccountId = mapped
    }

    /**
     * @param value Specifies the name of the Logic App Workflow. Changing this forces a new resource to be created.
     */
    @JvmName("gdhijlsotvviaprn")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A map of Key-Value pairs.
     * > **NOTE:** Any parameters specified must exist in the Schema defined in `workflow_parameters`.
     */
    @JvmName("dkewobjxxevkftnm")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values A map of Key-Value pairs.
     * > **NOTE:** Any parameters specified must exist in the Schema defined in `workflow_parameters`.
     */
    @JvmName("dyvwqjytjgxcpaop")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The name of the Resource Group in which the Logic App Workflow should be created. Changing this forces a new resource to be created.
     */
    @JvmName("xplqvymqavrlcttd")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("ahrmburvpqefmgre")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("ytqktmivorrspoxx")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies a map of Key-Value pairs of the Parameter Definitions to use for this Logic App Workflow. The key is the parameter name, and the value is a JSON encoded string of the parameter definition (see: ).
     */
    @JvmName("igsrekwtevhydkgt")
    public suspend fun workflowParameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workflowParameters = mapped
    }

    /**
     * @param values Specifies a map of Key-Value pairs of the Parameter Definitions to use for this Logic App Workflow. The key is the parameter name, and the value is a JSON encoded string of the parameter definition (see: ).
     */
    @JvmName("cylfsgtbsupkralw")
    public fun workflowParameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.workflowParameters = mapped
    }

    /**
     * @param value Specifies the Schema to use for this Logic App Workflow. Defaults to `https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#`. Changing this forces a new resource to be created.
     */
    @JvmName("cigmynkegthfuktx")
    public suspend fun workflowSchema(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workflowSchema = mapped
    }

    /**
     * @param value Specifies the version of the Schema used for this Logic App Workflow. Defaults to `1.0.0.0`. Changing this forces a new resource to be created.
     */
    @JvmName("abfxqymjhrhpkyng")
    public suspend fun workflowVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workflowVersion = mapped
    }

    internal fun build(): WorkflowArgs = WorkflowArgs(
        accessControl = accessControl,
        enabled = enabled,
        identity = identity,
        integrationServiceEnvironmentId = integrationServiceEnvironmentId,
        location = location,
        logicAppIntegrationAccountId = logicAppIntegrationAccountId,
        name = name,
        parameters = parameters,
        resourceGroupName = resourceGroupName,
        tags = tags,
        workflowParameters = workflowParameters,
        workflowSchema = workflowSchema,
        workflowVersion = workflowVersion,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy