Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DevOps/getTrigger:getTrigger
arguments:
# arguments dictionary
The following arguments are supported:
- Trigger
Id string - Unique trigger identifier.
- Trigger
Id string - Unique trigger identifier.
- trigger
Id String - Unique trigger identifier.
- trigger
Id string - Unique trigger identifier.
- trigger_
id str - Unique trigger identifier.
- trigger
Id String - Unique trigger identifier.
getTrigger Result
The following output properties are available:
- Actions
List<Get
Trigger Action> - The list of actions that are to be performed for this trigger.
- Compartment
Id string - The OCID of the compartment that contains the trigger.
- Connection
Id 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.
- Display
Name 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.
- Lifecycle
Details 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.
- Project
Id string - The OCID of the DevOps project to which the trigger belongs to.
- Repository
Id 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"}
- Time
Created string - The time the trigger was created. Format defined by RFC3339.
- Time
Updated string - The time the trigger was updated. Format defined by RFC3339.
- Trigger
Id string - Trigger
Source string - Source of the trigger. Allowed values are, GITHUB and GITLAB.
- Trigger
Url string - The endpoint that listens to trigger events.
- Actions
[]Get
Trigger Action - The list of actions that are to be performed for this trigger.
- Compartment
Id string - The OCID of the compartment that contains the trigger.
- Connection
Id 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.
- Display
Name 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.
- Lifecycle
Details 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.
- Project
Id string - The OCID of the DevOps project to which the trigger belongs to.
- Repository
Id 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"}
- Time
Created string - The time the trigger was created. Format defined by RFC3339.
- Time
Updated string - The time the trigger was updated. Format defined by RFC3339.
- Trigger
Id string - Trigger
Source string - Source of the trigger. Allowed values are, GITHUB and GITLAB.
- Trigger
Url string - The endpoint that listens to trigger events.
- actions
List<Get
Trigger Action> - The list of actions that are to be performed for this trigger.
- compartment
Id String - The OCID of the compartment that contains the trigger.
- connection
Id 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.
- display
Name 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.
- lifecycle
Details 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.
- project
Id String - The OCID of the DevOps project to which the trigger belongs to.
- repository
Id 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"}
- time
Created String - The time the trigger was created. Format defined by RFC3339.
- time
Updated String - The time the trigger was updated. Format defined by RFC3339.
- trigger
Id String - trigger
Source String - Source of the trigger. Allowed values are, GITHUB and GITLAB.
- trigger
Url String - The endpoint that listens to trigger events.
- actions
Get
Trigger Action[] - The list of actions that are to be performed for this trigger.
- compartment
Id string - The OCID of the compartment that contains the trigger.
- connection
Id 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.
- display
Name 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.
- lifecycle
Details 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.
- project
Id string - The OCID of the DevOps project to which the trigger belongs to.
- repository
Id 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"}
- time
Created string - The time the trigger was created. Format defined by RFC3339.
- time
Updated string - The time the trigger was updated. Format defined by RFC3339.
- trigger
Id string - trigger
Source string - Source of the trigger. Allowed values are, GITHUB and GITLAB.
- trigger
Url 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.
- compartment
Id String - The OCID of the compartment that contains the trigger.
- connection
Id 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.
- display
Name 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.
- lifecycle
Details 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.
- project
Id String - The OCID of the DevOps project to which the trigger belongs to.
- repository
Id 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"}
- time
Created String - The time the trigger was created. Format defined by RFC3339.
- time
Updated String - The time the trigger was updated. Format defined by RFC3339.
- trigger
Id String - trigger
Source String - Source of the trigger. Allowed values are, GITHUB and GITLAB.
- trigger
Url String - The endpoint that listens to trigger events.
Supporting Types
GetTriggerAction
- Build
Pipeline stringId - The OCID of the build pipeline to be triggered.
- Filters
List<Get
Trigger Action Filter> - Type string
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- Build
Pipeline stringId - The OCID of the build pipeline to be triggered.
- Filters
[]Get
Trigger Action Filter - Type string
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- build
Pipeline StringId - The OCID of the build pipeline to be triggered.
- filters
List<Get
Trigger Action Filter> - type String
- The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- build
Pipeline stringId - The OCID of the build pipeline to be triggered.
- filters
Get
Trigger 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.
- build
Pipeline 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<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
List<Get
Trigger Action Filter Include> - Attributes to filter GitLab self-hosted server events.
- Trigger
Source 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
[]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
[]Get
Trigger Action Filter Include - Attributes to filter GitLab self-hosted server events.
- Trigger
Source 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<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
List<Get
Trigger Action Filter Include> - Attributes to filter GitLab self-hosted server events.
- trigger
Source 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
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
Get
Trigger Action Filter Include[] - Attributes to filter GitLab self-hosted server events.
- trigger
Source 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.
- trigger
Source String - Source of the trigger. Allowed values are, GITHUB and GITLAB.
GetTriggerActionFilterExclude
- File
Filters List<GetTrigger Action Filter Exclude File Filter> - Attributes to support include/exclude files for triggering build runs.
- File
Filters []GetTrigger Action Filter Exclude File Filter - Attributes to support include/exclude files for triggering build runs.
- file
Filters List<GetTrigger Action Filter Exclude File Filter> - Attributes to support include/exclude files for triggering build runs.
- file
Filters 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.
- file
Filters List<Property Map> - Attributes to support include/exclude files for triggering build runs.
GetTriggerActionFilterExcludeFileFilter
- File
Paths List<string> - The file paths/glob pattern for files.
- File
Paths []string - The file paths/glob pattern for files.
- file
Paths List<String> - The file paths/glob pattern for files.
- file
Paths string[] - The file paths/glob pattern for files.
- file_
paths Sequence[str] - The file paths/glob pattern for files.
- file
Paths List<String> - The file paths/glob pattern for files.
GetTriggerActionFilterInclude
- Base
Ref string - The target branch for pull requests; not applicable for push requests.
- File
Filters List<GetTrigger Action Filter Include File Filter> - Attributes to support include/exclude files for triggering build runs.
- Head
Ref string - Branch for push event; source branch for pull requests.
- Repository
Name string - The repository name for trigger events.
- Base
Ref string - The target branch for pull requests; not applicable for push requests.
- File
Filters []GetTrigger Action Filter Include File Filter - Attributes to support include/exclude files for triggering build runs.
- Head
Ref string - Branch for push event; source branch for pull requests.
- Repository
Name string - The repository name for trigger events.
- base
Ref String - The target branch for pull requests; not applicable for push requests.
- file
Filters List<GetTrigger Action Filter Include File Filter> - Attributes to support include/exclude files for triggering build runs.
- head
Ref String - Branch for push event; source branch for pull requests.
- repository
Name String - The repository name for trigger events.
- base
Ref string - The target branch for pull requests; not applicable for push requests.
- file
Filters GetTrigger Action Filter Include File Filter[] - Attributes to support include/exclude files for triggering build runs.
- head
Ref string - Branch for push event; source branch for pull requests.
- repository
Name 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.
- base
Ref String - The target branch for pull requests; not applicable for push requests.
- file
Filters List<Property Map> - Attributes to support include/exclude files for triggering build runs.
- head
Ref String - Branch for push event; source branch for pull requests.
- repository
Name String - The repository name for trigger events.
GetTriggerActionFilterIncludeFileFilter
- File
Paths List<string> - The file paths/glob pattern for files.
- File
Paths []string - The file paths/glob pattern for files.
- file
Paths List<String> - The file paths/glob pattern for files.
- file
Paths string[] - The file paths/glob pattern for files.
- file_
paths Sequence[str] - The file paths/glob pattern for files.
- file
Paths 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.