com.pulumi.gitlab.IntegrationMattermost Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gitlab Show documentation
Show all versions of gitlab Show documentation
A Pulumi package for creating and managing GitLab resources.
The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.gitlab;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gitlab.IntegrationMattermostArgs;
import com.pulumi.gitlab.Utilities;
import com.pulumi.gitlab.inputs.IntegrationMattermostState;
import java.lang.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The `gitlab.IntegrationMattermost` resource allows to manage the lifecycle of a project integration with Mattermost.
*
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/integrations.html#mattermost-notifications)
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.IntegrationMattermost;
* import com.pulumi.gitlab.IntegrationMattermostArgs;
* 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 mattermost = new IntegrationMattermost("mattermost", IntegrationMattermostArgs.builder()
* .project(awesomeProject.id())
* .webhook("https://webhook.com")
* .username("myuser")
* .pushEvents(true)
* .pushChannel("push_chan")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* You can import a gitlab_integration_mattermost.mattermost state using the project ID, e.g.
*
* ```sh
* $ pulumi import gitlab:index/integrationMattermost:IntegrationMattermost mattermost 1
* ```
*
*/
@ResourceType(type="gitlab:index/integrationMattermost:IntegrationMattermost")
public class IntegrationMattermost extends com.pulumi.resources.CustomResource {
/**
* Branches to send notifications for. Valid options are "all", "default", "protected", and "default*and*protected".
*
*/
@Export(name="branchesToBeNotified", refs={String.class}, tree="[0]")
private Output branchesToBeNotified;
/**
* @return Branches to send notifications for. Valid options are "all", "default", "protected", and "default*and*protected".
*
*/
public Output branchesToBeNotified() {
return this.branchesToBeNotified;
}
/**
* The name of the channel to receive confidential issue events notifications.
*
*/
@Export(name="confidentialIssueChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> confidentialIssueChannel;
/**
* @return The name of the channel to receive confidential issue events notifications.
*
*/
public Output> confidentialIssueChannel() {
return Codegen.optional(this.confidentialIssueChannel);
}
/**
* Enable notifications for confidential issues events.
*
*/
@Export(name="confidentialIssuesEvents", refs={Boolean.class}, tree="[0]")
private Output confidentialIssuesEvents;
/**
* @return Enable notifications for confidential issues events.
*
*/
public Output confidentialIssuesEvents() {
return this.confidentialIssuesEvents;
}
/**
* The name of the channel to receive confidential note events notifications.
*
*/
@Export(name="confidentialNoteChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> confidentialNoteChannel;
/**
* @return The name of the channel to receive confidential note events notifications.
*
*/
public Output> confidentialNoteChannel() {
return Codegen.optional(this.confidentialNoteChannel);
}
/**
* Enable notifications for confidential note events.
*
*/
@Export(name="confidentialNoteEvents", refs={Boolean.class}, tree="[0]")
private Output confidentialNoteEvents;
/**
* @return Enable notifications for confidential note events.
*
*/
public Output confidentialNoteEvents() {
return this.confidentialNoteEvents;
}
/**
* The name of the channel to receive issue events notifications.
*
*/
@Export(name="issueChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> issueChannel;
/**
* @return The name of the channel to receive issue events notifications.
*
*/
public Output> issueChannel() {
return Codegen.optional(this.issueChannel);
}
/**
* Enable notifications for issues events.
*
*/
@Export(name="issuesEvents", refs={Boolean.class}, tree="[0]")
private Output issuesEvents;
/**
* @return Enable notifications for issues events.
*
*/
public Output issuesEvents() {
return this.issuesEvents;
}
/**
* The name of the channel to receive merge request events notifications.
*
*/
@Export(name="mergeRequestChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> mergeRequestChannel;
/**
* @return The name of the channel to receive merge request events notifications.
*
*/
public Output> mergeRequestChannel() {
return Codegen.optional(this.mergeRequestChannel);
}
/**
* Enable notifications for merge requests events.
*
*/
@Export(name="mergeRequestsEvents", refs={Boolean.class}, tree="[0]")
private Output mergeRequestsEvents;
/**
* @return Enable notifications for merge requests events.
*
*/
public Output mergeRequestsEvents() {
return this.mergeRequestsEvents;
}
/**
* The name of the channel to receive note events notifications.
*
*/
@Export(name="noteChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> noteChannel;
/**
* @return The name of the channel to receive note events notifications.
*
*/
public Output> noteChannel() {
return Codegen.optional(this.noteChannel);
}
/**
* Enable notifications for note events.
*
*/
@Export(name="noteEvents", refs={Boolean.class}, tree="[0]")
private Output noteEvents;
/**
* @return Enable notifications for note events.
*
*/
public Output noteEvents() {
return this.noteEvents;
}
/**
* Send notifications for broken pipelines.
*
*/
@Export(name="notifyOnlyBrokenPipelines", refs={Boolean.class}, tree="[0]")
private Output notifyOnlyBrokenPipelines;
/**
* @return Send notifications for broken pipelines.
*
*/
public Output notifyOnlyBrokenPipelines() {
return this.notifyOnlyBrokenPipelines;
}
/**
* The name of the channel to receive pipeline events notifications.
*
*/
@Export(name="pipelineChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> pipelineChannel;
/**
* @return The name of the channel to receive pipeline events notifications.
*
*/
public Output> pipelineChannel() {
return Codegen.optional(this.pipelineChannel);
}
/**
* Enable notifications for pipeline events.
*
*/
@Export(name="pipelineEvents", refs={Boolean.class}, tree="[0]")
private Output pipelineEvents;
/**
* @return Enable notifications for pipeline events.
*
*/
public Output pipelineEvents() {
return this.pipelineEvents;
}
/**
* ID of the project you want to activate integration on.
*
*/
@Export(name="project", refs={String.class}, tree="[0]")
private Output project;
/**
* @return ID of the project you want to activate integration on.
*
*/
public Output project() {
return this.project;
}
/**
* The name of the channel to receive push events notifications.
*
*/
@Export(name="pushChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> pushChannel;
/**
* @return The name of the channel to receive push events notifications.
*
*/
public Output> pushChannel() {
return Codegen.optional(this.pushChannel);
}
/**
* Enable notifications for push events.
*
*/
@Export(name="pushEvents", refs={Boolean.class}, tree="[0]")
private Output pushEvents;
/**
* @return Enable notifications for push events.
*
*/
public Output pushEvents() {
return this.pushEvents;
}
/**
* The name of the channel to receive tag push events notifications.
*
*/
@Export(name="tagPushChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> tagPushChannel;
/**
* @return The name of the channel to receive tag push events notifications.
*
*/
public Output> tagPushChannel() {
return Codegen.optional(this.tagPushChannel);
}
/**
* Enable notifications for tag push events.
*
*/
@Export(name="tagPushEvents", refs={Boolean.class}, tree="[0]")
private Output tagPushEvents;
/**
* @return Enable notifications for tag push events.
*
*/
public Output tagPushEvents() {
return this.tagPushEvents;
}
/**
* Username to use.
*
*/
@Export(name="username", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> username;
/**
* @return Username to use.
*
*/
public Output> username() {
return Codegen.optional(this.username);
}
/**
* Webhook URL (Example, https://mattermost.yourdomain.com/hooks/...). This value cannot be imported.
*
*/
@Export(name="webhook", refs={String.class}, tree="[0]")
private Output webhook;
/**
* @return Webhook URL (Example, https://mattermost.yourdomain.com/hooks/...). This value cannot be imported.
*
*/
public Output webhook() {
return this.webhook;
}
/**
* The name of the channel to receive wiki page events notifications.
*
*/
@Export(name="wikiPageChannel", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> wikiPageChannel;
/**
* @return The name of the channel to receive wiki page events notifications.
*
*/
public Output> wikiPageChannel() {
return Codegen.optional(this.wikiPageChannel);
}
/**
* Enable notifications for wiki page events.
*
*/
@Export(name="wikiPageEvents", refs={Boolean.class}, tree="[0]")
private Output wikiPageEvents;
/**
* @return Enable notifications for wiki page events.
*
*/
public Output wikiPageEvents() {
return this.wikiPageEvents;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public IntegrationMattermost(java.lang.String name) {
this(name, IntegrationMattermostArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public IntegrationMattermost(java.lang.String name, IntegrationMattermostArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public IntegrationMattermost(java.lang.String name, IntegrationMattermostArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("gitlab:index/integrationMattermost:IntegrationMattermost", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private IntegrationMattermost(java.lang.String name, Output id, @Nullable IntegrationMattermostState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("gitlab:index/integrationMattermost:IntegrationMattermost", name, state, makeResourceOptions(options, id), false);
}
private static IntegrationMattermostArgs makeArgs(IntegrationMattermostArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? IntegrationMattermostArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static IntegrationMattermost get(java.lang.String name, Output id, @Nullable IntegrationMattermostState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new IntegrationMattermost(name, id, state, options);
}
}