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

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

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

package com.pulumi.azure.logicapps.kotlin

import com.pulumi.azure.logicapps.TriggerCustomArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages a Custom Trigger within 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,
 * });
 * const exampleTriggerCustom = new azure.logicapps.TriggerCustom("example", {
 *     name: "example-trigger",
 *     logicAppId: exampleWorkflow.id,
 *     body: `{
 *   "recurrence": {
 *     "frequency": "Day",
 *     "interval": 1
 *   },
 *   "type": "Recurrence"
 * }
 * `,
 * });
 * ```
 * ```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)
 * example_trigger_custom = azure.logicapps.TriggerCustom("example",
 *     name="example-trigger",
 *     logic_app_id=example_workflow.id,
 *     body="""{
 *   "recurrence": {
 *     "frequency": "Day",
 *     "interval": 1
 *   },
 *   "type": "Recurrence"
 * }
 * """)
 * ```
 * ```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,
 *     });
 *     var exampleTriggerCustom = new Azure.LogicApps.TriggerCustom("example", new()
 *     {
 *         Name = "example-trigger",
 *         LogicAppId = exampleWorkflow.Id,
 *         Body = @"{
 *   ""recurrence"": {
 *     ""frequency"": ""Day"",
 *     ""interval"": 1
 *   },
 *   ""type"": ""Recurrence""
 * }
 * ",
 *     });
 * });
 * ```
 * ```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
 * 		}
 * 		exampleWorkflow, err := logicapps.NewWorkflow(ctx, "example", &logicapps.WorkflowArgs{
 * 			Name:              pulumi.String("workflow1"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = logicapps.NewTriggerCustom(ctx, "example", &logicapps.TriggerCustomArgs{
 * 			Name:       pulumi.String("example-trigger"),
 * 			LogicAppId: exampleWorkflow.ID(),
 * 			Body: pulumi.String(`{
 *   "recurrence": {
 *     "frequency": "Day",
 *     "interval": 1
 *   },
 *   "type": "Recurrence"
 * }
 * `),
 * 		})
 * 		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 com.pulumi.azure.logicapps.TriggerCustom;
 * import com.pulumi.azure.logicapps.TriggerCustomArgs;
 * 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());
 *         var exampleTriggerCustom = new TriggerCustom("exampleTriggerCustom", TriggerCustomArgs.builder()
 *             .name("example-trigger")
 *             .logicAppId(exampleWorkflow.id())
 *             .body("""
 * {
 *   "recurrence": {
 *     "frequency": "Day",
 *     "interval": 1
 *   },
 *   "type": "Recurrence"
 * }
 *             """)
 *             .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}
 *   exampleTriggerCustom:
 *     type: azure:logicapps:TriggerCustom
 *     name: example
 *     properties:
 *       name: example-trigger
 *       logicAppId: ${exampleWorkflow.id}
 *       body: |
 *         {
 *           "recurrence": {
 *             "frequency": "Day",
 *             "interval": 1
 *           },
 *           "type": "Recurrence"
 *         }
 * ```
 * 
 * ## Import
 * Logic App Custom Triggers can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:logicapps/triggerCustom:TriggerCustom custom1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Logic/workflows/workflow1/triggers/custom1
 * ```
 * @property body Specifies the JSON Blob defining the Body of this Custom Trigger.
 * @property logicAppId Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
 * @property name Specifies the name of the HTTP Trigger to be created within the Logic App Workflow. Changing this forces a new resource to be created.
 * > **NOTE:** This name must be unique across all Triggers within the Logic App Workflow.
 */
public data class TriggerCustomArgs(
    public val body: Output? = null,
    public val logicAppId: Output? = null,
    public val name: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.logicapps.TriggerCustomArgs =
        com.pulumi.azure.logicapps.TriggerCustomArgs.builder()
            .body(body?.applyValue({ args0 -> args0 }))
            .logicAppId(logicAppId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TriggerCustomArgs].
 */
@PulumiTagMarker
public class TriggerCustomArgsBuilder internal constructor() {
    private var body: Output? = null

    private var logicAppId: Output? = null

    private var name: Output? = null

    /**
     * @param value Specifies the JSON Blob defining the Body of this Custom Trigger.
     */
    @JvmName("nglqfsmbxufirjsf")
    public suspend fun body(`value`: Output) {
        this.body = value
    }

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

    /**
     * @param value Specifies the name of the HTTP Trigger to be created within the Logic App Workflow. Changing this forces a new resource to be created.
     * > **NOTE:** This name must be unique across all Triggers within the Logic App Workflow.
     */
    @JvmName("uqlegmebxelaqewa")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the JSON Blob defining the Body of this Custom Trigger.
     */
    @JvmName("vpfghvatipgalqdt")
    public suspend fun body(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.body = mapped
    }

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

    /**
     * @param value Specifies the name of the HTTP Trigger to be created within the Logic App Workflow. Changing this forces a new resource to be created.
     * > **NOTE:** This name must be unique across all Triggers within the Logic App Workflow.
     */
    @JvmName("xsavjlpcldltpsbb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): TriggerCustomArgs = TriggerCustomArgs(
        body = body,
        logicAppId = logicAppId,
        name = name,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy