Harness v0.6.0 published on Tuesday, Mar 25, 2025 by Pulumi
harness.getTrigger
Explore with Pulumi AI
Data source for retrieving a Harness trigger.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const exampleByName = harness.getTrigger({
    appId: "app_id",
    name: "name",
});
const exampleById = harness.getTrigger({
    id: "trigger_id",
});
import pulumi
import pulumi_harness as harness
example_by_name = harness.get_trigger(app_id="app_id",
    name="name")
example_by_id = harness.get_trigger(id="trigger_id")
package main
import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := harness.GetTrigger(ctx, &harness.GetTriggerArgs{
			AppId: pulumi.StringRef("app_id"),
			Name:  pulumi.StringRef("name"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = harness.GetTrigger(ctx, &harness.GetTriggerArgs{
			Id: pulumi.StringRef("trigger_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() => 
{
    var exampleByName = Harness.GetTrigger.Invoke(new()
    {
        AppId = "app_id",
        Name = "name",
    });
    var exampleById = Harness.GetTrigger.Invoke(new()
    {
        Id = "trigger_id",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.HarnessFunctions;
import com.pulumi.harness.inputs.GetTriggerArgs;
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) {
        final var exampleByName = HarnessFunctions.getTrigger(GetTriggerArgs.builder()
            .appId("app_id")
            .name("name")
            .build());
        final var exampleById = HarnessFunctions.getTrigger(GetTriggerArgs.builder()
            .id("trigger_id")
            .build());
    }
}
variables:
  exampleByName:
    fn::invoke:
      function: harness:getTrigger
      arguments:
        appId: app_id
        name: name
  exampleById:
    fn::invoke:
      function: harness:getTrigger
      arguments:
        id: trigger_id
Using getTrigger
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTrigger(args: GetTriggerArgs, opts?: InvokeOptions): Promise<GetTriggerResult>
function getTriggerOutput(args: GetTriggerOutputArgs, opts?: InvokeOptions): Output<GetTriggerResult>def get_trigger(app_id: Optional[str] = None,
                description: Optional[str] = None,
                id: Optional[str] = None,
                name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetTriggerResult
def get_trigger_output(app_id: Optional[pulumi.Input[str]] = None,
                description: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetTriggerResult]func GetTrigger(ctx *Context, args *GetTriggerArgs, opts ...InvokeOption) (*GetTriggerResult, error)
func GetTriggerOutput(ctx *Context, args *GetTriggerOutputArgs, opts ...InvokeOption) GetTriggerResultOutput> Note: This function is named GetTrigger in the Go SDK.
public static class GetTrigger 
{
    public static Task<GetTriggerResult> InvokeAsync(GetTriggerArgs args, InvokeOptions? opts = null)
    public static Output<GetTriggerResult> Invoke(GetTriggerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTriggerResult> getTrigger(GetTriggerArgs args, InvokeOptions options)
public static Output<GetTriggerResult> getTrigger(GetTriggerArgs args, InvokeOptions options)
fn::invoke:
  function: harness:index/getTrigger:getTrigger
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AppId string
- The id of the application.
- Description string
- The trigger description.
- Id string
- Unique identifier of the trigger.
- Name string
- The name of the trigger.
- AppId string
- The id of the application.
- Description string
- The trigger description.
- Id string
- Unique identifier of the trigger.
- Name string
- The name of the trigger.
- appId String
- The id of the application.
- description String
- The trigger description.
- id String
- Unique identifier of the trigger.
- name String
- The name of the trigger.
- appId string
- The id of the application.
- description string
- The trigger description.
- id string
- Unique identifier of the trigger.
- name string
- The name of the trigger.
- app_id str
- The id of the application.
- description str
- The trigger description.
- id str
- Unique identifier of the trigger.
- name str
- The name of the trigger.
- appId String
- The id of the application.
- description String
- The trigger description.
- id String
- Unique identifier of the trigger.
- name String
- The name of the trigger.
getTrigger Result
The following output properties are available:
- Conditions
List<GetTrigger Condition> 
- The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- AppId string
- The id of the application.
- Description string
- The trigger description.
- Id string
- Unique identifier of the trigger.
- Name string
- The name of the trigger.
- Conditions
[]GetTrigger Condition 
- The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- AppId string
- The id of the application.
- Description string
- The trigger description.
- Id string
- Unique identifier of the trigger.
- Name string
- The name of the trigger.
- conditions
List<GetTrigger Condition> 
- The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- appId String
- The id of the application.
- description String
- The trigger description.
- id String
- Unique identifier of the trigger.
- name String
- The name of the trigger.
- conditions
GetTrigger Condition[] 
- The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- appId string
- The id of the application.
- description string
- The trigger description.
- id string
- Unique identifier of the trigger.
- name string
- The name of the trigger.
- conditions
Sequence[GetTrigger Condition] 
- The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- app_id str
- The id of the application.
- description str
- The trigger description.
- id str
- Unique identifier of the trigger.
- name str
- The name of the trigger.
- conditions List<Property Map>
- The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- appId String
- The id of the application.
- description String
- The trigger description.
- id String
- Unique identifier of the trigger.
- name String
- The name of the trigger.
Supporting Types
GetTriggerCondition  
- OnWebhooks List<GetTrigger Condition On Webhook> 
- On webhook.
- TriggerCondition stringType 
- Trigger condition.
- OnWebhooks []GetTrigger Condition On Webhook 
- On webhook.
- TriggerCondition stringType 
- Trigger condition.
- onWebhooks List<GetTrigger Condition On Webhook> 
- On webhook.
- triggerCondition StringType 
- Trigger condition.
- onWebhooks GetTrigger Condition On Webhook[] 
- On webhook.
- triggerCondition stringType 
- Trigger condition.
- on_webhooks Sequence[GetTrigger Condition On Webhook] 
- On webhook.
- trigger_condition_ strtype 
- Trigger condition.
- onWebhooks List<Property Map>
- On webhook.
- triggerCondition StringType 
- Trigger condition.
GetTriggerConditionOnWebhook    
- WebhookDetails List<GetTrigger Condition On Webhook Webhook Detail> 
- Webhook details.
- WebhookDetails []GetTrigger Condition On Webhook Webhook Detail 
- Webhook details.
- webhookDetails List<GetTrigger Condition On Webhook Webhook Detail> 
- Webhook details.
- webhookDetails GetTrigger Condition On Webhook Webhook Detail[] 
- Webhook details.
- webhook_details Sequence[GetTrigger Condition On Webhook Webhook Detail] 
- Webhook details.
- webhookDetails List<Property Map>
- Webhook details.
GetTriggerConditionOnWebhookWebhookDetail      
- Header string
- Header.
- Method string
- Method.
- Payload string
- Payload.
- WebhookToken string
- Webhook token.
- WebhookUrl string
- Webhook URL.
- Header string
- Header.
- Method string
- Method.
- Payload string
- Payload.
- WebhookToken string
- Webhook token.
- WebhookUrl string
- Webhook URL.
- header String
- Header.
- method String
- Method.
- payload String
- Payload.
- webhookToken String
- Webhook token.
- webhookUrl String
- Webhook URL.
- header string
- Header.
- method string
- Method.
- payload string
- Payload.
- webhookToken string
- Webhook token.
- webhookUrl string
- Webhook URL.
- header str
- Header.
- method str
- Method.
- payload str
- Payload.
- webhook_token str
- Webhook token.
- webhook_url str
- Webhook URL.
- header String
- Header.
- method String
- Method.
- payload String
- Payload.
- webhookToken String
- Webhook token.
- webhookUrl String
- Webhook URL.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the harnessTerraform Provider.
