1. Packages
  2. Gitlab Provider
  3. API Docs
  4. ServiceEmailsOnPush
GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi

gitlab.ServiceEmailsOnPush

Explore with Pulumi AI

The gitlab.ServiceEmailsOnPush resource allows to manage the lifecycle of a project integration with Emails on Push Service.

This resource is deprecated. Please use gitlab.IntegrationEmailsOnPush instead!

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 emails = new gitlab.ServiceEmailsOnPush("emails", {
    project: awesomeProject.id,
    recipients: "myrecipient@example.com myotherrecipient@example.com",
});
Copy
import pulumi
import pulumi_gitlab as gitlab

awesome_project = gitlab.Project("awesome_project",
    name="awesome_project",
    description="My awesome project.",
    visibility_level="public")
emails = gitlab.ServiceEmailsOnPush("emails",
    project=awesome_project.id,
    recipients="myrecipient@example.com myotherrecipient@example.com")
Copy
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.NewServiceEmailsOnPush(ctx, "emails", &gitlab.ServiceEmailsOnPushArgs{
			Project:    awesomeProject.ID(),
			Recipients: pulumi.String("myrecipient@example.com myotherrecipient@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 emails = new GitLab.ServiceEmailsOnPush("emails", new()
    {
        Project = awesomeProject.Id,
        Recipients = "myrecipient@example.com myotherrecipient@example.com",
    });

});
Copy
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.ServiceEmailsOnPush;
import com.pulumi.gitlab.ServiceEmailsOnPushArgs;
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 emails = new ServiceEmailsOnPush("emails", ServiceEmailsOnPushArgs.builder()
            .project(awesomeProject.id())
            .recipients("myrecipient@example.com myotherrecipient@example.com")
            .build());

    }
}
Copy
resources:
  awesomeProject:
    type: gitlab:Project
    name: awesome_project
    properties:
      name: awesome_project
      description: My awesome project.
      visibilityLevel: public
  emails:
    type: gitlab:ServiceEmailsOnPush
    properties:
      project: ${awesomeProject.id}
      recipients: myrecipient@example.com myotherrecipient@example.com
Copy

Create ServiceEmailsOnPush Resource

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

Constructor syntax

new ServiceEmailsOnPush(name: string, args: ServiceEmailsOnPushArgs, opts?: CustomResourceOptions);
@overload
def ServiceEmailsOnPush(resource_name: str,
                        args: ServiceEmailsOnPushArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def ServiceEmailsOnPush(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        project: Optional[str] = None,
                        recipients: Optional[str] = None,
                        branches_to_be_notified: Optional[str] = None,
                        disable_diffs: Optional[bool] = None,
                        push_events: Optional[bool] = None,
                        send_from_committer_email: Optional[bool] = None,
                        tag_push_events: Optional[bool] = None)
func NewServiceEmailsOnPush(ctx *Context, name string, args ServiceEmailsOnPushArgs, opts ...ResourceOption) (*ServiceEmailsOnPush, error)
public ServiceEmailsOnPush(string name, ServiceEmailsOnPushArgs args, CustomResourceOptions? opts = null)
public ServiceEmailsOnPush(String name, ServiceEmailsOnPushArgs args)
public ServiceEmailsOnPush(String name, ServiceEmailsOnPushArgs args, CustomResourceOptions options)
type: gitlab:ServiceEmailsOnPush
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceEmailsOnPushArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceEmailsOnPushArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceEmailsOnPushArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceEmailsOnPushArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceEmailsOnPushArgs
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 serviceEmailsOnPushResource = new GitLab.ServiceEmailsOnPush("serviceEmailsOnPushResource", new()
{
    Project = "string",
    Recipients = "string",
    BranchesToBeNotified = "string",
    DisableDiffs = false,
    PushEvents = false,
    SendFromCommitterEmail = false,
    TagPushEvents = false,
});
Copy
example, err := gitlab.NewServiceEmailsOnPush(ctx, "serviceEmailsOnPushResource", &gitlab.ServiceEmailsOnPushArgs{
	Project:                pulumi.String("string"),
	Recipients:             pulumi.String("string"),
	BranchesToBeNotified:   pulumi.String("string"),
	DisableDiffs:           pulumi.Bool(false),
	PushEvents:             pulumi.Bool(false),
	SendFromCommitterEmail: pulumi.Bool(false),
	TagPushEvents:          pulumi.Bool(false),
})
Copy
var serviceEmailsOnPushResource = new ServiceEmailsOnPush("serviceEmailsOnPushResource", ServiceEmailsOnPushArgs.builder()
    .project("string")
    .recipients("string")
    .branchesToBeNotified("string")
    .disableDiffs(false)
    .pushEvents(false)
    .sendFromCommitterEmail(false)
    .tagPushEvents(false)
    .build());
Copy
service_emails_on_push_resource = gitlab.ServiceEmailsOnPush("serviceEmailsOnPushResource",
    project="string",
    recipients="string",
    branches_to_be_notified="string",
    disable_diffs=False,
    push_events=False,
    send_from_committer_email=False,
    tag_push_events=False)
Copy
const serviceEmailsOnPushResource = new gitlab.ServiceEmailsOnPush("serviceEmailsOnPushResource", {
    project: "string",
    recipients: "string",
    branchesToBeNotified: "string",
    disableDiffs: false,
    pushEvents: false,
    sendFromCommitterEmail: false,
    tagPushEvents: false,
});
Copy
type: gitlab:ServiceEmailsOnPush
properties:
    branchesToBeNotified: string
    disableDiffs: false
    project: string
    pushEvents: false
    recipients: string
    sendFromCommitterEmail: false
    tagPushEvents: false
Copy

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

Project
This property is required.
Changes to this property will trigger replacement.
string
ID or full-path of the project you want to activate integration on.
Recipients This property is required. string
Emails separated by whitespace.
BranchesToBeNotified string
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
DisableDiffs bool
Disable code diffs.
PushEvents bool
Enable notifications for push events.
SendFromCommitterEmail bool
Send from committer.
TagPushEvents bool
Enable notifications for tag push events.
Project
This property is required.
Changes to this property will trigger replacement.
string
ID or full-path of the project you want to activate integration on.
Recipients This property is required. string
Emails separated by whitespace.
BranchesToBeNotified string
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
DisableDiffs bool
Disable code diffs.
PushEvents bool
Enable notifications for push events.
SendFromCommitterEmail bool
Send from committer.
TagPushEvents bool
Enable notifications for tag push events.
project
This property is required.
Changes to this property will trigger replacement.
String
ID or full-path of the project you want to activate integration on.
recipients This property is required. String
Emails separated by whitespace.
branchesToBeNotified String
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
disableDiffs Boolean
Disable code diffs.
pushEvents Boolean
Enable notifications for push events.
sendFromCommitterEmail Boolean
Send from committer.
tagPushEvents Boolean
Enable notifications for tag push events.
project
This property is required.
Changes to this property will trigger replacement.
string
ID or full-path of the project you want to activate integration on.
recipients This property is required. string
Emails separated by whitespace.
branchesToBeNotified string
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
disableDiffs boolean
Disable code diffs.
pushEvents boolean
Enable notifications for push events.
sendFromCommitterEmail boolean
Send from committer.
tagPushEvents boolean
Enable notifications for tag push events.
project
This property is required.
Changes to this property will trigger replacement.
str
ID or full-path of the project you want to activate integration on.
recipients This property is required. str
Emails separated by whitespace.
branches_to_be_notified str
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
disable_diffs bool
Disable code diffs.
push_events bool
Enable notifications for push events.
send_from_committer_email bool
Send from committer.
tag_push_events bool
Enable notifications for tag push events.
project
This property is required.
Changes to this property will trigger replacement.
String
ID or full-path of the project you want to activate integration on.
recipients This property is required. String
Emails separated by whitespace.
branchesToBeNotified String
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
disableDiffs Boolean
Disable code diffs.
pushEvents Boolean
Enable notifications for push events.
sendFromCommitterEmail Boolean
Send from committer.
tagPushEvents Boolean
Enable notifications for tag push events.

Outputs

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

Active bool
Whether the integration is active.
CreatedAt string
The ISO8601 date/time that this integration was activated at in UTC.
Id string
The provider-assigned unique ID for this managed resource.
Slug string
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
Title string
Title of the integration.
UpdatedAt string
The ISO8601 date/time that this integration was last updated at in UTC.
Active bool
Whether the integration is active.
CreatedAt string
The ISO8601 date/time that this integration was activated at in UTC.
Id string
The provider-assigned unique ID for this managed resource.
Slug string
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
Title string
Title of the integration.
UpdatedAt string
The ISO8601 date/time that this integration was last updated at in UTC.
active Boolean
Whether the integration is active.
createdAt String
The ISO8601 date/time that this integration was activated at in UTC.
id String
The provider-assigned unique ID for this managed resource.
slug String
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
title String
Title of the integration.
updatedAt String
The ISO8601 date/time that this integration was last updated at in UTC.
active boolean
Whether the integration is active.
createdAt string
The ISO8601 date/time that this integration was activated at in UTC.
id string
The provider-assigned unique ID for this managed resource.
slug string
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
title string
Title of the integration.
updatedAt string
The ISO8601 date/time that this integration was last updated at in UTC.
active bool
Whether the integration is active.
created_at str
The ISO8601 date/time that this integration was activated at in UTC.
id str
The provider-assigned unique ID for this managed resource.
slug str
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
title str
Title of the integration.
updated_at str
The ISO8601 date/time that this integration was last updated at in UTC.
active Boolean
Whether the integration is active.
createdAt String
The ISO8601 date/time that this integration was activated at in UTC.
id String
The provider-assigned unique ID for this managed resource.
slug String
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
title String
Title of the integration.
updatedAt String
The ISO8601 date/time that this integration was last updated at in UTC.

Look up Existing ServiceEmailsOnPush Resource

Get an existing ServiceEmailsOnPush 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?: ServiceEmailsOnPushState, opts?: CustomResourceOptions): ServiceEmailsOnPush
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        active: Optional[bool] = None,
        branches_to_be_notified: Optional[str] = None,
        created_at: Optional[str] = None,
        disable_diffs: Optional[bool] = None,
        project: Optional[str] = None,
        push_events: Optional[bool] = None,
        recipients: Optional[str] = None,
        send_from_committer_email: Optional[bool] = None,
        slug: Optional[str] = None,
        tag_push_events: Optional[bool] = None,
        title: Optional[str] = None,
        updated_at: Optional[str] = None) -> ServiceEmailsOnPush
func GetServiceEmailsOnPush(ctx *Context, name string, id IDInput, state *ServiceEmailsOnPushState, opts ...ResourceOption) (*ServiceEmailsOnPush, error)
public static ServiceEmailsOnPush Get(string name, Input<string> id, ServiceEmailsOnPushState? state, CustomResourceOptions? opts = null)
public static ServiceEmailsOnPush get(String name, Output<String> id, ServiceEmailsOnPushState state, CustomResourceOptions options)
resources:  _:    type: gitlab:ServiceEmailsOnPush    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Active bool
Whether the integration is active.
BranchesToBeNotified string
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
CreatedAt string
The ISO8601 date/time that this integration was activated at in UTC.
DisableDiffs bool
Disable code diffs.
Project Changes to this property will trigger replacement. string
ID or full-path of the project you want to activate integration on.
PushEvents bool
Enable notifications for push events.
Recipients string
Emails separated by whitespace.
SendFromCommitterEmail bool
Send from committer.
Slug string
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
TagPushEvents bool
Enable notifications for tag push events.
Title string
Title of the integration.
UpdatedAt string
The ISO8601 date/time that this integration was last updated at in UTC.
Active bool
Whether the integration is active.
BranchesToBeNotified string
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
CreatedAt string
The ISO8601 date/time that this integration was activated at in UTC.
DisableDiffs bool
Disable code diffs.
Project Changes to this property will trigger replacement. string
ID or full-path of the project you want to activate integration on.
PushEvents bool
Enable notifications for push events.
Recipients string
Emails separated by whitespace.
SendFromCommitterEmail bool
Send from committer.
Slug string
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
TagPushEvents bool
Enable notifications for tag push events.
Title string
Title of the integration.
UpdatedAt string
The ISO8601 date/time that this integration was last updated at in UTC.
active Boolean
Whether the integration is active.
branchesToBeNotified String
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
createdAt String
The ISO8601 date/time that this integration was activated at in UTC.
disableDiffs Boolean
Disable code diffs.
project Changes to this property will trigger replacement. String
ID or full-path of the project you want to activate integration on.
pushEvents Boolean
Enable notifications for push events.
recipients String
Emails separated by whitespace.
sendFromCommitterEmail Boolean
Send from committer.
slug String
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
tagPushEvents Boolean
Enable notifications for tag push events.
title String
Title of the integration.
updatedAt String
The ISO8601 date/time that this integration was last updated at in UTC.
active boolean
Whether the integration is active.
branchesToBeNotified string
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
createdAt string
The ISO8601 date/time that this integration was activated at in UTC.
disableDiffs boolean
Disable code diffs.
project Changes to this property will trigger replacement. string
ID or full-path of the project you want to activate integration on.
pushEvents boolean
Enable notifications for push events.
recipients string
Emails separated by whitespace.
sendFromCommitterEmail boolean
Send from committer.
slug string
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
tagPushEvents boolean
Enable notifications for tag push events.
title string
Title of the integration.
updatedAt string
The ISO8601 date/time that this integration was last updated at in UTC.
active bool
Whether the integration is active.
branches_to_be_notified str
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
created_at str
The ISO8601 date/time that this integration was activated at in UTC.
disable_diffs bool
Disable code diffs.
project Changes to this property will trigger replacement. str
ID or full-path of the project you want to activate integration on.
push_events bool
Enable notifications for push events.
recipients str
Emails separated by whitespace.
send_from_committer_email bool
Send from committer.
slug str
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
tag_push_events bool
Enable notifications for tag push events.
title str
Title of the integration.
updated_at str
The ISO8601 date/time that this integration was last updated at in UTC.
active Boolean
Whether the integration is active.
branchesToBeNotified String
Branches to send notifications for. Valid options are all, default, protected, default_and_protected. Notifications are always fired for tag pushes.
createdAt String
The ISO8601 date/time that this integration was activated at in UTC.
disableDiffs Boolean
Disable code diffs.
project Changes to this property will trigger replacement. String
ID or full-path of the project you want to activate integration on.
pushEvents Boolean
Enable notifications for push events.
recipients String
Emails separated by whitespace.
sendFromCommitterEmail Boolean
Send from committer.
slug String
The name of the integration in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -. Use in URLs, host names and domain names.
tagPushEvents Boolean
Enable notifications for tag push events.
title String
Title of the integration.
updatedAt String
The ISO8601 date/time that this integration was last updated at in UTC.

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_service_emails_on_push. For example:

terraform

import {

to = gitlab_service_emails_on_push.example

id = “see CLI command below for ID”

}

Import using the CLI is supported using the following syntax:

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

$ pulumi import gitlab:index/serviceEmailsOnPush:ServiceEmailsOnPush emails 1
Copy

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.