Harness v0.4.4 published on Tuesday, Nov 12, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: harness:index/getTrigger:getTrigger
arguments:
# arguments dictionary
The following arguments are supported:
- App
Id 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 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 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 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.
- app
Id 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<Get
Trigger Condition> - The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- App
Id 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
[]Get
Trigger Condition - The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- App
Id 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<Get
Trigger Condition> - The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- app
Id 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
Get
Trigger Condition[] - The condition that will execute the Trigger: On new artifact, On pipeline completion, On Cron schedule, On webhook, On New Manifest.
- app
Id 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[Get
Trigger 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.
- app
Id 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
- On
Webhooks List<GetTrigger Condition On Webhook> - On webhook.
- Trigger
Condition stringType - Trigger condition.
- On
Webhooks []GetTrigger Condition On Webhook - On webhook.
- Trigger
Condition stringType - Trigger condition.
- on
Webhooks List<GetTrigger Condition On Webhook> - On webhook.
- trigger
Condition StringType - Trigger condition.
- on
Webhooks GetTrigger Condition On Webhook[] - On webhook.
- trigger
Condition stringType - Trigger condition.
- on_
webhooks Sequence[GetTrigger Condition On Webhook] - On webhook.
- trigger_
condition_ strtype - Trigger condition.
- on
Webhooks List<Property Map> - On webhook.
- trigger
Condition StringType - Trigger condition.
GetTriggerConditionOnWebhook
- Webhook
Details List<GetTrigger Condition On Webhook Webhook Detail> - Webhook details.
- Webhook
Details []GetTrigger Condition On Webhook Webhook Detail - Webhook details.
- webhook
Details List<GetTrigger Condition On Webhook Webhook Detail> - Webhook details.
- webhook
Details GetTrigger Condition On Webhook Webhook Detail[] - Webhook details.
- webhook_
details Sequence[GetTrigger Condition On Webhook Webhook Detail] - Webhook details.
- webhook
Details List<Property Map> - Webhook details.
GetTriggerConditionOnWebhookWebhookDetail
- Header string
- Header.
- Method string
- Method.
- Payload string
- Payload.
- Webhook
Token string - Webhook token.
- Webhook
Url string - Webhook URL.
- Header string
- Header.
- Method string
- Method.
- Payload string
- Payload.
- Webhook
Token string - Webhook token.
- Webhook
Url string - Webhook URL.
- header String
- Header.
- method String
- Method.
- payload String
- Payload.
- webhook
Token String - Webhook token.
- webhook
Url String - Webhook URL.
- header string
- Header.
- method string
- Method.
- payload string
- Payload.
- webhook
Token string - Webhook token.
- webhook
Url 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.
- webhook
Token String - Webhook token.
- webhook
Url 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.