com.pulumi.gitlab.kotlin.IntegrationJira.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gitlab.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [IntegrationJira].
*/
@PulumiTagMarker
public class IntegrationJiraResourceBuilder internal constructor() {
public var name: String? = null
public var args: IntegrationJiraArgs = IntegrationJiraArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend IntegrationJiraArgsBuilder.() -> Unit) {
val builder = IntegrationJiraArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): IntegrationJira {
val builtJavaResource = com.pulumi.gitlab.IntegrationJira(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IntegrationJira(builtJavaResource)
}
}
/**
* The `gitlab.IntegrationJira` resource allows to manage the lifecycle of a project integration with Jira.
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/services.html#jira)
* ## Example Usage
*
* ```typescript
* 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 jira = new gitlab.IntegrationJira("jira", {
* project: awesomeProject.id,
* url: "https://jira.example.com",
* username: "user",
* password: "mypass",
* });
* ```
* ```python
* import pulumi
* import pulumi_gitlab as gitlab
* awesome_project = gitlab.Project("awesome_project",
* name="awesome_project",
* description="My awesome project.",
* visibility_level="public")
* jira = gitlab.IntegrationJira("jira",
* project=awesome_project.id,
* url="https://jira.example.com",
* username="user",
* password="mypass")
* ```
* ```csharp
* 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 jira = new GitLab.IntegrationJira("jira", new()
* {
* Project = awesomeProject.Id,
* Url = "https://jira.example.com",
* Username = "user",
* Password = "mypass",
* });
* });
* ```
* ```go
* 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.NewIntegrationJira(ctx, "jira", &gitlab.IntegrationJiraArgs{
* Project: awesomeProject.ID(),
* Url: pulumi.String("https://jira.example.com"),
* Username: pulumi.String("user"),
* Password: pulumi.String("mypass"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.IntegrationJira;
* import com.pulumi.gitlab.IntegrationJiraArgs;
* 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 jira = new IntegrationJira("jira", IntegrationJiraArgs.builder()
* .project(awesomeProject.id())
* .url("https://jira.example.com")
* .username("user")
* .password("mypass")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* awesomeProject:
* type: gitlab:Project
* name: awesome_project
* properties:
* name: awesome_project
* description: My awesome project.
* visibilityLevel: public
* jira:
* type: gitlab:IntegrationJira
* properties:
* project: ${awesomeProject.id}
* url: https://jira.example.com
* username: user
* password: mypass
* ```
*
* ## Import
* You can import a gitlab_integration_jira state using the project ID, e.g.
* ```sh
* $ pulumi import gitlab:index/integrationJira:IntegrationJira jira 1
* ```
*/
public class IntegrationJira internal constructor(
override val javaResource: com.pulumi.gitlab.IntegrationJira,
) : KotlinCustomResource(javaResource, IntegrationJiraMapper) {
/**
* Whether the integration is active.
*/
public val active: Output
get() = javaResource.active().applyValue({ args0 -> args0 })
/**
* The base URL to the Jira instance API. Web URL value is used if not set. For example, https://jira-api.example.com.
*/
public val apiUrl: Output
get() = javaResource.apiUrl().applyValue({ args0 -> args0 })
/**
* Enable comments inside Jira issues on each GitLab event (commit / merge request)
*/
public val commentOnEventEnabled: Output
get() = javaResource.commentOnEventEnabled().applyValue({ args0 -> args0 })
/**
* Enable notifications for commit events
*/
public val commitEvents: Output
get() = javaResource.commitEvents().applyValue({ args0 -> args0 })
/**
* Create time.
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* Enable notifications for issues events.
*/
public val issuesEvents: Output
get() = javaResource.issuesEvents().applyValue({ args0 -> args0 })
/**
* The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (Administration > Issues > Workflows) by selecting View under Operations of the desired workflow of your project. By default, this ID is set to 2. *Note**: importing this field is only supported since GitLab 15.2.
*/
public val jiraIssueTransitionId: Output?
get() = javaResource.jiraIssueTransitionId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Enable notifications for job events.
*/
public val jobEvents: Output
get() = javaResource.jobEvents().applyValue({ args0 -> args0 })
/**
* Enable notifications for merge request events
*/
public val mergeRequestsEvents: Output
get() = javaResource.mergeRequestsEvents().applyValue({ args0 -> args0 })
/**
* Enable notifications for note events.
*/
public val noteEvents: Output
get() = javaResource.noteEvents().applyValue({ args0 -> args0 })
/**
* The password of the user created to be used with GitLab/JIRA.
*/
public val password: Output
get() = javaResource.password().applyValue({ args0 -> args0 })
/**
* Enable notifications for pipeline events.
*/
public val pipelineEvents: Output
get() = javaResource.pipelineEvents().applyValue({ args0 -> args0 })
/**
* ID of the project you want to activate integration on.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The short identifier for your JIRA project, all uppercase, e.g., PROJ.
*/
public val projectKey: Output?
get() = javaResource.projectKey().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Enable notifications for push events.
*/
public val pushEvents: Output
get() = javaResource.pushEvents().applyValue({ args0 -> args0 })
/**
* Enable notifications for tag_push events.
*/
public val tagPushEvents: Output
get() = javaResource.tagPushEvents().applyValue({ args0 -> args0 })
/**
* Title.
*/
public val title: Output
get() = javaResource.title().applyValue({ args0 -> args0 })
/**
* Update time.
*/
public val updatedAt: Output
get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
/**
* The URL to the JIRA project which is being linked to this GitLab project. For example, https://jira.example.com.
*/
public val url: Output
get() = javaResource.url().applyValue({ args0 -> args0 })
/**
* The username of the user created to be used with GitLab/JIRA.
*/
public val username: Output
get() = javaResource.username().applyValue({ args0 -> args0 })
}
public object IntegrationJiraMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gitlab.IntegrationJira::class == javaResource::class
override fun map(javaResource: Resource): IntegrationJira = IntegrationJira(
javaResource as
com.pulumi.gitlab.IntegrationJira,
)
}
/**
* @see [IntegrationJira].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IntegrationJira].
*/
public suspend fun integrationJira(
name: String,
block: suspend IntegrationJiraResourceBuilder.() -> Unit,
): IntegrationJira {
val builder = IntegrationJiraResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IntegrationJira].
* @param name The _unique_ name of the resulting resource.
*/
public fun integrationJira(name: String): IntegrationJira {
val builder = IntegrationJiraResourceBuilder()
builder.name(name)
return builder.build()
}