Show / Hide Table of Contents

Class Group

# keycloak..Group

Allows for creating and managing Groups within Keycloak.

Groups provide a logical wrapping for users within Keycloak. Users within a group can share attributes and roles, and group membership can be mapped to a claim.

Attributes can also be defined on Groups.

Groups can also be federated from external data sources, such as LDAP or Active Directory. This resource should not be used to manage groups that were created this way.

Example Usage

using Pulumi;
using Keycloak = Pulumi.Keycloak;

class MyStack : Stack
{
public MyStack()
{
    var realm = new Keycloak.Realm("realm", new Keycloak.RealmArgs
    {
        Enabled = true,
        Realm = "my-realm",
    });
    var parentGroup = new Keycloak.Group("parentGroup", new Keycloak.GroupArgs
    {
        RealmId = realm.Id,
    });
    var childGroup = new Keycloak.Group("childGroup", new Keycloak.GroupArgs
    {
        ParentId = parentGroup.Id,
        RealmId = realm.Id,
    });
    var childGroupWithOptionalAttributes = new Keycloak.Group("childGroupWithOptionalAttributes", new Keycloak.GroupArgs
    {
        Attributes = 
        {
            { "key1", "value1" },
            { "key2", "value2" },
        },
        ParentId = parentGroup.Id,
        RealmId = realm.Id,
    });
}

}

Argument Reference

The following arguments are supported:

  • realm_id - (Required) The realm this group exists in.
  • parent_id - (Optional) The ID of this group's parent. If omitted, this group will be defined at the root level.
  • name - (Required) The name of the group.
  • attributes - (Optional) A dict of key/value pairs to set as custom attributes for the group.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • path - The complete path of the group. For example, the child group's path in the example configuration would be /parent-group/child-group.
Inheritance
System.Object
Resource
CustomResource
Group
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Keycloak
Assembly: Pulumi.Keycloak.dll
Syntax
public class Group : CustomResource

Constructors

View Source

Group(String, GroupArgs, CustomResourceOptions)

Create a Group resource with the given unique name, arguments, and options.

Declaration
public Group(string name, GroupArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

GroupArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Attributes

Declaration
public Output<ImmutableDictionary<string, object>> Attributes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Name

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ParentId

Declaration
public Output<string> ParentId { get; }
Property Value
Type Description
Output<System.String>
View Source

Path

Declaration
public Output<string> Path { get; }
Property Value
Type Description
Output<System.String>
View Source

RealmId

Declaration
public Output<string> RealmId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, GroupState, CustomResourceOptions)

Get an existing Group resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Group Get(string name, Input<string> id, GroupState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

GroupState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Group
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.