gitlab.GroupSamlLink
Explore with Pulumi AI
The gitlab.GroupSamlLink
resource allows to manage the lifecycle of an SAML integration with a group.
Upstream API: GitLab REST API docs
Example Usage
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)
// When using the custom role, the `access_level` must match the
// base role used to create the custom role.
const testCustomRole = new gitlab.GroupSamlLink("test_custom_role", {
group: "12345",
accessLevel: "developer",
samlGroupName: "samlgroupname1",
memberRoleId: 123,
});
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)
# When using the custom role, the `access_level` must match the
# base role used to create the custom role.
test_custom_role = gitlab.GroupSamlLink("test_custom_role",
group="12345",
access_level="developer",
saml_group_name="samlgroupname1",
member_role_id=123)
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)
// When using the custom role, the `access_level` must match the
// base role used to create the custom role.
_, 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
})
}
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)
// When using the custom role, the `access_level` must match the
// base role used to create the custom role.
var testCustomRole = new GitLab.GroupSamlLink("test_custom_role", new()
{
Group = "12345",
AccessLevel = "developer",
SamlGroupName = "samlgroupname1",
MemberRoleId = 123,
});
});
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)
// When using the custom role, the `access_level` must match the
// base role used to create the custom role.
var testCustomRole = new GroupSamlLink("testCustomRole", GroupSamlLinkArgs.builder()
.group("12345")
.accessLevel("developer")
.samlGroupName("samlgroupname1")
.memberRoleId(123)
.build());
}
}
resources:
# Basic example
test:
type: gitlab:GroupSamlLink
properties:
group: '12345'
accessLevel: developer
samlGroupName: samlgroupname1
# Example using a Custom Role (Ultimate only)
# When using the custom role, the `access_level` must match the
# base role used to create the custom role.
testCustomRole:
type: gitlab:GroupSamlLink
name: test_custom_role
properties:
group: '12345'
accessLevel: developer
samlGroupName: samlgroupname1
memberRoleId: 123
Create GroupSamlLink Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GroupSamlLink(name: string, args: GroupSamlLinkArgs, opts?: CustomResourceOptions);
@overload
def GroupSamlLink(resource_name: str,
args: GroupSamlLinkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GroupSamlLink(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_level: Optional[str] = None,
group: Optional[str] = None,
saml_group_name: Optional[str] = None,
member_role_id: Optional[int] = None)
func NewGroupSamlLink(ctx *Context, name string, args GroupSamlLinkArgs, opts ...ResourceOption) (*GroupSamlLink, error)
public GroupSamlLink(string name, GroupSamlLinkArgs args, CustomResourceOptions? opts = null)
public GroupSamlLink(String name, GroupSamlLinkArgs args)
public GroupSamlLink(String name, GroupSamlLinkArgs args, CustomResourceOptions options)
type: gitlab:GroupSamlLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GroupSamlLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GroupSamlLinkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GroupSamlLinkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupSamlLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupSamlLinkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var groupSamlLinkResource = new GitLab.GroupSamlLink("groupSamlLinkResource", new()
{
AccessLevel = "string",
Group = "string",
SamlGroupName = "string",
MemberRoleId = 0,
});
example, err := gitlab.NewGroupSamlLink(ctx, "groupSamlLinkResource", &gitlab.GroupSamlLinkArgs{
AccessLevel: pulumi.String("string"),
Group: pulumi.String("string"),
SamlGroupName: pulumi.String("string"),
MemberRoleId: pulumi.Int(0),
})
var groupSamlLinkResource = new GroupSamlLink("groupSamlLinkResource", GroupSamlLinkArgs.builder()
.accessLevel("string")
.group("string")
.samlGroupName("string")
.memberRoleId(0)
.build());
group_saml_link_resource = gitlab.GroupSamlLink("groupSamlLinkResource",
access_level="string",
group="string",
saml_group_name="string",
member_role_id=0)
const groupSamlLinkResource = new gitlab.GroupSamlLink("groupSamlLinkResource", {
accessLevel: "string",
group: "string",
samlGroupName: "string",
memberRoleId: 0,
});
type: gitlab:GroupSamlLink
properties:
accessLevel: string
group: string
memberRoleId: 0
samlGroupName: string
GroupSamlLink Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GroupSamlLink resource accepts the following input properties:
- Access
Level string - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - Group string
- The ID or path of the group to add the SAML Group Link to.
- Saml
Group stringName - The name of the SAML group.
- Member
Role intId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role.
- Access
Level string - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - Group string
- The ID or path of the group to add the SAML Group Link to.
- Saml
Group stringName - The name of the SAML group.
- Member
Role intId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role.
- access
Level String - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group String
- The ID or path of the group to add the SAML Group Link to.
- saml
Group StringName - The name of the SAML group.
- member
Role IntegerId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role.
- access
Level string - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group string
- The ID or path of the group to add the SAML Group Link to.
- saml
Group stringName - The name of the SAML group.
- member
Role numberId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role.
- access_
level str - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group str
- The ID or path of the group to add the SAML Group Link to.
- saml_
group_ strname - The name of the SAML group.
- member_
role_ intid - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role.
- access
Level String - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group String
- The ID or path of the group to add the SAML Group Link to.
- saml
Group StringName - The name of the SAML group.
- member
Role NumberId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role.
Outputs
All input properties are implicitly available as output properties. Additionally, the GroupSamlLink resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GroupSamlLink Resource
Get an existing GroupSamlLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GroupSamlLinkState, opts?: CustomResourceOptions): GroupSamlLink
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_level: Optional[str] = None,
group: Optional[str] = None,
member_role_id: Optional[int] = None,
saml_group_name: Optional[str] = None) -> GroupSamlLink
func GetGroupSamlLink(ctx *Context, name string, id IDInput, state *GroupSamlLinkState, opts ...ResourceOption) (*GroupSamlLink, error)
public static GroupSamlLink Get(string name, Input<string> id, GroupSamlLinkState? state, CustomResourceOptions? opts = null)
public static GroupSamlLink get(String name, Output<String> id, GroupSamlLinkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Level string - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - Group string
- The ID or path of the group to add the SAML Group Link to.
- Member
Role intId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role. - Saml
Group stringName - The name of the SAML group.
- Access
Level string - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - Group string
- The ID or path of the group to add the SAML Group Link to.
- Member
Role intId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role. - Saml
Group stringName - The name of the SAML group.
- access
Level String - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group String
- The ID or path of the group to add the SAML Group Link to.
- member
Role IntegerId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role. - saml
Group StringName - The name of the SAML group.
- access
Level string - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group string
- The ID or path of the group to add the SAML Group Link to.
- member
Role numberId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role. - saml
Group stringName - The name of the SAML group.
- access_
level str - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group str
- The ID or path of the group to add the SAML Group Link to.
- member_
role_ intid - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role. - saml_
group_ strname - The name of the SAML group.
- access
Level String - Access level for members of the SAML group. Valid values are:
guest
,reporter
,developer
,maintainer
,owner
. - group String
- The ID or path of the group to add the SAML Group Link to.
- member
Role NumberId - The ID of a custom member role. Only available for Ultimate instances. When using a custom role, the
access_level
must match the base role used to create the custom role. - saml
Group StringName - The name of the SAML group.
Import
GitLab group saml links can be imported using an id made up of group_id:saml_group_name
, e.g.
$ pulumi import gitlab:index/groupSamlLink:GroupSamlLink test "12345:samlgroupname1"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.