oci.DevOps.Trigger
Explore with Pulumi AI
This resource provides the Trigger resource in Oracle Cloud Infrastructure Devops service.
Creates a new trigger.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTrigger = new oci.devops.Trigger("test_trigger", {
actions: [{
buildPipelineId: testBuildPipeline.id,
type: triggerActionsType,
filter: {
triggerSource: triggerActionsFilterTriggerSource,
events: triggerActionsFilterEvents,
include: {
baseRef: triggerActionsFilterIncludeBaseRef,
headRef: triggerActionsFilterIncludeHeadRef,
repositoryName: testRepository.name,
},
},
}],
projectId: testProject.id,
triggerSource: triggerTriggerSource,
definedTags: {
"foo-namespace.bar-key": "value",
},
description: triggerDescription,
displayName: triggerDisplayName,
freeformTags: {
"bar-key": "value",
},
repositoryId: testRepositoryOciArtifactsRepository.id,
});
import pulumi
import pulumi_oci as oci
test_trigger = oci.dev_ops.Trigger("test_trigger",
actions=[{
"build_pipeline_id": test_build_pipeline["id"],
"type": trigger_actions_type,
"filter": {
"trigger_source": trigger_actions_filter_trigger_source,
"events": trigger_actions_filter_events,
"include": {
"base_ref": trigger_actions_filter_include_base_ref,
"head_ref": trigger_actions_filter_include_head_ref,
"repository_name": test_repository["name"],
},
},
}],
project_id=test_project["id"],
trigger_source=trigger_trigger_source,
defined_tags={
"foo-namespace.bar-key": "value",
},
description=trigger_description,
display_name=trigger_display_name,
freeform_tags={
"bar-key": "value",
},
repository_id=test_repository_oci_artifacts_repository["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.NewTrigger(ctx, "test_trigger", &DevOps.TriggerArgs{
Actions: devops.TriggerActionArray{
&devops.TriggerActionArgs{
BuildPipelineId: pulumi.Any(testBuildPipeline.Id),
Type: pulumi.Any(triggerActionsType),
Filter: &devops.TriggerActionFilterArgs{
TriggerSource: pulumi.Any(triggerActionsFilterTriggerSource),
Events: pulumi.Any(triggerActionsFilterEvents),
Include: &devops.TriggerActionFilterIncludeArgs{
BaseRef: pulumi.Any(triggerActionsFilterIncludeBaseRef),
HeadRef: pulumi.Any(triggerActionsFilterIncludeHeadRef),
RepositoryName: pulumi.Any(testRepository.Name),
},
},
},
},
ProjectId: pulumi.Any(testProject.Id),
TriggerSource: pulumi.Any(triggerTriggerSource),
DefinedTags: pulumi.StringMap{
"foo-namespace.bar-key": pulumi.String("value"),
},
Description: pulumi.Any(triggerDescription),
DisplayName: pulumi.Any(triggerDisplayName),
FreeformTags: pulumi.StringMap{
"bar-key": pulumi.String("value"),
},
RepositoryId: pulumi.Any(testRepositoryOciArtifactsRepository.Id),
})
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 = new Oci.DevOps.Trigger("test_trigger", new()
{
Actions = new[]
{
new Oci.DevOps.Inputs.TriggerActionArgs
{
BuildPipelineId = testBuildPipeline.Id,
Type = triggerActionsType,
Filter = new Oci.DevOps.Inputs.TriggerActionFilterArgs
{
TriggerSource = triggerActionsFilterTriggerSource,
Events = triggerActionsFilterEvents,
Include = new Oci.DevOps.Inputs.TriggerActionFilterIncludeArgs
{
BaseRef = triggerActionsFilterIncludeBaseRef,
HeadRef = triggerActionsFilterIncludeHeadRef,
RepositoryName = testRepository.Name,
},
},
},
},
ProjectId = testProject.Id,
TriggerSource = triggerTriggerSource,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
Description = triggerDescription,
DisplayName = triggerDisplayName,
FreeformTags =
{
{ "bar-key", "value" },
},
RepositoryId = testRepositoryOciArtifactsRepository.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DevOps.Trigger;
import com.pulumi.oci.DevOps.TriggerArgs;
import com.pulumi.oci.DevOps.inputs.TriggerActionArgs;
import com.pulumi.oci.DevOps.inputs.TriggerActionFilterArgs;
import com.pulumi.oci.DevOps.inputs.TriggerActionFilterIncludeArgs;
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) {
var testTrigger = new Trigger("testTrigger", TriggerArgs.builder()
.actions(TriggerActionArgs.builder()
.buildPipelineId(testBuildPipeline.id())
.type(triggerActionsType)
.filter(TriggerActionFilterArgs.builder()
.triggerSource(triggerActionsFilterTriggerSource)
.events(triggerActionsFilterEvents)
.include(TriggerActionFilterIncludeArgs.builder()
.baseRef(triggerActionsFilterIncludeBaseRef)
.headRef(triggerActionsFilterIncludeHeadRef)
.repositoryName(testRepository.name())
.build())
.build())
.build())
.projectId(testProject.id())
.triggerSource(triggerTriggerSource)
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.description(triggerDescription)
.displayName(triggerDisplayName)
.freeformTags(Map.of("bar-key", "value"))
.repositoryId(testRepositoryOciArtifactsRepository.id())
.build());
}
}
resources:
testTrigger:
type: oci:DevOps:Trigger
name: test_trigger
properties:
actions:
- buildPipelineId: ${testBuildPipeline.id}
type: ${triggerActionsType}
filter:
triggerSource: ${triggerActionsFilterTriggerSource}
events: ${triggerActionsFilterEvents}
include:
baseRef: ${triggerActionsFilterIncludeBaseRef}
headRef: ${triggerActionsFilterIncludeHeadRef}
repositoryName: ${testRepository.name}
projectId: ${testProject.id}
triggerSource: ${triggerTriggerSource}
definedTags:
foo-namespace.bar-key: value
description: ${triggerDescription}
displayName: ${triggerDisplayName}
freeformTags:
bar-key: value
repositoryId: ${testRepositoryOciArtifactsRepository.id}
Create Trigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Trigger(name: string, args: TriggerArgs, opts?: CustomResourceOptions);
@overload
def Trigger(resource_name: str,
args: TriggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Trigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[_devops.TriggerActionArgs]] = None,
project_id: Optional[str] = None,
trigger_source: Optional[str] = None,
connection_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
repository_id: Optional[str] = None)
func NewTrigger(ctx *Context, name string, args TriggerArgs, opts ...ResourceOption) (*Trigger, error)
public Trigger(string name, TriggerArgs args, CustomResourceOptions? opts = null)
public Trigger(String name, TriggerArgs args)
public Trigger(String name, TriggerArgs args, CustomResourceOptions options)
type: oci:DevOps:Trigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var triggerResource = new Oci.DevOps.Trigger("triggerResource", new()
{
Actions = new[]
{
new Oci.DevOps.Inputs.TriggerActionArgs
{
BuildPipelineId = "string",
Type = "string",
Filter = new Oci.DevOps.Inputs.TriggerActionFilterArgs
{
TriggerSource = "string",
Events = new[]
{
"string",
},
Exclude = new Oci.DevOps.Inputs.TriggerActionFilterExcludeArgs
{
FileFilter = new Oci.DevOps.Inputs.TriggerActionFilterExcludeFileFilterArgs
{
FilePaths = new[]
{
"string",
},
},
},
Include = new Oci.DevOps.Inputs.TriggerActionFilterIncludeArgs
{
BaseRef = "string",
FileFilter = new Oci.DevOps.Inputs.TriggerActionFilterIncludeFileFilterArgs
{
FilePaths = new[]
{
"string",
},
},
HeadRef = "string",
RepositoryName = "string",
},
},
},
},
ProjectId = "string",
TriggerSource = "string",
ConnectionId = "string",
DefinedTags =
{
{ "string", "string" },
},
Description = "string",
DisplayName = "string",
FreeformTags =
{
{ "string", "string" },
},
RepositoryId = "string",
});
example, err := DevOps.NewTrigger(ctx, "triggerResource", &DevOps.TriggerArgs{
Actions: devops.TriggerActionArray{
&devops.TriggerActionArgs{
BuildPipelineId: pulumi.String("string"),
Type: pulumi.String("string"),
Filter: &devops.TriggerActionFilterArgs{
TriggerSource: pulumi.String("string"),
Events: pulumi.StringArray{
pulumi.String("string"),
},
Exclude: &devops.TriggerActionFilterExcludeArgs{
FileFilter: &devops.TriggerActionFilterExcludeFileFilterArgs{
FilePaths: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Include: &devops.TriggerActionFilterIncludeArgs{
BaseRef: pulumi.String("string"),
FileFilter: &devops.TriggerActionFilterIncludeFileFilterArgs{
FilePaths: pulumi.StringArray{
pulumi.String("string"),
},
},
HeadRef: pulumi.String("string"),
RepositoryName: pulumi.String("string"),
},
},
},
},
ProjectId: pulumi.String("string"),
TriggerSource: pulumi.String("string"),
ConnectionId: pulumi.String("string"),
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
RepositoryId: pulumi.String("string"),
})
var triggerResource = new Trigger("triggerResource", TriggerArgs.builder()
.actions(TriggerActionArgs.builder()
.buildPipelineId("string")
.type("string")
.filter(TriggerActionFilterArgs.builder()
.triggerSource("string")
.events("string")
.exclude(TriggerActionFilterExcludeArgs.builder()
.fileFilter(TriggerActionFilterExcludeFileFilterArgs.builder()
.filePaths("string")
.build())
.build())
.include(TriggerActionFilterIncludeArgs.builder()
.baseRef("string")
.fileFilter(TriggerActionFilterIncludeFileFilterArgs.builder()
.filePaths("string")
.build())
.headRef("string")
.repositoryName("string")
.build())
.build())
.build())
.projectId("string")
.triggerSource("string")
.connectionId("string")
.definedTags(Map.of("string", "string"))
.description("string")
.displayName("string")
.freeformTags(Map.of("string", "string"))
.repositoryId("string")
.build());
trigger_resource = oci.dev_ops.Trigger("triggerResource",
actions=[{
"build_pipeline_id": "string",
"type": "string",
"filter": {
"trigger_source": "string",
"events": ["string"],
"exclude": {
"file_filter": {
"file_paths": ["string"],
},
},
"include": {
"base_ref": "string",
"file_filter": {
"file_paths": ["string"],
},
"head_ref": "string",
"repository_name": "string",
},
},
}],
project_id="string",
trigger_source="string",
connection_id="string",
defined_tags={
"string": "string",
},
description="string",
display_name="string",
freeform_tags={
"string": "string",
},
repository_id="string")
const triggerResource = new oci.devops.Trigger("triggerResource", {
actions: [{
buildPipelineId: "string",
type: "string",
filter: {
triggerSource: "string",
events: ["string"],
exclude: {
fileFilter: {
filePaths: ["string"],
},
},
include: {
baseRef: "string",
fileFilter: {
filePaths: ["string"],
},
headRef: "string",
repositoryName: "string",
},
},
}],
projectId: "string",
triggerSource: "string",
connectionId: "string",
definedTags: {
string: "string",
},
description: "string",
displayName: "string",
freeformTags: {
string: "string",
},
repositoryId: "string",
});
type: oci:DevOps:Trigger
properties:
actions:
- buildPipelineId: string
filter:
events:
- string
exclude:
fileFilter:
filePaths:
- string
include:
baseRef: string
fileFilter:
filePaths:
- string
headRef: string
repositoryName: string
triggerSource: string
type: string
connectionId: string
definedTags:
string: string
description: string
displayName: string
freeformTags:
string: string
projectId: string
repositoryId: string
triggerSource: string
Trigger Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Trigger resource accepts the following input properties:
- Actions
List<Trigger
Action> - (Updatable) The list of actions that are to be performed for this trigger.
- Project
Id string - The OCID of the DevOps project to which the trigger belongs to.
- Trigger
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Connection
Id string - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Dictionary<string, string>
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- Display
Name string - (Updatable) Trigger display name. Avoid entering confidential information.
- Dictionary<string, string>
- (Updatable) 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"}
- Repository
Id string - (Updatable) The OCID of the DevOps code repository.
- Actions
[]Trigger
Action Args - (Updatable) The list of actions that are to be performed for this trigger.
- Project
Id string - The OCID of the DevOps project to which the trigger belongs to.
- Trigger
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Connection
Id string - (Updatable) The OCID of the connection resource used to get details for triggered events.
- map[string]string
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- Display
Name string - (Updatable) Trigger display name. Avoid entering confidential information.
- map[string]string
- (Updatable) 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"}
- Repository
Id string - (Updatable) The OCID of the DevOps code repository.
- actions
List<Trigger
Action> - (Updatable) The list of actions that are to be performed for this trigger.
- project
Id String - The OCID of the DevOps project to which the trigger belongs to.
- trigger
Source String (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- connection
Id String - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Map<String,String>
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display
Name String - (Updatable) Trigger display name. Avoid entering confidential information.
- Map<String,String>
- (Updatable) 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"}
- repository
Id String - (Updatable) The OCID of the DevOps code repository.
- actions
Trigger
Action[] - (Updatable) The list of actions that are to be performed for this trigger.
- project
Id string - The OCID of the DevOps project to which the trigger belongs to.
- trigger
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- connection
Id string - (Updatable) The OCID of the connection resource used to get details for triggered events.
- {[key: string]: string}
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display
Name string - (Updatable) Trigger display name. Avoid entering confidential information.
- {[key: string]: string}
- (Updatable) 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"}
- repository
Id string - (Updatable) The OCID of the DevOps code repository.
- actions
Sequence[devops.
Trigger Action Args] - (Updatable) The list of actions that are to be performed for this trigger.
- project_
id str - The OCID of the DevOps project to which the trigger belongs to.
- trigger_
source str (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- connection_
id str - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Mapping[str, str]
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display_
name str - (Updatable) Trigger display name. Avoid entering confidential information.
- Mapping[str, str]
- (Updatable) 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"}
- repository_
id str - (Updatable) The OCID of the DevOps code repository.
- actions List<Property Map>
- (Updatable) The list of actions that are to be performed for this trigger.
- project
Id String - The OCID of the DevOps project to which the trigger belongs to.
- trigger
Source String (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- connection
Id String - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Map<String>
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display
Name String - (Updatable) Trigger display name. Avoid entering confidential information.
- Map<String>
- (Updatable) 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"}
- repository
Id String - (Updatable) The OCID of the DevOps code repository.
Outputs
All input properties are implicitly available as output properties. Additionally, the Trigger resource produces the following output properties:
- Compartment
Id string - The OCID of the compartment that contains the trigger.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- 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
Url string - The endpoint that listens to trigger events.
- Compartment
Id string - The OCID of the compartment that contains the trigger.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- 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
Url string - The endpoint that listens to trigger events.
- compartment
Id String - The OCID of the compartment that contains the trigger.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- 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
Url String - The endpoint that listens to trigger events.
- compartment
Id string - The OCID of the compartment that contains the trigger.
- id string
- The provider-assigned unique ID for this managed resource.
- 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.
- 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
Url string - The endpoint that listens to trigger events.
- compartment_
id str - The OCID of the compartment that contains the trigger.
- id str
- The provider-assigned unique ID for this managed resource.
- 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.
- 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_
url str - The endpoint that listens to trigger events.
- compartment
Id String - The OCID of the compartment that contains the trigger.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- 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
Url String - The endpoint that listens to trigger events.
Look up Existing Trigger Resource
Get an existing Trigger resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TriggerState, opts?: CustomResourceOptions): Trigger
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[_devops.TriggerActionArgs]] = None,
compartment_id: Optional[str] = None,
connection_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
lifecycle_details: Optional[str] = None,
project_id: Optional[str] = None,
repository_id: Optional[str] = None,
state: Optional[str] = None,
system_tags: Optional[Mapping[str, str]] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None,
trigger_source: Optional[str] = None,
trigger_url: Optional[str] = None) -> Trigger
func GetTrigger(ctx *Context, name string, id IDInput, state *TriggerState, opts ...ResourceOption) (*Trigger, error)
public static Trigger Get(string name, Input<string> id, TriggerState? state, CustomResourceOptions? opts = null)
public static Trigger get(String name, Output<String> id, TriggerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Actions
List<Trigger
Action> - (Updatable) 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 - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Dictionary<string, string>
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- Display
Name string - (Updatable) Trigger display name. Avoid entering confidential information.
- Dictionary<string, string>
- (Updatable) 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"}
- 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 - (Updatable) 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
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Trigger
Url string - The endpoint that listens to trigger events.
- Actions
[]Trigger
Action Args - (Updatable) 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 - (Updatable) The OCID of the connection resource used to get details for triggered events.
- map[string]string
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- Display
Name string - (Updatable) Trigger display name. Avoid entering confidential information.
- map[string]string
- (Updatable) 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"}
- 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 - (Updatable) 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
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Trigger
Url string - The endpoint that listens to trigger events.
- actions
List<Trigger
Action> - (Updatable) 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 - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Map<String,String>
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display
Name String - (Updatable) Trigger display name. Avoid entering confidential information.
- Map<String,String>
- (Updatable) 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"}
- 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 - (Updatable) 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
Source String (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- trigger
Url String - The endpoint that listens to trigger events.
- actions
Trigger
Action[] - (Updatable) 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 - (Updatable) The OCID of the connection resource used to get details for triggered events.
- {[key: string]: string}
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display
Name string - (Updatable) Trigger display name. Avoid entering confidential information.
- {[key: string]: string}
- (Updatable) 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"}
- 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 - (Updatable) 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
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- trigger
Url string - The endpoint that listens to trigger events.
- actions
Sequence[devops.
Trigger Action Args] - (Updatable) 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 - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Mapping[str, str]
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display_
name str - (Updatable) Trigger display name. Avoid entering confidential information.
- Mapping[str, str]
- (Updatable) 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"}
- 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 - (Updatable) 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_
source str (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- trigger_
url str - The endpoint that listens to trigger events.
- actions List<Property Map>
- (Updatable) 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 - (Updatable) The OCID of the connection resource used to get details for triggered events.
- Map<String>
- (Updatable) 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
- (Updatable) Optional description about the trigger.
- display
Name String - (Updatable) Trigger display name. Avoid entering confidential information.
- Map<String>
- (Updatable) 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"}
- 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 - (Updatable) 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
Source String (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- trigger
Url String - The endpoint that listens to trigger events.
Supporting Types
TriggerAction, TriggerActionArgs
- Build
Pipeline stringId - (Updatable) The OCID of the build pipeline to be triggered.
- Type string
- (Updatable) The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- Filter
Trigger
Action Filter
- Build
Pipeline stringId - (Updatable) The OCID of the build pipeline to be triggered.
- Type string
- (Updatable) The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- Filter
Trigger
Action Filter
- build
Pipeline StringId - (Updatable) The OCID of the build pipeline to be triggered.
- type String
- (Updatable) The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- filter
Trigger
Action Filter
- build
Pipeline stringId - (Updatable) The OCID of the build pipeline to be triggered.
- type string
- (Updatable) The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- filter
Trigger
Action Filter
- build_
pipeline_ strid - (Updatable) The OCID of the build pipeline to be triggered.
- type str
- (Updatable) The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- filter
devops.
Trigger Action Filter
- build
Pipeline StringId - (Updatable) The OCID of the build pipeline to be triggered.
- type String
- (Updatable) The type of action that will be taken. Allowed value is TRIGGER_BUILD_PIPELINE.
- filter Property Map
TriggerActionFilter, TriggerActionFilterArgs
- Trigger
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Events List<string>
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- Exclude
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.
- Include
Trigger
Action Filter Include - Attributes to filter GitLab self-hosted server events.
- Trigger
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Events []string
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- Exclude
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.
- Include
Trigger
Action Filter Include - Attributes to filter GitLab self-hosted server events.
- trigger
Source String (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- events List<String>
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- exclude
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.
- include
Trigger
Action Filter Include - Attributes to filter GitLab self-hosted server events.
- trigger
Source string (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- events string[]
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- exclude
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.
- include
Trigger
Action Filter Include - Attributes to filter GitLab self-hosted server events.
- trigger_
source str (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- events Sequence[str]
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- exclude
devops.
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.
- include
devops.
Trigger Action Filter Include - Attributes to filter GitLab self-hosted server events.
- trigger
Source String (Updatable) Source of the trigger. Allowed values are, GITHUB, GITLAB, BITBUCKET_CLOUD, VBS and DEVOPS_CODE_REPOSITORY.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- events List<String>
- The events, for example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED.
- exclude 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.
- include Property Map
- Attributes to filter GitLab self-hosted server events.
TriggerActionFilterExclude, TriggerActionFilterExcludeArgs
- File
Filter TriggerAction Filter Exclude File Filter - Attributes to support include/exclude files for triggering build runs.
- File
Filter TriggerAction Filter Exclude File Filter - Attributes to support include/exclude files for triggering build runs.
- file
Filter TriggerAction Filter Exclude File Filter - Attributes to support include/exclude files for triggering build runs.
- file
Filter TriggerAction Filter Exclude File Filter - Attributes to support include/exclude files for triggering build runs.
- file_
filter devops.Trigger Action Filter Exclude File Filter - Attributes to support include/exclude files for triggering build runs.
- file
Filter Property Map - Attributes to support include/exclude files for triggering build runs.
TriggerActionFilterExcludeFileFilter, TriggerActionFilterExcludeFileFilterArgs
- 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.
TriggerActionFilterInclude, TriggerActionFilterIncludeArgs
- Base
Ref string - The target branch for pull requests; not applicable for push requests.
- File
Filter TriggerAction 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
Filter TriggerAction 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
Filter TriggerAction 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
Filter TriggerAction 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_
filter devops.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
Filter 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.
TriggerActionFilterIncludeFileFilter, TriggerActionFilterIncludeFileFilterArgs
- 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.
Import
Triggers can be imported using the id
, e.g.
$ pulumi import oci:DevOps/trigger:Trigger test_trigger "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.