com.pulumi.gitlab.kotlin.PipelineTriggerArgs.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.core.Output.of
import com.pulumi.gitlab.PipelineTriggerArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* The `gitlab.PipelineTrigger` resource allows to manage the lifecycle of a pipeline trigger.
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/pipeline_triggers.html)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
* const example = new gitlab.PipelineTrigger("example", {
* project: "12345",
* description: "Used to trigger builds",
* });
* ```
* ```python
* import pulumi
* import pulumi_gitlab as gitlab
* example = gitlab.PipelineTrigger("example",
* project="12345",
* description="Used to trigger builds")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using GitLab = Pulumi.GitLab;
* return await Deployment.RunAsync(() =>
* {
* var example = new GitLab.PipelineTrigger("example", new()
* {
* Project = "12345",
* Description = "Used to trigger builds",
* });
* });
* ```
* ```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 {
* _, err := gitlab.NewPipelineTrigger(ctx, "example", &gitlab.PipelineTriggerArgs{
* Project: pulumi.String("12345"),
* Description: pulumi.String("Used to trigger builds"),
* })
* 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.PipelineTrigger;
* import com.pulumi.gitlab.PipelineTriggerArgs;
* 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 example = new PipelineTrigger("example", PipelineTriggerArgs.builder()
* .project("12345")
* .description("Used to trigger builds")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: gitlab:PipelineTrigger
* properties:
* project: '12345'
* description: Used to trigger builds
* ```
*
* ## Import
* Starting in Terraform v1.5.0 you can use an import block to import `gitlab_pipeline_trigger`. For example:
* terraform
* import {
* to = gitlab_pipeline_trigger.example
* id = "see CLI command below for ID"
* }
* Import using the CLI is supported using the following syntax:
* GitLab pipeline triggers can be imported using an id made up of `{project_id}:{pipeline_trigger_id}`, e.g.
* ```sh
* $ pulumi import gitlab:index/pipelineTrigger:PipelineTrigger test 1:3
* ```
* @property description The description of the pipeline trigger.
* @property project The name or id of the project to add the trigger to.
*/
public data class PipelineTriggerArgs(
public val description: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.PipelineTriggerArgs =
com.pulumi.gitlab.PipelineTriggerArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PipelineTriggerArgs].
*/
@PulumiTagMarker
public class PipelineTriggerArgsBuilder internal constructor() {
private var description: Output? = null
private var project: Output? = null
/**
* @param value The description of the pipeline trigger.
*/
@JvmName("fikswxkejcjesete")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The name or id of the project to add the trigger to.
*/
@JvmName("yvjiejgvjtiuummr")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The description of the pipeline trigger.
*/
@JvmName("wwyoaejlpoanumwo")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The name or id of the project to add the trigger to.
*/
@JvmName("adjxykgjfahdurbk")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): PipelineTriggerArgs = PipelineTriggerArgs(
description = description,
project = project,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy