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[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<TriggerAction> 
- (Updatable) The list of actions that are to be performed for this trigger.
- ProjectId string
- The OCID of the DevOps project to which the trigger belongs to.
- TriggerSource 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 
- ConnectionId 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.
- DisplayName 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"}
- RepositoryId string
- (Updatable) The OCID of the DevOps code repository.
- Actions
[]TriggerAction Args 
- (Updatable) The list of actions that are to be performed for this trigger.
- ProjectId string
- The OCID of the DevOps project to which the trigger belongs to.
- TriggerSource 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 
- ConnectionId 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.
- DisplayName 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"}
- RepositoryId string
- (Updatable) The OCID of the DevOps code repository.
- actions
List<TriggerAction> 
- (Updatable) The list of actions that are to be performed for this trigger.
- projectId String
- The OCID of the DevOps project to which the trigger belongs to.
- triggerSource 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 
- connectionId 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.
- displayName 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"}
- repositoryId String
- (Updatable) The OCID of the DevOps code repository.
- actions
TriggerAction[] 
- (Updatable) The list of actions that are to be performed for this trigger.
- projectId string
- The OCID of the DevOps project to which the trigger belongs to.
- triggerSource 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 
- connectionId 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.
- displayName 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"}
- repositoryId string
- (Updatable) The OCID of the DevOps code repository.
- actions
Sequence[TriggerAction 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.
- projectId String
- The OCID of the DevOps project to which the trigger belongs to.
- triggerSource 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 
- connectionId 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.
- displayName 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"}
- repositoryId 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:
- CompartmentId string
- The OCID of the compartment that contains the trigger.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- State string
- The current state of the trigger.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the trigger was created. Format defined by RFC3339.
- TimeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- TriggerUrl string
- The endpoint that listens to trigger events.
- CompartmentId string
- The OCID of the compartment that contains the trigger.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- State string
- The current state of the trigger.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the trigger was created. Format defined by RFC3339.
- TimeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- TriggerUrl string
- The endpoint that listens to trigger events.
- compartmentId String
- The OCID of the compartment that contains the trigger.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- state String
- The current state of the trigger.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated String
- The time the trigger was updated. Format defined by RFC3339.
- triggerUrl String
- The endpoint that listens to trigger events.
- compartmentId string
- The OCID of the compartment that contains the trigger.
- id string
- The provider-assigned unique ID for this managed resource.
- 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.
- state string
- The current state of the trigger.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated string
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- triggerUrl 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.
- compartmentId String
- The OCID of the compartment that contains the trigger.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- state String
- The current state of the trigger.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated String
- The time the trigger was updated. Format defined by RFC3339.
- triggerUrl 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[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) -> Triggerfunc 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)resources:  _:    type: oci:DevOps:Trigger    get:      id: ${id}- 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<TriggerAction> 
- (Updatable) 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
- (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.
- DisplayName 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"}
- 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
- (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"}
- TimeCreated string
- The time the trigger was created. Format defined by RFC3339.
- TimeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- TriggerSource 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 
- TriggerUrl string
- The endpoint that listens to trigger events.
- Actions
[]TriggerAction Args 
- (Updatable) 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
- (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.
- DisplayName 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"}
- 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
- (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"}
- TimeCreated string
- The time the trigger was created. Format defined by RFC3339.
- TimeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- TriggerSource 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 
- TriggerUrl string
- The endpoint that listens to trigger events.
- actions
List<TriggerAction> 
- (Updatable) 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
- (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.
- displayName 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"}
- 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
- (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"}
- timeCreated String
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated String
- The time the trigger was updated. Format defined by RFC3339.
- triggerSource 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 
- triggerUrl String
- The endpoint that listens to trigger events.
- actions
TriggerAction[] 
- (Updatable) 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
- (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.
- displayName 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"}
- 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
- (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"}
- timeCreated string
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated string
- The time the trigger was updated. Format defined by RFC3339.
- triggerSource 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 
- triggerUrl string
- The endpoint that listens to trigger events.
- actions
Sequence[TriggerAction 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.
- compartmentId String
- The OCID of the compartment that contains the trigger.
- connectionId 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.
- displayName 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"}
- 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
- (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"}
- timeCreated String
- The time the trigger was created. Format defined by RFC3339.
- timeUpdated String
- The time the trigger was updated. Format defined by RFC3339.
- triggerSource 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 
- triggerUrl String
- The endpoint that listens to trigger events.
Supporting Types
TriggerAction, TriggerActionArgs    
- BuildPipeline 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
TriggerAction Filter 
- BuildPipeline 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
TriggerAction Filter 
- buildPipeline 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
TriggerAction Filter 
- buildPipeline 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
TriggerAction 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
TriggerAction Filter 
- buildPipeline 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      
- TriggerSource 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
TriggerAction 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
TriggerAction Filter Include 
- Attributes to filter GitLab self-hosted server events.
- TriggerSource 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
TriggerAction 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
TriggerAction Filter Include 
- Attributes to filter GitLab self-hosted server events.
- triggerSource 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
TriggerAction 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
TriggerAction Filter Include 
- Attributes to filter GitLab self-hosted server events.
- triggerSource 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
TriggerAction 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
TriggerAction 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
TriggerAction 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
TriggerAction Filter Include 
- Attributes to filter GitLab self-hosted server events.
- triggerSource 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        
- FileFilter TriggerAction Filter Exclude File Filter 
- Attributes to support include/exclude files for triggering build runs.
- FileFilter TriggerAction Filter Exclude File Filter 
- Attributes to support include/exclude files for triggering build runs.
- fileFilter TriggerAction Filter Exclude File Filter 
- Attributes to support include/exclude files for triggering build runs.
- fileFilter 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.
- fileFilter Property Map
- Attributes to support include/exclude files for triggering build runs.
TriggerActionFilterExcludeFileFilter, TriggerActionFilterExcludeFileFilterArgs            
- 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.
TriggerActionFilterInclude, TriggerActionFilterIncludeArgs        
- BaseRef string
- The target branch for pull requests; not applicable for push requests.
- FileFilter TriggerAction Filter Include File Filter 
- Attributes to support include/exclude files for triggering build runs.
- HeadRef string
- Branch for push event; source branch for pull requests.
- RepositoryName string
- The repository name for trigger events.
- BaseRef string
- The target branch for pull requests; not applicable for push requests.
- FileFilter TriggerAction Filter Include File Filter 
- Attributes to support include/exclude files for triggering build runs.
- HeadRef string
- Branch for push event; source branch for pull requests.
- RepositoryName string
- The repository name for trigger events.
- baseRef String
- The target branch for pull requests; not applicable for push requests.
- fileFilter TriggerAction Filter Include File Filter 
- Attributes to support include/exclude files for triggering build runs.
- headRef String
- Branch for push event; source branch for pull requests.
- repositoryName String
- The repository name for trigger events.
- baseRef string
- The target branch for pull requests; not applicable for push requests.
- fileFilter TriggerAction Filter Include File Filter 
- Attributes to support include/exclude files for triggering build runs.
- headRef string
- Branch for push event; source branch for pull requests.
- repositoryName string
- The repository name for trigger events.
- base_ref str
- The target branch for pull requests; not applicable for push requests.
- file_filter TriggerAction Filter Include File Filter 
- Attributes to support include/exclude files for triggering build runs.
- head_ref str
- Branch for push event; source branch for pull requests.
- repository_name str
- The repository name for trigger events.
- baseRef String
- The target branch for pull requests; not applicable for push requests.
- fileFilter 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.
TriggerActionFilterIncludeFileFilter, TriggerActionFilterIncludeFileFilterArgs            
- 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.
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 ociTerraform Provider.