Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.logic.kotlin.WorkflowArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.logic.kotlin
import com.pulumi.azurenative.logic.WorkflowArgs.builder
import com.pulumi.azurenative.logic.kotlin.enums.WorkflowState
import com.pulumi.azurenative.logic.kotlin.inputs.FlowAccessControlConfigurationArgs
import com.pulumi.azurenative.logic.kotlin.inputs.FlowAccessControlConfigurationArgsBuilder
import com.pulumi.azurenative.logic.kotlin.inputs.FlowEndpointsConfigurationArgs
import com.pulumi.azurenative.logic.kotlin.inputs.FlowEndpointsConfigurationArgsBuilder
import com.pulumi.azurenative.logic.kotlin.inputs.ManagedServiceIdentityArgs
import com.pulumi.azurenative.logic.kotlin.inputs.ManagedServiceIdentityArgsBuilder
import com.pulumi.azurenative.logic.kotlin.inputs.ResourceReferenceArgs
import com.pulumi.azurenative.logic.kotlin.inputs.ResourceReferenceArgsBuilder
import com.pulumi.azurenative.logic.kotlin.inputs.WorkflowParameterArgs
import com.pulumi.azurenative.logic.kotlin.inputs.WorkflowParameterArgsBuilder
import com.pulumi.core.Either
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.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* The workflow type.
* Azure REST API version: 2019-05-01. Prior API version in Azure Native 1.x: 2019-05-01.
* Other available API versions: 2015-02-01-preview, 2016-06-01, 2018-07-01-preview.
* ## Example Usage
* ### Create or update a workflow
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var workflow = new AzureNative.Logic.Workflow("workflow", new()
* {
* Definition = new Dictionary
* {
* ["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
* ["actions"] = new Dictionary
* {
* ["Find_pet_by_ID"] = new Dictionary
* {
* ["inputs"] = new Dictionary
* {
* ["host"] = new Dictionary
* {
* ["connection"] = new Dictionary
* {
* ["name"] = "@parameters('$connections')['test-custom-connector']['connectionId']",
* },
* },
* ["method"] = "get",
* ["path"] = "/pet/@{encodeURIComponent('1')}",
* },
* ["runAfter"] = new Dictionary
* {
* },
* ["type"] = "ApiConnection",
* },
* },
* ["contentVersion"] = "1.0.0.0",
* ["outputs"] = new Dictionary
* {
* },
* ["parameters"] = new Dictionary
* {
* ["$connections"] = new Dictionary
* {
* ["defaultValue"] = new Dictionary
* {
* },
* ["type"] = "Object",
* },
* },
* ["triggers"] = new Dictionary
* {
* ["manual"] = new Dictionary
* {
* ["inputs"] = new Dictionary
* {
* ["schema"] = new Dictionary
* {
* },
* },
* ["kind"] = "Http",
* ["type"] = "Request",
* },
* },
* },
* IntegrationAccount = new AzureNative.Logic.Inputs.ResourceReferenceArgs
* {
* Id = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account",
* },
* Location = "brazilsouth",
* Parameters =
* {
* { "$connections", new AzureNative.Logic.Inputs.WorkflowParameterArgs
* {
* Value = new Dictionary
* {
* ["test-custom-connector"] = new Dictionary
* {
* ["connectionId"] = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Web/connections/test-custom-connector",
* ["connectionName"] = "test-custom-connector",
* ["id"] = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector",
* },
* },
* } },
* },
* ResourceGroupName = "test-resource-group",
* Tags = null,
* WorkflowName = "test-workflow",
* });
* });
* ```
* ```go
* package main
* import (
* logic "github.com/pulumi/pulumi-azure-native-sdk/logic/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := logic.NewWorkflow(ctx, "workflow", &logic.WorkflowArgs{
* Definition: pulumi.Any(map[string]interface{}{
* "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
* "actions": map[string]interface{}{
* "Find_pet_by_ID": map[string]interface{}{
* "inputs": map[string]interface{}{
* "host": map[string]interface{}{
* "connection": map[string]interface{}{
* "name": "@parameters('$connections')['test-custom-connector']['connectionId']",
* },
* },
* "method": "get",
* "path": "/pet/@{encodeURIComponent('1')}",
* },
* "runAfter": nil,
* "type": "ApiConnection",
* },
* },
* "contentVersion": "1.0.0.0",
* "outputs": nil,
* "parameters": map[string]interface{}{
* "$connections": map[string]interface{}{
* "defaultValue": nil,
* "type": "Object",
* },
* },
* "triggers": map[string]interface{}{
* "manual": map[string]interface{}{
* "inputs": map[string]interface{}{
* "schema": nil,
* },
* "kind": "Http",
* "type": "Request",
* },
* },
* }),
* IntegrationAccount: &logic.ResourceReferenceArgs{
* Id: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account"),
* },
* Location: pulumi.String("brazilsouth"),
* Parameters: logic.WorkflowParameterMap{
* "$connections": &logic.WorkflowParameterArgs{
* Value: pulumi.Any(map[string]interface{}{
* "test-custom-connector": map[string]interface{}{
* "connectionId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Web/connections/test-custom-connector",
* "connectionName": "test-custom-connector",
* "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector",
* },
* }),
* },
* },
* ResourceGroupName: pulumi.String("test-resource-group"),
* Tags: nil,
* WorkflowName: pulumi.String("test-workflow"),
* })
* 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.azurenative.logic.Workflow;
* import com.pulumi.azurenative.logic.WorkflowArgs;
* import com.pulumi.azurenative.logic.inputs.ResourceReferenceArgs;
* 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 workflow = new Workflow("workflow", WorkflowArgs.builder()
* .definition(Map.ofEntries(
* Map.entry("$schema", "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#"),
* Map.entry("actions", Map.of("Find_pet_by_ID", Map.ofEntries(
* Map.entry("inputs", Map.ofEntries(
* Map.entry("host", Map.of("connection", Map.of("name", "@parameters('$connections')['test-custom-connector']['connectionId']"))),
* Map.entry("method", "get"),
* Map.entry("path", "/pet/@{encodeURIComponent('1')}")
* )),
* Map.entry("runAfter", ),
* Map.entry("type", "ApiConnection")
* ))),
* Map.entry("contentVersion", "1.0.0.0"),
* Map.entry("outputs", ),
* Map.entry("parameters", Map.of("$connections", Map.ofEntries(
* Map.entry("defaultValue", ),
* Map.entry("type", "Object")
* ))),
* Map.entry("triggers", Map.of("manual", Map.ofEntries(
* Map.entry("inputs", Map.of("schema", )),
* Map.entry("kind", "Http"),
* Map.entry("type", "Request")
* )))
* ))
* .integrationAccount(ResourceReferenceArgs.builder()
* .id("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account")
* .build())
* .location("brazilsouth")
* .parameters(Map.of("$connections", Map.of("value", Map.of("test-custom-connector", Map.ofEntries(
* Map.entry("connectionId", "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Web/connections/test-custom-connector"),
* Map.entry("connectionName", "test-custom-connector"),
* Map.entry("id", "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector")
* )))))
* .resourceGroupName("test-resource-group")
* .tags()
* .workflowName("test-workflow")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:logic:Workflow myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}
* ```
* @property accessControl The access control configuration.
* @property definition The definition.
* @property endpointsConfiguration The endpoints configuration.
* @property identity Managed service identity properties.
* @property integrationAccount The integration account.
* @property integrationServiceEnvironment The integration service environment.
* @property location The resource location.
* @property parameters The parameters.
* @property resourceGroupName The resource group name.
* @property state The state.
* @property tags The resource tags.
* @property workflowName The workflow name.
*/
public data class WorkflowArgs(
public val accessControl: Output? = null,
public val definition: Output? = null,
public val endpointsConfiguration: Output? = null,
public val identity: Output? = null,
public val integrationAccount: Output? = null,
public val integrationServiceEnvironment: Output? = null,
public val location: Output? = null,
public val parameters: Output>? = null,
public val resourceGroupName: Output? = null,
public val state: Output>? = null,
public val tags: Output>? = null,
public val workflowName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.logic.WorkflowArgs =
com.pulumi.azurenative.logic.WorkflowArgs.builder()
.accessControl(accessControl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.definition(definition?.applyValue({ args0 -> args0 }))
.endpointsConfiguration(
endpointsConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.integrationAccount(
integrationAccount?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.integrationServiceEnvironment(
integrationServiceEnvironment?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.parameters(
parameters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
}).toMap()
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.state(
state?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.workflowName(workflowName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [WorkflowArgs].
*/
@PulumiTagMarker
public class WorkflowArgsBuilder internal constructor() {
private var accessControl: Output? = null
private var definition: Output? = null
private var endpointsConfiguration: Output? = null
private var identity: Output? = null
private var integrationAccount: Output? = null
private var integrationServiceEnvironment: Output? = null
private var location: Output? = null
private var parameters: Output>? = null
private var resourceGroupName: Output? = null
private var state: Output>? = null
private var tags: Output>? = null
private var workflowName: Output? = null
/**
* @param value The access control configuration.
*/
@JvmName("bgpaexfhalvnfcjg")
public suspend fun accessControl(`value`: Output) {
this.accessControl = value
}
/**
* @param value The definition.
*/
@JvmName("nbhhnfjfiqqdikjo")
public suspend fun definition(`value`: Output) {
this.definition = value
}
/**
* @param value The endpoints configuration.
*/
@JvmName("ixcyfehjpysmrawn")
public suspend fun endpointsConfiguration(`value`: Output) {
this.endpointsConfiguration = value
}
/**
* @param value Managed service identity properties.
*/
@JvmName("gbkhidiupqiavrcs")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The integration account.
*/
@JvmName("cxbofghalwarvhqh")
public suspend fun integrationAccount(`value`: Output) {
this.integrationAccount = value
}
/**
* @param value The integration service environment.
*/
@JvmName("jkydndkwgbqsdgts")
public suspend fun integrationServiceEnvironment(`value`: Output) {
this.integrationServiceEnvironment = value
}
/**
* @param value The resource location.
*/
@JvmName("mynarenusocsylws")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The parameters.
*/
@JvmName("hhxgmsdroucdfsqr")
public suspend fun parameters(`value`: Output>) {
this.parameters = value
}
/**
* @param value The resource group name.
*/
@JvmName("povgaakfjhxpdqxt")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The state.
*/
@JvmName("htgovbnvjulfjvnc")
public suspend fun state(`value`: Output>) {
this.state = value
}
/**
* @param value The resource tags.
*/
@JvmName("sujpvqjenptuukty")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The workflow name.
*/
@JvmName("dkiqrgxmiminniin")
public suspend fun workflowName(`value`: Output) {
this.workflowName = value
}
/**
* @param value The access control configuration.
*/
@JvmName("hehggkyhcmuaupgy")
public suspend fun accessControl(`value`: FlowAccessControlConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accessControl = mapped
}
/**
* @param argument The access control configuration.
*/
@JvmName("oxfpwyfrxpphybsm")
public suspend fun accessControl(argument: suspend FlowAccessControlConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = FlowAccessControlConfigurationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.accessControl = mapped
}
/**
* @param value The definition.
*/
@JvmName("ppubiwatfmuksdcf")
public suspend fun definition(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.definition = mapped
}
/**
* @param value The endpoints configuration.
*/
@JvmName("okwyrrwdrslvrjel")
public suspend fun endpointsConfiguration(`value`: FlowEndpointsConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.endpointsConfiguration = mapped
}
/**
* @param argument The endpoints configuration.
*/
@JvmName("qdbxsrdwcfkmvmuf")
public suspend fun endpointsConfiguration(argument: suspend FlowEndpointsConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = FlowEndpointsConfigurationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.endpointsConfiguration = mapped
}
/**
* @param value Managed service identity properties.
*/
@JvmName("jakgiuppbrefkllp")
public suspend fun identity(`value`: ManagedServiceIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument Managed service identity properties.
*/
@JvmName("quwoimgqbomonbyj")
public suspend fun identity(argument: suspend ManagedServiceIdentityArgsBuilder.() -> Unit) {
val toBeMapped = ManagedServiceIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The integration account.
*/
@JvmName("wflflxwkkgkrkjod")
public suspend fun integrationAccount(`value`: ResourceReferenceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.integrationAccount = mapped
}
/**
* @param argument The integration account.
*/
@JvmName("rfragoibjtjaaiid")
public suspend fun integrationAccount(argument: suspend ResourceReferenceArgsBuilder.() -> Unit) {
val toBeMapped = ResourceReferenceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.integrationAccount = mapped
}
/**
* @param value The integration service environment.
*/
@JvmName("kyenenadulhncfqt")
public suspend fun integrationServiceEnvironment(`value`: ResourceReferenceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.integrationServiceEnvironment = mapped
}
/**
* @param argument The integration service environment.
*/
@JvmName("wphqnpiwkoqqptgg")
public suspend fun integrationServiceEnvironment(argument: suspend ResourceReferenceArgsBuilder.() -> Unit) {
val toBeMapped = ResourceReferenceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.integrationServiceEnvironment = mapped
}
/**
* @param value The resource location.
*/
@JvmName("othfblsfppanhpuk")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The parameters.
*/
@JvmName("jqwkkamwhbkgkopb")
public suspend fun parameters(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param argument The parameters.
*/
@JvmName("ftqqinypuqkndfwr")
public suspend fun parameters(vararg argument: Pair Unit>) {
val toBeMapped = argument.toList().map { (left, right) ->
left to
WorkflowParameterArgsBuilder().applySuspend { right() }.build()
}.toMap()
val mapped = of(toBeMapped)
this.parameters = mapped
}
/**
* @param values The parameters.
*/
@JvmName("iogomgybhvqhwawe")
public fun parameters(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param value The resource group name.
*/
@JvmName("cuyqwsriypnvrwbn")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The state.
*/
@JvmName("vnmqrqhirmjwiwhq")
public suspend fun state(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The state.
*/
@JvmName("grnjmwctbbhrjhqq")
public fun state(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The state.
*/
@JvmName("yvplhiurfechexky")
public fun state(`value`: WorkflowState) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The resource tags.
*/
@JvmName("dubtmuxbjvnjeorj")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values The resource tags.
*/
@JvmName("xopxdhugtlwfesfs")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The workflow name.
*/
@JvmName("rmkhlbgtnmkqsnpc")
public suspend fun workflowName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.workflowName = mapped
}
internal fun build(): WorkflowArgs = WorkflowArgs(
accessControl = accessControl,
definition = definition,
endpointsConfiguration = endpointsConfiguration,
identity = identity,
integrationAccount = integrationAccount,
integrationServiceEnvironment = integrationServiceEnvironment,
location = location,
parameters = parameters,
resourceGroupName = resourceGroupName,
state = state,
tags = tags,
workflowName = workflowName,
)
}