com.pulumi.gitlab.kotlin.GroupSamlLink.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [GroupSamlLink].
*/
@PulumiTagMarker
public class GroupSamlLinkResourceBuilder internal constructor() {
public var name: String? = null
public var args: GroupSamlLinkArgs = GroupSamlLinkArgs()
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 GroupSamlLinkArgsBuilder.() -> Unit) {
val builder = GroupSamlLinkArgsBuilder()
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(): GroupSamlLink {
val builtJavaResource = com.pulumi.gitlab.GroupSamlLink(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return GroupSamlLink(builtJavaResource)
}
}
/**
* The `gitlab.GroupSamlLink` resource allows to manage the lifecycle of an SAML integration with a group.
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#saml-group-links)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
* // Basic example
* const test = new gitlab.GroupSamlLink("test", {
* group: "12345",
* accessLevel: "developer",
* samlGroupName: "samlgroupname1",
* });
* // Example using a Custom Role (Ultimate only)
* const testCustomRole = new gitlab.GroupSamlLink("test_custom_role", {
* group: "12345",
* accessLevel: "developer",
* samlGroupName: "samlgroupname1",
* memberRoleId: 123,
* });
* ```
* ```python
* import pulumi
* import pulumi_gitlab as gitlab
* # Basic example
* test = gitlab.GroupSamlLink("test",
* group="12345",
* access_level="developer",
* saml_group_name="samlgroupname1")
* # Example using a Custom Role (Ultimate only)
* test_custom_role = gitlab.GroupSamlLink("test_custom_role",
* group="12345",
* access_level="developer",
* saml_group_name="samlgroupname1",
* member_role_id=123)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using GitLab = Pulumi.GitLab;
* return await Deployment.RunAsync(() =>
* {
* // Basic example
* var test = new GitLab.GroupSamlLink("test", new()
* {
* Group = "12345",
* AccessLevel = "developer",
* SamlGroupName = "samlgroupname1",
* });
* // Example using a Custom Role (Ultimate only)
* var testCustomRole = new GitLab.GroupSamlLink("test_custom_role", new()
* {
* Group = "12345",
* AccessLevel = "developer",
* SamlGroupName = "samlgroupname1",
* MemberRoleId = 123,
* });
* });
* ```
* ```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 {
* // Basic example
* _, err := gitlab.NewGroupSamlLink(ctx, "test", &gitlab.GroupSamlLinkArgs{
* Group: pulumi.String("12345"),
* AccessLevel: pulumi.String("developer"),
* SamlGroupName: pulumi.String("samlgroupname1"),
* })
* if err != nil {
* return err
* }
* // Example using a Custom Role (Ultimate only)
* _, err = gitlab.NewGroupSamlLink(ctx, "test_custom_role", &gitlab.GroupSamlLinkArgs{
* Group: pulumi.String("12345"),
* AccessLevel: pulumi.String("developer"),
* SamlGroupName: pulumi.String("samlgroupname1"),
* MemberRoleId: pulumi.Int(123),
* })
* 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.GroupSamlLink;
* import com.pulumi.gitlab.GroupSamlLinkArgs;
* 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) {
* // Basic example
* var test = new GroupSamlLink("test", GroupSamlLinkArgs.builder()
* .group("12345")
* .accessLevel("developer")
* .samlGroupName("samlgroupname1")
* .build());
* // Example using a Custom Role (Ultimate only)
* var testCustomRole = new GroupSamlLink("testCustomRole", GroupSamlLinkArgs.builder()
* .group("12345")
* .accessLevel("developer")
* .samlGroupName("samlgroupname1")
* .memberRoleId(123)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # Basic example
* test:
* type: gitlab:GroupSamlLink
* properties:
* group: '12345'
* accessLevel: developer
* samlGroupName: samlgroupname1
* # Example using a Custom Role (Ultimate only)
* testCustomRole:
* type: gitlab:GroupSamlLink
* name: test_custom_role
* properties:
* group: '12345'
* accessLevel: developer
* samlGroupName: samlgroupname1
* memberRoleId: 123
* ```
*
* ## Import
* GitLab group saml links can be imported using an id made up of `group_id:saml_group_name`, e.g.
* ```sh
* $ pulumi import gitlab:index/groupSamlLink:GroupSamlLink test "12345:samlgroupname1"
* ```
*/
public class GroupSamlLink internal constructor(
override val javaResource: com.pulumi.gitlab.GroupSamlLink,
) : KotlinCustomResource(javaResource, GroupSamlLinkMapper) {
/**
* Access level for members of the SAML group. Valid values are: `guest`, `reporter`, `developer`, `maintainer`, `owner`.
*/
public val accessLevel: Output
get() = javaResource.accessLevel().applyValue({ args0 -> args0 })
/**
* The ID or path of the group to add the SAML Group Link to.
*/
public val group: Output
get() = javaResource.group().applyValue({ args0 -> args0 })
/**
* The ID of a custom member role. Only available for Ultimate instances.
*/
public val memberRoleId: Output?
get() = javaResource.memberRoleId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the SAML group.
*/
public val samlGroupName: Output
get() = javaResource.samlGroupName().applyValue({ args0 -> args0 })
}
public object GroupSamlLinkMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gitlab.GroupSamlLink::class == javaResource::class
override fun map(javaResource: Resource): GroupSamlLink = GroupSamlLink(
javaResource as
com.pulumi.gitlab.GroupSamlLink,
)
}
/**
* @see [GroupSamlLink].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [GroupSamlLink].
*/
public suspend fun groupSamlLink(
name: String,
block: suspend GroupSamlLinkResourceBuilder.() -> Unit,
): GroupSamlLink {
val builder = GroupSamlLinkResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [GroupSamlLink].
* @param name The _unique_ name of the resulting resource.
*/
public fun groupSamlLink(name: String): GroupSamlLink {
val builder = GroupSamlLinkResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy