1. Packages
  2. Azure Classic
  3. API Docs
  4. logicapps
  5. TriggerCustom

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.logicapps.TriggerCustom

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages a Custom Trigger within a Logic App Workflow

    Example Usage

    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"
    }
    `,
    });
    
    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"
    }
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/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
    	})
    }
    
    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""
    }
    ",
        });
    
    });
    
    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());
    
        }
    }
    
    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"
            }        
    

    Create TriggerCustom Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TriggerCustom(name: string, args: TriggerCustomArgs, opts?: CustomResourceOptions);
    @overload
    def TriggerCustom(resource_name: str,
                      args: TriggerCustomArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def TriggerCustom(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      body: Optional[str] = None,
                      logic_app_id: Optional[str] = None,
                      name: Optional[str] = None)
    func NewTriggerCustom(ctx *Context, name string, args TriggerCustomArgs, opts ...ResourceOption) (*TriggerCustom, error)
    public TriggerCustom(string name, TriggerCustomArgs args, CustomResourceOptions? opts = null)
    public TriggerCustom(String name, TriggerCustomArgs args)
    public TriggerCustom(String name, TriggerCustomArgs args, CustomResourceOptions options)
    
    type: azure:logicapps:TriggerCustom
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TriggerCustomArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TriggerCustomArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TriggerCustomArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TriggerCustomArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TriggerCustomArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var triggerCustomResource = new Azure.LogicApps.TriggerCustom("triggerCustomResource", new()
    {
        Body = "string",
        LogicAppId = "string",
        Name = "string",
    });
    
    example, err := logicapps.NewTriggerCustom(ctx, "triggerCustomResource", &logicapps.TriggerCustomArgs{
    	Body:       pulumi.String("string"),
    	LogicAppId: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    })
    
    var triggerCustomResource = new TriggerCustom("triggerCustomResource", TriggerCustomArgs.builder()
        .body("string")
        .logicAppId("string")
        .name("string")
        .build());
    
    trigger_custom_resource = azure.logicapps.TriggerCustom("triggerCustomResource",
        body="string",
        logic_app_id="string",
        name="string")
    
    const triggerCustomResource = new azure.logicapps.TriggerCustom("triggerCustomResource", {
        body: "string",
        logicAppId: "string",
        name: "string",
    });
    
    type: azure:logicapps:TriggerCustom
    properties:
        body: string
        logicAppId: string
        name: string
    

    TriggerCustom Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TriggerCustom resource accepts the following input properties:

    Body string
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    LogicAppId string
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    Name string

    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.

    Body string
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    LogicAppId string
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    Name string

    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.

    body String
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    logicAppId String
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name String

    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.

    body string
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    logicAppId string
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name string

    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.

    body str
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    logic_app_id str
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name str

    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.

    body String
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    logicAppId String
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name String

    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TriggerCustom resource produces the following output properties:

    CallbackUrl string
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    Id string
    The provider-assigned unique ID for this managed resource.
    CallbackUrl string
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    Id string
    The provider-assigned unique ID for this managed resource.
    callbackUrl String
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    id String
    The provider-assigned unique ID for this managed resource.
    callbackUrl string
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    id string
    The provider-assigned unique ID for this managed resource.
    callback_url str
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    id str
    The provider-assigned unique ID for this managed resource.
    callbackUrl String
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TriggerCustom Resource

    Get an existing TriggerCustom resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TriggerCustomState, opts?: CustomResourceOptions): TriggerCustom
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            body: Optional[str] = None,
            callback_url: Optional[str] = None,
            logic_app_id: Optional[str] = None,
            name: Optional[str] = None) -> TriggerCustom
    func GetTriggerCustom(ctx *Context, name string, id IDInput, state *TriggerCustomState, opts ...ResourceOption) (*TriggerCustom, error)
    public static TriggerCustom Get(string name, Input<string> id, TriggerCustomState? state, CustomResourceOptions? opts = null)
    public static TriggerCustom get(String name, Output<String> id, TriggerCustomState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Body string
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    CallbackUrl string
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    LogicAppId string
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    Name string

    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.

    Body string
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    CallbackUrl string
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    LogicAppId string
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    Name string

    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.

    body String
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    callbackUrl String
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    logicAppId String
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name String

    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.

    body string
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    callbackUrl string
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    logicAppId string
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name string

    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.

    body str
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    callback_url str
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    logic_app_id str
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name str

    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.

    body String
    Specifies the JSON Blob defining the Body of this Custom Trigger.
    callbackUrl String
    The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
    logicAppId String
    Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
    name String

    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.

    Import

    Logic App Custom Triggers can be imported using the resource id, e.g.

    $ pulumi import azure:logicapps/triggerCustom:TriggerCustom custom1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Logic/workflows/workflow1/triggers/custom1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi