1. Packages
  2. GitLab
  3. API Docs
  4. ServicePipelinesEmail
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.ServicePipelinesEmail

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

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

    This resource is deprecated. use gitlab.IntegrationPipelinesEmailinstead!

    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("awesomeProject", {
        description: "My awesome project.",
        visibilityLevel: "public",
    });
    const email = new gitlab.ServicePipelinesEmail("email", {
        project: awesomeProject.id,
        recipients: ["gitlab@user.create"],
        notifyOnlyBrokenPipelines: true,
        branchesToBeNotified: "all",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    awesome_project = gitlab.Project("awesomeProject",
        description="My awesome project.",
        visibility_level="public")
    email = gitlab.ServicePipelinesEmail("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/v6/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		awesomeProject, err := gitlab.NewProject(ctx, "awesomeProject", &gitlab.ProjectArgs{
    			Description:     pulumi.String("My awesome project."),
    			VisibilityLevel: pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.NewServicePipelinesEmail(ctx, "email", &gitlab.ServicePipelinesEmailArgs{
    			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("awesomeProject", new()
        {
            Description = "My awesome project.",
            VisibilityLevel = "public",
        });
    
        var email = new GitLab.ServicePipelinesEmail("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.ServicePipelinesEmail;
    import com.pulumi.gitlab.ServicePipelinesEmailArgs;
    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()        
                .description("My awesome project.")
                .visibilityLevel("public")
                .build());
    
            var email = new ServicePipelinesEmail("email", ServicePipelinesEmailArgs.builder()        
                .project(awesomeProject.id())
                .recipients("gitlab@user.create")
                .notifyOnlyBrokenPipelines(true)
                .branchesToBeNotified("all")
                .build());
    
        }
    }
    
    resources:
      awesomeProject:
        type: gitlab:Project
        properties:
          description: My awesome project.
          visibilityLevel: public
      email:
        type: gitlab:ServicePipelinesEmail
        properties:
          project: ${awesomeProject.id}
          recipients:
            - gitlab@user.create
          notifyOnlyBrokenPipelines: true
          branchesToBeNotified: all
    

    Create ServicePipelinesEmail Resource

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

    Constructor syntax

    new ServicePipelinesEmail(name: string, args: ServicePipelinesEmailArgs, opts?: CustomResourceOptions);
    @overload
    def ServicePipelinesEmail(resource_name: str,
                              args: ServicePipelinesEmailArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServicePipelinesEmail(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 NewServicePipelinesEmail(ctx *Context, name string, args ServicePipelinesEmailArgs, opts ...ResourceOption) (*ServicePipelinesEmail, error)
    public ServicePipelinesEmail(string name, ServicePipelinesEmailArgs args, CustomResourceOptions? opts = null)
    public ServicePipelinesEmail(String name, ServicePipelinesEmailArgs args)
    public ServicePipelinesEmail(String name, ServicePipelinesEmailArgs args, CustomResourceOptions options)
    
    type: gitlab:ServicePipelinesEmail
    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 ServicePipelinesEmailArgs
    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 ServicePipelinesEmailArgs
    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 ServicePipelinesEmailArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServicePipelinesEmailArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServicePipelinesEmailArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var servicePipelinesEmailResource = new GitLab.ServicePipelinesEmail("servicePipelinesEmailResource", new()
    {
        Project = "string",
        Recipients = new[]
        {
            "string",
        },
        BranchesToBeNotified = "string",
        NotifyOnlyBrokenPipelines = false,
    });
    
    example, err := gitlab.NewServicePipelinesEmail(ctx, "servicePipelinesEmailResource", &gitlab.ServicePipelinesEmailArgs{
    	Project: pulumi.String("string"),
    	Recipients: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	BranchesToBeNotified:      pulumi.String("string"),
    	NotifyOnlyBrokenPipelines: pulumi.Bool(false),
    })
    
    var servicePipelinesEmailResource = new ServicePipelinesEmail("servicePipelinesEmailResource", ServicePipelinesEmailArgs.builder()        
        .project("string")
        .recipients("string")
        .branchesToBeNotified("string")
        .notifyOnlyBrokenPipelines(false)
        .build());
    
    service_pipelines_email_resource = gitlab.ServicePipelinesEmail("servicePipelinesEmailResource",
        project="string",
        recipients=["string"],
        branches_to_be_notified="string",
        notify_only_broken_pipelines=False)
    
    const servicePipelinesEmailResource = new gitlab.ServicePipelinesEmail("servicePipelinesEmailResource", {
        project: "string",
        recipients: ["string"],
        branchesToBeNotified: "string",
        notifyOnlyBrokenPipelines: false,
    });
    
    type: gitlab:ServicePipelinesEmail
    properties:
        branchesToBeNotified: string
        notifyOnlyBrokenPipelines: false
        project: string
        recipients:
            - string
    

    ServicePipelinesEmail Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ServicePipelinesEmail 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 ServicePipelinesEmail 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 ServicePipelinesEmail Resource

    Get an existing ServicePipelinesEmail 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?: ServicePipelinesEmailState, opts?: CustomResourceOptions): ServicePipelinesEmail
    @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) -> ServicePipelinesEmail
    func GetServicePipelinesEmail(ctx *Context, name string, id IDInput, state *ServicePipelinesEmailState, opts ...ResourceOption) (*ServicePipelinesEmail, error)
    public static ServicePipelinesEmail Get(string name, Input<string> id, ServicePipelinesEmailState? state, CustomResourceOptions? opts = null)
    public static ServicePipelinesEmail get(String name, Output<String> id, ServicePipelinesEmailState 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_service_pipelines_email state using the project ID, e.g.

    $ pulumi import gitlab:index/servicePipelinesEmail:ServicePipelinesEmail 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 v6.10.0 published on Monday, Mar 25, 2024 by Pulumi