Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi
oci.DevOps.getTrigger
Explore with Pulumi AI
This data source provides details about a specific Trigger resource in Oracle Cloud Infrastructure Devops service.
Retrieves a trigger by identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTrigger = oci.DevOps.getTrigger({
    triggerId: testTriggerOciDevopsTrigger.id,
});
import pulumi
import pulumi_oci as oci
test_trigger = oci.DevOps.get_trigger(trigger_id=test_trigger_oci_devops_trigger["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/devops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devops.GetTrigger(ctx, &devops.GetTriggerArgs{
			TriggerId: testTriggerOciDevopsTrigger.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testTrigger = Oci.DevOps.GetTrigger.Invoke(new()
    {
        TriggerId = testTriggerOciDevopsTrigger.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DevOps.DevOpsFunctions;
import com.pulumi.oci.DevOps.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 testTrigger = DevOpsFunctions.getTrigger(GetTriggerArgs.builder()
            .triggerId(testTriggerOciDevopsTrigger.id())
            .build());
    }
}
variables:
  testTrigger:
    fn::invoke:
      function: oci:DevOps:getTrigger
      arguments:
        triggerId: ${testTriggerOciDevopsTrigger.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(trigger_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetTriggerResult
def get_trigger_output(trigger_id: 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: oci:DevOps/getTrigger:getTrigger
  arguments:
    # arguments dictionaryThe following arguments are supported:
- TriggerId string
- Unique trigger identifier.
- TriggerId string
- Unique trigger identifier.
- triggerId String
- Unique trigger identifier.
- triggerId string
- Unique trigger identifier.
- trigger_id str
- Unique trigger identifier.
- triggerId String
- Unique trigger identifier.
getTrigger Result
The following output properties are available:
- Actions
List<GetTrigger Action> 
- The list of actions that are to be performed for this trigger.
- CompartmentId string
- The OCID of the compartment that contains the trigger.
- ConnectionId string
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Description about the trigger.
- DisplayName string
- Trigger display name. Avoid entering confidential information.
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
- Id string
- Unique identifier that is immutable on creation.
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- ProjectId string
- The OCID of the DevOps project to which the trigger belongs to.
- RepositoryId string
- The OCID of the DevOps code repository.
- State string
- The current state of the trigger.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the trigger was created. Format defined by RFC3339.
- TimeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- TriggerId string
- TriggerSource string
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- TriggerUrl string
- The endpoint that listens to trigger events.
- Actions
[]GetTrigger Action 
- The list of actions that are to be performed for this trigger.
- CompartmentId string
- The OCID of the compartment that contains the trigger.
- ConnectionId string
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Description about the trigger.
- DisplayName string
- Trigger display name. Avoid entering confidential information.
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
- Id string
- Unique identifier that is immutable on creation.
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- ProjectId string
- The OCID of the DevOps project to which the trigger belongs to.
- RepositoryId string
- The OCID of the DevOps code repository.
- State string
- The current state of the trigger.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the trigger was created. Format defined by RFC3339.
- TimeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- TriggerId string
- TriggerSource string
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- TriggerUrl string
- The endpoint that listens to trigger events.
- actions
List<GetTrigger Action> 
- The list of actions that are to be performed for this trigger.
- compartmentId String
- The OCID of the compartment that contains the trigger.
- connectionId String
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description String
- Description about the trigger.
- displayName String
- Trigger display name. Avoid entering confidential information.
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
- id String
- Unique identifier that is immutable on creation.
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- projectId String
- The OCID of the DevOps project to which the trigger belongs to.
- repositoryId String
- The OCID of the DevOps code repository.
- state String
- The current state of the trigger.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated String
- The time the trigger was updated. Format defined by RFC3339.
- triggerId String
- triggerSource String
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- triggerUrl String
- The endpoint that listens to trigger events.
- actions
GetTrigger Action[] 
- The list of actions that are to be performed for this trigger.
- compartmentId string
- The OCID of the compartment that contains the trigger.
- connectionId string
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description string
- Description about the trigger.
- displayName string
- Trigger display name. Avoid entering confidential information.
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
- id string
- Unique identifier that is immutable on creation.
- lifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- projectId string
- The OCID of the DevOps project to which the trigger belongs to.
- repositoryId string
- The OCID of the DevOps code repository.
- state string
- The current state of the trigger.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated string
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- triggerId string
- triggerSource string
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- triggerUrl string
- The endpoint that listens to trigger events.
- actions
Sequence[devops.Get Trigger Action] 
- The list of actions that are to be performed for this trigger.
- compartment_id str
- The OCID of the compartment that contains the trigger.
- connection_id str
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description str
- Description about the trigger.
- display_name str
- Trigger display name. Avoid entering confidential information.
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
- id str
- Unique identifier that is immutable on creation.
- lifecycle_details str
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- project_id str
- The OCID of the DevOps project to which the trigger belongs to.
- repository_id str
- The OCID of the DevOps code repository.
- state str
- The current state of the trigger.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- time_created str
- The time the trigger was created. Format defined by RFC3339.
- time_updated str
- The time the trigger was updated. Format defined by RFC3339.
- trigger_id str
- trigger_source str
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- trigger_url str
- The endpoint that listens to trigger events.
- actions List<Property Map>
- The list of actions that are to be performed for this trigger.
- compartmentId String
- The OCID of the compartment that contains the trigger.
- connectionId String
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description String
- Description about the trigger.
- displayName String
- Trigger display name. Avoid entering confidential information.
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
- id String
- Unique identifier that is immutable on creation.
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- projectId String
- The OCID of the DevOps project to which the trigger belongs to.
- repositoryId String
- The OCID of the DevOps code repository.
- state String
- The current state of the trigger.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated String
- The time the trigger was updated. Format defined by RFC3339.
- triggerId String
- triggerSource String
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- triggerUrl String
- The endpoint that listens to trigger events.
Supporting Types
GetTriggerAction  
- BuildPipeline stringId 
- The OCID of the build pipeline to be triggered.
- Filters
List<GetTrigger Action Filter> 
- Type string
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- BuildPipeline stringId 
- The OCID of the build pipeline to be triggered.
- Filters
[]GetTrigger Action Filter 
- Type string
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- buildPipeline StringId 
- The OCID of the build pipeline to be triggered.
- filters
List<GetTrigger Action Filter> 
- type String
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- buildPipeline stringId 
- The OCID of the build pipeline to be triggered.
- filters
GetTrigger Action Filter[] 
- type string
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- build_pipeline_ strid 
- The OCID of the build pipeline to be triggered.
- filters
Sequence[devops.Get Trigger Action Filter] 
- type str
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- buildPipeline StringId 
- The OCID of the build pipeline to be triggered.
- filters List<Property Map>
- type String
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
GetTriggerActionFilter   
- Events List<string>
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- Excludes
List<GetTrigger Action Filter Exclude> 
- Attributes to filter GitLab self-hosted server events. File filter criteria - Changes only affecting excluded files will not invoke a build. if both include and exclude filter are used then exclusion filter will be applied on the result set of inclusion filter.
- Includes
List<GetTrigger Action Filter Include> 
- Attributes to filter GitLab self-hosted server events.
- TriggerSource string
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- Events []string
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- Excludes
[]GetTrigger Action Filter Exclude 
- Attributes to filter GitLab self-hosted server events. File filter criteria - Changes only affecting excluded files will not invoke a build. if both include and exclude filter are used then exclusion filter will be applied on the result set of inclusion filter.
- Includes
[]GetTrigger Action Filter Include 
- Attributes to filter GitLab self-hosted server events.
- TriggerSource string
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- events List<String>
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- excludes
List<GetTrigger Action Filter Exclude> 
- Attributes to filter GitLab self-hosted server events. File filter criteria - Changes only affecting excluded files will not invoke a build. if both include and exclude filter are used then exclusion filter will be applied on the result set of inclusion filter.
- includes
List<GetTrigger Action Filter Include> 
- Attributes to filter GitLab self-hosted server events.
- triggerSource String
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- events string[]
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- excludes
GetTrigger Action Filter Exclude[] 
- Attributes to filter GitLab self-hosted server events. File filter criteria - Changes only affecting excluded files will not invoke a build. if both include and exclude filter are used then exclusion filter will be applied on the result set of inclusion filter.
- includes
GetTrigger Action Filter Include[] 
- Attributes to filter GitLab self-hosted server events.
- triggerSource string
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- events Sequence[str]
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- excludes
Sequence[devops.Get Trigger Action Filter Exclude] 
- Attributes to filter GitLab self-hosted server events. File filter criteria - Changes only affecting excluded files will not invoke a build. if both include and exclude filter are used then exclusion filter will be applied on the result set of inclusion filter.
- includes
Sequence[devops.Get Trigger Action Filter Include] 
- Attributes to filter GitLab self-hosted server events.
- trigger_source str
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
- events List<String>
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- excludes List<Property Map>
- Attributes to filter GitLab self-hosted server events. File filter criteria - Changes only affecting excluded files will not invoke a build. if both include and exclude filter are used then exclusion filter will be applied on the result set of inclusion filter.
- includes List<Property Map>
- Attributes to filter GitLab self-hosted server events.
- triggerSource String
- Source of the trigger. Allowed values are, GITHUB and GITLAB.
GetTriggerActionFilterExclude    
- FileFilters List<GetTrigger Action Filter Exclude File Filter> 
- Attributes to support include/exclude files for triggering build runs.
- FileFilters []GetTrigger Action Filter Exclude File Filter 
- Attributes to support include/exclude files for triggering build runs.
- fileFilters List<GetTrigger Action Filter Exclude File Filter> 
- Attributes to support include/exclude files for triggering build runs.
- fileFilters GetTrigger Action Filter Exclude File Filter[] 
- Attributes to support include/exclude files for triggering build runs.
- file_filters Sequence[devops.Get Trigger Action Filter Exclude File Filter] 
- Attributes to support include/exclude files for triggering build runs.
- fileFilters List<Property Map>
- Attributes to support include/exclude files for triggering build runs.
GetTriggerActionFilterExcludeFileFilter      
- FilePaths List<string>
- The file paths/glob pattern for files.
- FilePaths []string
- The file paths/glob pattern for files.
- filePaths List<String>
- The file paths/glob pattern for files.
- filePaths string[]
- The file paths/glob pattern for files.
- file_paths Sequence[str]
- The file paths/glob pattern for files.
- filePaths List<String>
- The file paths/glob pattern for files.
GetTriggerActionFilterInclude    
- BaseRef string
- The target branch for pull requests; not applicable for push requests.
- FileFilters List<GetTrigger Action Filter Include File Filter> 
- Attributes to support include/exclude files for triggering build runs.
- HeadRef string
- Branch for push event; source branch for pull requests.
- RepositoryName string
- The repository name for trigger events.
- BaseRef string
- The target branch for pull requests; not applicable for push requests.
- FileFilters []GetTrigger Action Filter Include File Filter 
- Attributes to support include/exclude files for triggering build runs.
- HeadRef string
- Branch for push event; source branch for pull requests.
- RepositoryName string
- The repository name for trigger events.
- baseRef String
- The target branch for pull requests; not applicable for push requests.
- fileFilters List<GetTrigger Action Filter Include File Filter> 
- Attributes to support include/exclude files for triggering build runs.
- headRef String
- Branch for push event; source branch for pull requests.
- repositoryName String
- The repository name for trigger events.
- baseRef string
- The target branch for pull requests; not applicable for push requests.
- fileFilters GetTrigger Action Filter Include File Filter[] 
- Attributes to support include/exclude files for triggering build runs.
- headRef string
- Branch for push event; source branch for pull requests.
- repositoryName string
- The repository name for trigger events.
- base_ref str
- The target branch for pull requests; not applicable for push requests.
- file_filters Sequence[devops.Get Trigger Action Filter Include File Filter] 
- Attributes to support include/exclude files for triggering build runs.
- head_ref str
- Branch for push event; source branch for pull requests.
- repository_name str
- The repository name for trigger events.
- baseRef String
- The target branch for pull requests; not applicable for push requests.
- fileFilters List<Property Map>
- Attributes to support include/exclude files for triggering build runs.
- headRef String
- Branch for push event; source branch for pull requests.
- repositoryName String
- The repository name for trigger events.
GetTriggerActionFilterIncludeFileFilter      
- FilePaths List<string>
- The file paths/glob pattern for files.
- FilePaths []string
- The file paths/glob pattern for files.
- filePaths List<String>
- The file paths/glob pattern for files.
- filePaths string[]
- The file paths/glob pattern for files.
- file_paths Sequence[str]
- The file paths/glob pattern for files.
- filePaths List<String>
- The file paths/glob pattern for files.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.