1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getTriggers
Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi

harness.platform.getTriggers

Explore with Pulumi AI

Harness v0.7.2 published on Tuesday, Apr 15, 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 example = harness.platform.getTriggers({
    identifier: "identifier",
    orgId: "org_id",
    projectId: "project_id",
    targetId: "pipeline_id",
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.get_triggers(identifier="identifier",
    org_id="org_id",
    project_id="project_id",
    target_id="pipeline_id")
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.LookupTriggers(ctx, &platform.LookupTriggersArgs{
			Identifier: pulumi.StringRef("identifier"),
			OrgId:      "org_id",
			ProjectId:  "project_id",
			TargetId:   "pipeline_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 example = Harness.Platform.GetTriggers.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
        ProjectId = "project_id",
        TargetId = "pipeline_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetTriggersArgs;
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 example = PlatformFunctions.getTriggers(GetTriggersArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .projectId("project_id")
            .targetId("pipeline_id")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: harness:platform:getTriggers
      arguments:
        identifier: identifier
        orgId: org_id
        projectId: project_id
        targetId: pipeline_id
Copy

Using getTriggers

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 getTriggers(args: GetTriggersArgs, opts?: InvokeOptions): Promise<GetTriggersResult>
function getTriggersOutput(args: GetTriggersOutputArgs, opts?: InvokeOptions): Output<GetTriggersResult>
Copy
def get_triggers(identifier: Optional[str] = None,
                 ignore_error: Optional[bool] = None,
                 name: Optional[str] = None,
                 org_id: Optional[str] = None,
                 project_id: Optional[str] = None,
                 target_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetTriggersResult
def get_triggers_output(identifier: Optional[pulumi.Input[str]] = None,
                 ignore_error: Optional[pulumi.Input[bool]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 org_id: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 target_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetTriggersResult]
Copy
func LookupTriggers(ctx *Context, args *LookupTriggersArgs, opts ...InvokeOption) (*LookupTriggersResult, error)
func LookupTriggersOutput(ctx *Context, args *LookupTriggersOutputArgs, opts ...InvokeOption) LookupTriggersResultOutput
Copy

> Note: This function is named LookupTriggers in the Go SDK.

public static class GetTriggers 
{
    public static Task<GetTriggersResult> InvokeAsync(GetTriggersArgs args, InvokeOptions? opts = null)
    public static Output<GetTriggersResult> Invoke(GetTriggersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTriggersResult> getTriggers(GetTriggersArgs args, InvokeOptions options)
public static Output<GetTriggersResult> getTriggers(GetTriggersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:platform/getTriggers:getTriggers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

OrgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the project.
TargetId This property is required. string
Identifier of the target pipeline
Identifier string
Unique identifier of the resource.
IgnoreError bool
ignore error default false
Name string
Name of the resource.
OrgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the project.
TargetId This property is required. string
Identifier of the target pipeline
Identifier string
Unique identifier of the resource.
IgnoreError bool
ignore error default false
Name string
Name of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the organization.
projectId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the project.
targetId This property is required. String
Identifier of the target pipeline
identifier String
Unique identifier of the resource.
ignoreError Boolean
ignore error default false
name String
Name of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
projectId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the project.
targetId This property is required. string
Identifier of the target pipeline
identifier string
Unique identifier of the resource.
ignoreError boolean
ignore error default false
name string
Name of the resource.
org_id
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the organization.
project_id
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the project.
target_id This property is required. str
Identifier of the target pipeline
identifier str
Unique identifier of the resource.
ignore_error bool
ignore error default false
name str
Name of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the organization.
projectId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the project.
targetId This property is required. String
Identifier of the target pipeline
identifier String
Unique identifier of the resource.
ignoreError Boolean
ignore error default false
name String
Name of the resource.

getTriggers Result

The following output properties are available:

Description string
Description of the resource.
Id string
The provider-assigned unique ID for this managed resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Tags List<string>
Tags to associate with the resource.
TargetId string
Identifier of the target pipeline
Yaml string
trigger yaml
Identifier string
Unique identifier of the resource.
IgnoreError bool
ignore error default false
Name string
Name of the resource.
Description string
Description of the resource.
Id string
The provider-assigned unique ID for this managed resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Tags []string
Tags to associate with the resource.
TargetId string
Identifier of the target pipeline
Yaml string
trigger yaml
Identifier string
Unique identifier of the resource.
IgnoreError bool
ignore error default false
Name string
Name of the resource.
description String
Description of the resource.
id String
The provider-assigned unique ID for this managed resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
tags List<String>
Tags to associate with the resource.
targetId String
Identifier of the target pipeline
yaml String
trigger yaml
identifier String
Unique identifier of the resource.
ignoreError Boolean
ignore error default false
name String
Name of the resource.
description string
Description of the resource.
id string
The provider-assigned unique ID for this managed resource.
orgId string
Unique identifier of the organization.
projectId string
Unique identifier of the project.
tags string[]
Tags to associate with the resource.
targetId string
Identifier of the target pipeline
yaml string
trigger yaml
identifier string
Unique identifier of the resource.
ignoreError boolean
ignore error default false
name string
Name of the resource.
description str
Description of the resource.
id str
The provider-assigned unique ID for this managed resource.
org_id str
Unique identifier of the organization.
project_id str
Unique identifier of the project.
tags Sequence[str]
Tags to associate with the resource.
target_id str
Identifier of the target pipeline
yaml str
trigger yaml
identifier str
Unique identifier of the resource.
ignore_error bool
ignore error default false
name str
Name of the resource.
description String
Description of the resource.
id String
The provider-assigned unique ID for this managed resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
tags List<String>
Tags to associate with the resource.
targetId String
Identifier of the target pipeline
yaml String
trigger yaml
identifier String
Unique identifier of the resource.
ignoreError Boolean
ignore error default false
name String
Name of the resource.

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.2 published on Tuesday, Apr 15, 2025 by Pulumi