1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getTrigger
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.DevOps.getTrigger

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 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/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)
    // 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, 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.
    FreeformTags 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.
    SystemTags 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 []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]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.
    FreeformTags 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.
    SystemTags 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<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,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.
    freeformTags 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.
    systemTags 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 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]: 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.
    freeformTags {[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.
    systemTags {[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.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, 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.
    freeform_tags 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.
    system_tags 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
    definedTags 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.
    freeformTags 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.
    systemTags 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

    BuildPipelineId string
    The OCID of the build pipeline to be triggered.
    Filters List<GetTriggerActionFilter>
    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
    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>
    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[]
    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]
    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>
    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<GetTriggerActionFilterExclude>
    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<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_CREATED, PULL_REQUEST_UPDATED.
    Excludes []GetTriggerActionFilterExclude
    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 []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_CREATED, PULL_REQUEST_UPDATED.
    excludes List<GetTriggerActionFilterExclude>
    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<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_CREATED, PULL_REQUEST_UPDATED.
    excludes GetTriggerActionFilterExclude[]
    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 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_CREATED, PULL_REQUEST_UPDATED.
    excludes Sequence[devops.GetTriggerActionFilterExclude]
    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.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_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<GetTriggerActionFilterExcludeFileFilter>
    Attributes to support include/exclude files for triggering build runs.
    FileFilters []GetTriggerActionFilterExcludeFileFilter
    Attributes to support include/exclude files for triggering build runs.
    fileFilters List<GetTriggerActionFilterExcludeFileFilter>
    Attributes to support include/exclude files for triggering build runs.
    fileFilters GetTriggerActionFilterExcludeFileFilter[]
    Attributes to support include/exclude files for triggering build runs.
    file_filters Sequence[devops.GetTriggerActionFilterExcludeFileFilter]
    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<GetTriggerActionFilterIncludeFileFilter>
    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 []GetTriggerActionFilterIncludeFileFilter
    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<GetTriggerActionFilterIncludeFileFilter>
    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 GetTriggerActionFilterIncludeFileFilter[]
    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.GetTriggerActionFilterIncludeFileFilter]
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi