1. Packages
  2. Gitlab Provider
  3. API Docs
  4. IntegrationPipelinesEmail
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

gitlab.IntegrationPipelinesEmail

Explore with Pulumi AI

gitlab logo
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

    The gitlab.IntegrationPipelinesEmail resource allows to manage the lifecycle of a project integration with Pipeline Emails Service.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const awesomeProject = new gitlab.Project("awesome_project", {
        name: "awesome_project",
        description: "My awesome project.",
        visibilityLevel: "public",
    });
    const email = new gitlab.IntegrationPipelinesEmail("email", {
        project: awesomeProject.id,
        recipients: ["gitlab@user.create"],
        notifyOnlyBrokenPipelines: true,
        branchesToBeNotified: "all",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    awesome_project = gitlab.Project("awesome_project",
        name="awesome_project",
        description="My awesome project.",
        visibility_level="public")
    email = gitlab.IntegrationPipelinesEmail("email",
        project=awesome_project.id,
        recipients=["gitlab@user.create"],
        notify_only_broken_pipelines=True,
        branches_to_be_notified="all")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		awesomeProject, err := gitlab.NewProject(ctx, "awesome_project", &gitlab.ProjectArgs{
    			Name:            pulumi.String("awesome_project"),
    			Description:     pulumi.String("My awesome project."),
    			VisibilityLevel: pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.NewIntegrationPipelinesEmail(ctx, "email", &gitlab.IntegrationPipelinesEmailArgs{
    			Project: awesomeProject.ID(),
    			Recipients: pulumi.StringArray{
    				pulumi.String("gitlab@user.create"),
    			},
    			NotifyOnlyBrokenPipelines: pulumi.Bool(true),
    			BranchesToBeNotified:      pulumi.String("all"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var awesomeProject = new GitLab.Project("awesome_project", new()
        {
            Name = "awesome_project",
            Description = "My awesome project.",
            VisibilityLevel = "public",
        });
    
        var email = new GitLab.IntegrationPipelinesEmail("email", new()
        {
            Project = awesomeProject.Id,
            Recipients = new[]
            {
                "gitlab@user.create",
            },
            NotifyOnlyBrokenPipelines = true,
            BranchesToBeNotified = "all",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.Project;
    import com.pulumi.gitlab.ProjectArgs;
    import com.pulumi.gitlab.IntegrationPipelinesEmail;
    import com.pulumi.gitlab.IntegrationPipelinesEmailArgs;
    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 awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
                .name("awesome_project")
                .description("My awesome project.")
                .visibilityLevel("public")
                .build());
    
            var email = new IntegrationPipelinesEmail("email", IntegrationPipelinesEmailArgs.builder()
                .project(awesomeProject.id())
                .recipients("gitlab@user.create")
                .notifyOnlyBrokenPipelines(true)
                .branchesToBeNotified("all")
                .build());
    
        }
    }
    
    resources:
      awesomeProject:
        type: gitlab:Project
        name: awesome_project
        properties:
          name: awesome_project
          description: My awesome project.
          visibilityLevel: public
      email:
        type: gitlab:IntegrationPipelinesEmail
        properties:
          project: ${awesomeProject.id}
          recipients:
            - gitlab@user.create
          notifyOnlyBrokenPipelines: true
          branchesToBeNotified: all
    

    Create IntegrationPipelinesEmail Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IntegrationPipelinesEmail(name: string, args: IntegrationPipelinesEmailArgs, opts?: CustomResourceOptions);
    @overload
    def IntegrationPipelinesEmail(resource_name: str,
                                  args: IntegrationPipelinesEmailArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IntegrationPipelinesEmail(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  project: Optional[str] = None,
                                  recipients: Optional[Sequence[str]] = None,
                                  branches_to_be_notified: Optional[str] = None,
                                  notify_only_broken_pipelines: Optional[bool] = None)
    func NewIntegrationPipelinesEmail(ctx *Context, name string, args IntegrationPipelinesEmailArgs, opts ...ResourceOption) (*IntegrationPipelinesEmail, error)
    public IntegrationPipelinesEmail(string name, IntegrationPipelinesEmailArgs args, CustomResourceOptions? opts = null)
    public IntegrationPipelinesEmail(String name, IntegrationPipelinesEmailArgs args)
    public IntegrationPipelinesEmail(String name, IntegrationPipelinesEmailArgs args, CustomResourceOptions options)
    
    type: gitlab:IntegrationPipelinesEmail
    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 IntegrationPipelinesEmailArgs
    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 IntegrationPipelinesEmailArgs
    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 IntegrationPipelinesEmailArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IntegrationPipelinesEmailArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IntegrationPipelinesEmailArgs
    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 integrationPipelinesEmailResource = new GitLab.IntegrationPipelinesEmail("integrationPipelinesEmailResource", new()
    {
        Project = "string",
        Recipients = new[]
        {
            "string",
        },
        BranchesToBeNotified = "string",
        NotifyOnlyBrokenPipelines = false,
    });
    
    example, err := gitlab.NewIntegrationPipelinesEmail(ctx, "integrationPipelinesEmailResource", &gitlab.IntegrationPipelinesEmailArgs{
    	Project: pulumi.String("string"),
    	Recipients: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	BranchesToBeNotified:      pulumi.String("string"),
    	NotifyOnlyBrokenPipelines: pulumi.Bool(false),
    })
    
    var integrationPipelinesEmailResource = new IntegrationPipelinesEmail("integrationPipelinesEmailResource", IntegrationPipelinesEmailArgs.builder()
        .project("string")
        .recipients("string")
        .branchesToBeNotified("string")
        .notifyOnlyBrokenPipelines(false)
        .build());
    
    integration_pipelines_email_resource = gitlab.IntegrationPipelinesEmail("integrationPipelinesEmailResource",
        project="string",
        recipients=["string"],
        branches_to_be_notified="string",
        notify_only_broken_pipelines=False)
    
    const integrationPipelinesEmailResource = new gitlab.IntegrationPipelinesEmail("integrationPipelinesEmailResource", {
        project: "string",
        recipients: ["string"],
        branchesToBeNotified: "string",
        notifyOnlyBrokenPipelines: false,
    });
    
    type: gitlab:IntegrationPipelinesEmail
    properties:
        branchesToBeNotified: string
        notifyOnlyBrokenPipelines: false
        project: string
        recipients:
            - string
    

    IntegrationPipelinesEmail 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 IntegrationPipelinesEmail resource accepts the following input properties:

    Project string
    ID of the project you want to activate integration on.
    Recipients List<string>
    ) email addresses where notifications are sent.
    BranchesToBeNotified string
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    NotifyOnlyBrokenPipelines bool
    Notify only broken pipelines. Default is true.
    Project string
    ID of the project you want to activate integration on.
    Recipients []string
    ) email addresses where notifications are sent.
    BranchesToBeNotified string
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    NotifyOnlyBrokenPipelines bool
    Notify only broken pipelines. Default is true.
    project String
    ID of the project you want to activate integration on.
    recipients List<String>
    ) email addresses where notifications are sent.
    branchesToBeNotified String
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notifyOnlyBrokenPipelines Boolean
    Notify only broken pipelines. Default is true.
    project string
    ID of the project you want to activate integration on.
    recipients string[]
    ) email addresses where notifications are sent.
    branchesToBeNotified string
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notifyOnlyBrokenPipelines boolean
    Notify only broken pipelines. Default is true.
    project str
    ID of the project you want to activate integration on.
    recipients Sequence[str]
    ) email addresses where notifications are sent.
    branches_to_be_notified str
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notify_only_broken_pipelines bool
    Notify only broken pipelines. Default is true.
    project String
    ID of the project you want to activate integration on.
    recipients List<String>
    ) email addresses where notifications are sent.
    branchesToBeNotified String
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notifyOnlyBrokenPipelines Boolean
    Notify only broken pipelines. Default is true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IntegrationPipelinesEmail resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IntegrationPipelinesEmail Resource

    Get an existing IntegrationPipelinesEmail 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?: IntegrationPipelinesEmailState, opts?: CustomResourceOptions): IntegrationPipelinesEmail
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            branches_to_be_notified: Optional[str] = None,
            notify_only_broken_pipelines: Optional[bool] = None,
            project: Optional[str] = None,
            recipients: Optional[Sequence[str]] = None) -> IntegrationPipelinesEmail
    func GetIntegrationPipelinesEmail(ctx *Context, name string, id IDInput, state *IntegrationPipelinesEmailState, opts ...ResourceOption) (*IntegrationPipelinesEmail, error)
    public static IntegrationPipelinesEmail Get(string name, Input<string> id, IntegrationPipelinesEmailState? state, CustomResourceOptions? opts = null)
    public static IntegrationPipelinesEmail get(String name, Output<String> id, IntegrationPipelinesEmailState 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.
    The following state arguments are supported:
    BranchesToBeNotified string
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    NotifyOnlyBrokenPipelines bool
    Notify only broken pipelines. Default is true.
    Project string
    ID of the project you want to activate integration on.
    Recipients List<string>
    ) email addresses where notifications are sent.
    BranchesToBeNotified string
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    NotifyOnlyBrokenPipelines bool
    Notify only broken pipelines. Default is true.
    Project string
    ID of the project you want to activate integration on.
    Recipients []string
    ) email addresses where notifications are sent.
    branchesToBeNotified String
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notifyOnlyBrokenPipelines Boolean
    Notify only broken pipelines. Default is true.
    project String
    ID of the project you want to activate integration on.
    recipients List<String>
    ) email addresses where notifications are sent.
    branchesToBeNotified string
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notifyOnlyBrokenPipelines boolean
    Notify only broken pipelines. Default is true.
    project string
    ID of the project you want to activate integration on.
    recipients string[]
    ) email addresses where notifications are sent.
    branches_to_be_notified str
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notify_only_broken_pipelines bool
    Notify only broken pipelines. Default is true.
    project str
    ID of the project you want to activate integration on.
    recipients Sequence[str]
    ) email addresses where notifications are sent.
    branchesToBeNotified String
    Branches to send notifications for. Valid options are all, default, protected, and default_and_protected. Default is default
    notifyOnlyBrokenPipelines Boolean
    Notify only broken pipelines. Default is true.
    project String
    ID of the project you want to activate integration on.
    recipients List<String>
    ) email addresses where notifications are sent.

    Import

    You can import a gitlab_integration_pipelines_email state using the project ID, e.g.

    $ pulumi import gitlab:index/integrationPipelinesEmail:IntegrationPipelinesEmail email 1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi