com.pulumi.gitlab.kotlin.GroupHook.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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gitlab.kotlin
import com.pulumi.core.Output
import com.pulumi.gitlab.kotlin.outputs.GroupHookCustomHeader
import com.pulumi.gitlab.kotlin.outputs.GroupHookCustomHeader.Companion.toKotlin
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [GroupHook].
*/
@PulumiTagMarker
public class GroupHookResourceBuilder internal constructor() {
public var name: String? = null
public var args: GroupHookArgs = GroupHookArgs()
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 GroupHookArgsBuilder.() -> Unit) {
val builder = GroupHookArgsBuilder()
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(): GroupHook {
val builtJavaResource = com.pulumi.gitlab.GroupHook(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return GroupHook(builtJavaResource)
}
}
/**
* The `gitlab.GroupHook` resource allows to manage the lifecycle of a group hook.
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#hooks)
* ## Import
* Starting in Terraform v1.5.0 you can use an import block to import `gitlab_group_hook`. For example:
* terraform
* import {
* to = gitlab_group_hook.example
* id = "see CLI command below for ID"
* }
* Import using the CLI is supported using the following syntax:
* A GitLab Group Hook can be imported using a key composed of `:`, e.g.
* ```sh
* $ pulumi import gitlab:index/groupHook:GroupHook example "12345:1"
* ```
* NOTE: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
*/
public class GroupHook internal constructor(
override val javaResource: com.pulumi.gitlab.GroupHook,
) : KotlinCustomResource(javaResource, GroupHookMapper) {
/**
* Invoke the hook for confidential issues events.
*/
public val confidentialIssuesEvents: Output
get() = javaResource.confidentialIssuesEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for confidential note events.
*/
public val confidentialNoteEvents: Output
get() = javaResource.confidentialNoteEvents().applyValue({ args0 -> args0 })
/**
* Custom headers for the project webhook.
*/
public val customHeaders: Output>?
get() = javaResource.customHeaders().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
}).orElse(null)
})
/**
* Custom webhook template.
*/
public val customWebhookTemplate: Output
get() = javaResource.customWebhookTemplate().applyValue({ args0 -> args0 })
/**
* Invoke the hook for deployment events.
*/
public val deploymentEvents: Output
get() = javaResource.deploymentEvents().applyValue({ args0 -> args0 })
/**
* Enable SSL verification when invoking the hook.
*/
public val enableSslVerification: Output
get() = javaResource.enableSslVerification().applyValue({ args0 -> args0 })
/**
* The full path or id of the group to add the hook to.
*/
public val group: Output
get() = javaResource.group().applyValue({ args0 -> args0 })
/**
* The id of the group for the hook.
*/
public val groupId: Output
get() = javaResource.groupId().applyValue({ args0 -> args0 })
/**
* The id of the group hook.
*/
public val hookId: Output
get() = javaResource.hookId().applyValue({ args0 -> args0 })
/**
* Invoke the hook for issues events.
*/
public val issuesEvents: Output
get() = javaResource.issuesEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for job events.
*/
public val jobEvents: Output
get() = javaResource.jobEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for merge requests events.
*/
public val mergeRequestsEvents: Output
get() = javaResource.mergeRequestsEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for note events.
*/
public val noteEvents: Output
get() = javaResource.noteEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for pipeline events.
*/
public val pipelineEvents: Output
get() = javaResource.pipelineEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for push events.
*/
public val pushEvents: Output
get() = javaResource.pushEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for push events on matching branches only.
*/
public val pushEventsBranchFilter: Output
get() = javaResource.pushEventsBranchFilter().applyValue({ args0 -> args0 })
/**
* Invoke the hook for release events.
*/
public val releasesEvents: Output
get() = javaResource.releasesEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for subgroup events.
*/
public val subgroupEvents: Output
get() = javaResource.subgroupEvents().applyValue({ args0 -> args0 })
/**
* Invoke the hook for tag push events.
*/
public val tagPushEvents: Output
get() = javaResource.tagPushEvents().applyValue({ args0 -> args0 })
/**
* A token to present when invoking the hook. The token is not available for imported resources.
*/
public val token: Output
get() = javaResource.token().applyValue({ args0 -> args0 })
/**
* The url of the hook to invoke. Forces re-creation to preserve `token`.
*/
public val url: Output
get() = javaResource.url().applyValue({ args0 -> args0 })
/**
* Invoke the hook for wiki page events.
*/
public val wikiPageEvents: Output
get() = javaResource.wikiPageEvents().applyValue({ args0 -> args0 })
}
public object GroupHookMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gitlab.GroupHook::class == javaResource::class
override fun map(javaResource: Resource): GroupHook = GroupHook(
javaResource as
com.pulumi.gitlab.GroupHook,
)
}
/**
* @see [GroupHook].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [GroupHook].
*/
public suspend fun groupHook(name: String, block: suspend GroupHookResourceBuilder.() -> Unit): GroupHook {
val builder = GroupHookResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [GroupHook].
* @param name The _unique_ name of the resulting resource.
*/
public fun groupHook(name: String): GroupHook {
val builder = GroupHookResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy