com.pulumi.azure.logicapps.TriggerCustom Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.logicapps;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.logicapps.TriggerCustomArgs;
import com.pulumi.azure.logicapps.inputs.TriggerCustomState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;
/**
* Manages a Custom Trigger within a Logic App Workflow
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## 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
* ```
*
*/
@ResourceType(type="azure:logicapps/triggerCustom:TriggerCustom")
public class TriggerCustom extends com.pulumi.resources.CustomResource {
/**
* Specifies the JSON Blob defining the Body of this Custom Trigger.
*
*/
@Export(name="body", refs={String.class}, tree="[0]")
private Output body;
/**
* @return Specifies the JSON Blob defining the Body of this Custom Trigger.
*
*/
public Output body() {
return this.body;
}
/**
* The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
*
*/
@Export(name="callbackUrl", refs={String.class}, tree="[0]")
private Output callbackUrl;
/**
* @return The URL of the Trigger within the Logic App Workflow. For use with certain resources like monitor_action_group and security_center_automation.
*
*/
public Output callbackUrl() {
return this.callbackUrl;
}
/**
* Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
*
*/
@Export(name="logicAppId", refs={String.class}, tree="[0]")
private Output logicAppId;
/**
* @return Specifies the ID of the Logic App Workflow. Changing this forces a new resource to be created.
*
*/
public Output logicAppId() {
return this.logicAppId;
}
/**
* 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.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return 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 Output name() {
return this.name;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public TriggerCustom(java.lang.String name) {
this(name, TriggerCustomArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public TriggerCustom(java.lang.String name, TriggerCustomArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public TriggerCustom(java.lang.String name, TriggerCustomArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:logicapps/triggerCustom:TriggerCustom", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private TriggerCustom(java.lang.String name, Output id, @Nullable TriggerCustomState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:logicapps/triggerCustom:TriggerCustom", name, state, makeResourceOptions(options, id), false);
}
private static TriggerCustomArgs makeArgs(TriggerCustomArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? TriggerCustomArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static TriggerCustom get(java.lang.String name, Output id, @Nullable TriggerCustomState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new TriggerCustom(name, id, state, options);
}
}