1. Packages
  2. Harness Provider
  3. API Docs
  4. getTrigger
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

harness.getTrigger

Explore with Pulumi AI

Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  exampleByName:
    fn::invoke:
      function: harness:getTrigger
      arguments:
        appId: app_id
        name: name
  exampleById:
    fn::invoke:
      function: harness:getTrigger
      arguments:
        id: trigger_id
Copy

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>
Copy
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]
Copy
func GetTrigger(ctx *Context, args *GetTriggerArgs, opts ...InvokeOption) (*GetTriggerResult, error)
func GetTriggerOutput(ctx *Context, args *GetTriggerOutputArgs, opts ...InvokeOption) GetTriggerResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetTriggerResult> getTrigger(GetTriggerArgs args, InvokeOptions options)
public static Output<GetTriggerResult> getTrigger(GetTriggerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:index/getTrigger:getTrigger
  arguments:
    # arguments dictionary
Copy

The 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<GetTriggerCondition>
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 []GetTriggerCondition
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<GetTriggerCondition>
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 GetTriggerCondition[]
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[GetTriggerCondition]
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 This property is required. List<GetTriggerConditionOnWebhook>
On webhook.
TriggerConditionType This property is required. string
Trigger condition.
OnWebhooks This property is required. []GetTriggerConditionOnWebhook
On webhook.
TriggerConditionType This property is required. string
Trigger condition.
onWebhooks This property is required. List<GetTriggerConditionOnWebhook>
On webhook.
triggerConditionType This property is required. String
Trigger condition.
onWebhooks This property is required. GetTriggerConditionOnWebhook[]
On webhook.
triggerConditionType This property is required. string
Trigger condition.
on_webhooks This property is required. Sequence[GetTriggerConditionOnWebhook]
On webhook.
trigger_condition_type This property is required. str
Trigger condition.
onWebhooks This property is required. List<Property Map>
On webhook.
triggerConditionType This property is required. String
Trigger condition.

GetTriggerConditionOnWebhook

WebhookDetails This property is required. List<GetTriggerConditionOnWebhookWebhookDetail>
Webhook details.
WebhookDetails This property is required. []GetTriggerConditionOnWebhookWebhookDetail
Webhook details.
webhookDetails This property is required. List<GetTriggerConditionOnWebhookWebhookDetail>
Webhook details.
webhookDetails This property is required. GetTriggerConditionOnWebhookWebhookDetail[]
Webhook details.
webhook_details This property is required. Sequence[GetTriggerConditionOnWebhookWebhookDetail]
Webhook details.
webhookDetails This property is required. List<Property Map>
Webhook details.

GetTriggerConditionOnWebhookWebhookDetail

Header This property is required. string
Header.
Method This property is required. string
Method.
Payload This property is required. string
Payload.
WebhookToken This property is required. string
Webhook token.
WebhookUrl This property is required. string
Webhook URL.
Header This property is required. string
Header.
Method This property is required. string
Method.
Payload This property is required. string
Payload.
WebhookToken This property is required. string
Webhook token.
WebhookUrl This property is required. string
Webhook URL.
header This property is required. String
Header.
method This property is required. String
Method.
payload This property is required. String
Payload.
webhookToken This property is required. String
Webhook token.
webhookUrl This property is required. String
Webhook URL.
header This property is required. string
Header.
method This property is required. string
Method.
payload This property is required. string
Payload.
webhookToken This property is required. string
Webhook token.
webhookUrl This property is required. string
Webhook URL.
header This property is required. str
Header.
method This property is required. str
Method.
payload This property is required. str
Payload.
webhook_token This property is required. str
Webhook token.
webhook_url This property is required. str
Webhook URL.
header This property is required. String
Header.
method This property is required. String
Method.
payload This property is required. String
Payload.
webhookToken This property is required. String
Webhook token.
webhookUrl This property is required. String
Webhook URL.

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi