1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getTrigger
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DevOps.getTrigger

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    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/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DevOps/getTrigger:getTrigger
      arguments:
        # arguments dictionary

    The 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<GetTriggerAction>
    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
    DefinedTags Dictionary<string, object>
    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.
    FreeformTags Dictionary<string, object>
    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.
    SystemTags Dictionary<string, object>
    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 []GetTriggerAction
    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
    DefinedTags map[string]interface{}
    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.
    FreeformTags map[string]interface{}
    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.
    SystemTags map[string]interface{}
    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<GetTriggerAction>
    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
    definedTags Map<String,Object>
    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.
    freeformTags Map<String,Object>
    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.
    systemTags Map<String,Object>
    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 GetTriggerAction[]
    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
    definedTags {[key: string]: any}
    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.
    freeformTags {[key: string]: any}
    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.
    systemTags {[key: string]: any}
    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.GetTriggerAction]
    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
    defined_tags Mapping[str, Any]
    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.
    freeform_tags Mapping[str, Any]
    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.
    system_tags Mapping[str, Any]
    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
    definedTags Map<Any>
    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.
    freeformTags Map<Any>
    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.
    systemTags Map<Any>
    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

    BuildPipelineId string
    The OCID of the build pipeline to be triggered.
    Filters List<GetTriggerActionFilter>
    The filters for the trigger.
    Type string
    The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
    BuildPipelineId string
    The OCID of the build pipeline to be triggered.
    Filters []GetTriggerActionFilter
    The filters for the trigger.
    Type string
    The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
    buildPipelineId String
    The OCID of the build pipeline to be triggered.
    filters List<GetTriggerActionFilter>
    The filters for the trigger.
    type String
    The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
    buildPipelineId string
    The OCID of the build pipeline to be triggered.
    filters GetTriggerActionFilter[]
    The filters for the trigger.
    type string
    The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
    build_pipeline_id str
    The OCID of the build pipeline to be triggered.
    filters Sequence[devops.GetTriggerActionFilter]
    The filters for the trigger.
    type str
    The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
    buildPipelineId String
    The OCID of the build pipeline to be triggered.
    filters List<Property Map>
    The filters for the trigger.
    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_MERGE.
    Excludes List<GetTriggerActionFilterExclude>
    Includes List<GetTriggerActionFilterInclude>
    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_MERGE.
    Excludes []GetTriggerActionFilterExclude
    Includes []GetTriggerActionFilterInclude
    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_MERGE.
    excludes List<GetTriggerActionFilterExclude>
    includes List<GetTriggerActionFilterInclude>
    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_MERGE.
    excludes GetTriggerActionFilterExclude[]
    includes GetTriggerActionFilterInclude[]
    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_MERGE.
    excludes Sequence[devops.GetTriggerActionFilterExclude]
    includes Sequence[devops.GetTriggerActionFilterInclude]
    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_MERGE.
    excludes List<Property Map>
    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

    GetTriggerActionFilterExcludeFileFilter

    FilePaths List<string>
    FilePaths []string
    filePaths List<String>
    filePaths string[]
    file_paths Sequence[str]
    filePaths List<String>

    GetTriggerActionFilterInclude

    BaseRef string
    The target branch for pull requests; not applicable for push requests.
    FileFilters List<GetTriggerActionFilterIncludeFileFilter>
    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 []GetTriggerActionFilterIncludeFileFilter
    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<GetTriggerActionFilterIncludeFileFilter>
    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 GetTriggerActionFilterIncludeFileFilter[]
    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.GetTriggerActionFilterIncludeFileFilter]
    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>
    headRef String
    Branch for push event; source branch for pull requests.
    repositoryName String
    The repository name for trigger events.

    GetTriggerActionFilterIncludeFileFilter

    FilePaths List<string>
    FilePaths []string
    filePaths List<String>
    filePaths string[]
    file_paths Sequence[str]
    filePaths List<String>

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi