1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. getGroup
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

vault.identity.getGroup

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const group = vault.identity.getGroup({
        groupName: "user",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    group = vault.identity.get_group(group_name="user")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.LookupGroup(ctx, &identity.LookupGroupArgs{
    			GroupName: pulumi.StringRef("user"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var @group = Vault.Identity.GetGroup.Invoke(new()
        {
            GroupName = "user",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.IdentityFunctions;
    import com.pulumi.vault.identity.inputs.GetGroupArgs;
    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) {
            final var group = IdentityFunctions.getGroup(GetGroupArgs.builder()
                .groupName("user")
                .build());
    
        }
    }
    
    variables:
      group:
        fn::invoke:
          Function: vault:identity:getGroup
          Arguments:
            groupName: user
    

    Required Vault Capabilities

    Use of this resource requires the create capability on /identity/lookup/group.

    Using getGroup

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
    function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
    def get_group(alias_id: Optional[str] = None,
                  alias_mount_accessor: Optional[str] = None,
                  alias_name: Optional[str] = None,
                  group_id: Optional[str] = None,
                  group_name: Optional[str] = None,
                  namespace: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetGroupResult
    def get_group_output(alias_id: Optional[pulumi.Input[str]] = None,
                  alias_mount_accessor: Optional[pulumi.Input[str]] = None,
                  alias_name: Optional[pulumi.Input[str]] = None,
                  group_id: Optional[pulumi.Input[str]] = None,
                  group_name: Optional[pulumi.Input[str]] = None,
                  namespace: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
    func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
    func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput

    > Note: This function is named LookupGroup in the Go SDK.

    public static class GetGroup 
    {
        public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vault:identity/getGroup:getGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AliasId string
    ID of the alias.
    AliasMountAccessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

    The lookup criteria can be group_name, group_id, alias_id, or a combination of alias_name and alias_mount_accessor.

    AliasName string
    Name of the alias. This should be supplied in conjunction with alias_mount_accessor.
    GroupId string
    ID of the group.
    GroupName string
    Name of the group.
    Namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    AliasId string
    ID of the alias.
    AliasMountAccessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

    The lookup criteria can be group_name, group_id, alias_id, or a combination of alias_name and alias_mount_accessor.

    AliasName string
    Name of the alias. This should be supplied in conjunction with alias_mount_accessor.
    GroupId string
    ID of the group.
    GroupName string
    Name of the group.
    Namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    aliasId String
    ID of the alias.
    aliasMountAccessor String

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

    The lookup criteria can be group_name, group_id, alias_id, or a combination of alias_name and alias_mount_accessor.

    aliasName String
    Name of the alias. This should be supplied in conjunction with alias_mount_accessor.
    groupId String
    ID of the group.
    groupName String
    Name of the group.
    namespace String
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    aliasId string
    ID of the alias.
    aliasMountAccessor string

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

    The lookup criteria can be group_name, group_id, alias_id, or a combination of alias_name and alias_mount_accessor.

    aliasName string
    Name of the alias. This should be supplied in conjunction with alias_mount_accessor.
    groupId string
    ID of the group.
    groupName string
    Name of the group.
    namespace string
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    alias_id str
    ID of the alias.
    alias_mount_accessor str

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

    The lookup criteria can be group_name, group_id, alias_id, or a combination of alias_name and alias_mount_accessor.

    alias_name str
    Name of the alias. This should be supplied in conjunction with alias_mount_accessor.
    group_id str
    ID of the group.
    group_name str
    Name of the group.
    namespace str
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    aliasId String
    ID of the alias.
    aliasMountAccessor String

    Accessor of the mount to which the alias belongs to. This should be supplied in conjunction with alias_name.

    The lookup criteria can be group_name, group_id, alias_id, or a combination of alias_name and alias_mount_accessor.

    aliasName String
    Name of the alias. This should be supplied in conjunction with alias_mount_accessor.
    groupId String
    ID of the group.
    groupName String
    Name of the group.
    namespace String
    The namespace of the target resource. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

    getGroup Result

    The following output properties are available:

    AliasCanonicalId string
    Canonical ID of the Alias
    AliasCreationTime string
    Creation time of the Alias
    AliasId string
    AliasLastUpdateTime string
    Last update time of the alias
    AliasMergedFromCanonicalIds List<string>
    List of canonical IDs merged with this alias
    AliasMetadata Dictionary<string, object>
    Arbitrary metadata
    AliasMountAccessor string
    AliasMountPath string
    Authentication mount path which this alias belongs to
    AliasMountType string
    Authentication mount type which this alias belongs to
    AliasName string
    CreationTime string
    Creation timestamp of the group
    DataJson string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    GroupId string
    GroupName string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    Last updated time of the group
    MemberEntityIds List<string>
    List of Entity IDs which are members of this group
    MemberGroupIds List<string>
    List of Group IDs which are members of this group
    Metadata Dictionary<string, object>
    Arbitrary metadata
    ModifyIndex int
    Modify index of the group
    NamespaceId string
    Namespace of which the group is part of
    ParentGroupIds List<string>
    List of Group IDs which are parents of this group.
    Policies List<string>
    List of policies attached to the group
    Type string
    Type of group
    Namespace string
    AliasCanonicalId string
    Canonical ID of the Alias
    AliasCreationTime string
    Creation time of the Alias
    AliasId string
    AliasLastUpdateTime string
    Last update time of the alias
    AliasMergedFromCanonicalIds []string
    List of canonical IDs merged with this alias
    AliasMetadata map[string]interface{}
    Arbitrary metadata
    AliasMountAccessor string
    AliasMountPath string
    Authentication mount path which this alias belongs to
    AliasMountType string
    Authentication mount type which this alias belongs to
    AliasName string
    CreationTime string
    Creation timestamp of the group
    DataJson string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    GroupId string
    GroupName string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateTime string
    Last updated time of the group
    MemberEntityIds []string
    List of Entity IDs which are members of this group
    MemberGroupIds []string
    List of Group IDs which are members of this group
    Metadata map[string]interface{}
    Arbitrary metadata
    ModifyIndex int
    Modify index of the group
    NamespaceId string
    Namespace of which the group is part of
    ParentGroupIds []string
    List of Group IDs which are parents of this group.
    Policies []string
    List of policies attached to the group
    Type string
    Type of group
    Namespace string
    aliasCanonicalId String
    Canonical ID of the Alias
    aliasCreationTime String
    Creation time of the Alias
    aliasId String
    aliasLastUpdateTime String
    Last update time of the alias
    aliasMergedFromCanonicalIds List<String>
    List of canonical IDs merged with this alias
    aliasMetadata Map<String,Object>
    Arbitrary metadata
    aliasMountAccessor String
    aliasMountPath String
    Authentication mount path which this alias belongs to
    aliasMountType String
    Authentication mount type which this alias belongs to
    aliasName String
    creationTime String
    Creation timestamp of the group
    dataJson String
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    groupId String
    groupName String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    Last updated time of the group
    memberEntityIds List<String>
    List of Entity IDs which are members of this group
    memberGroupIds List<String>
    List of Group IDs which are members of this group
    metadata Map<String,Object>
    Arbitrary metadata
    modifyIndex Integer
    Modify index of the group
    namespaceId String
    Namespace of which the group is part of
    parentGroupIds List<String>
    List of Group IDs which are parents of this group.
    policies List<String>
    List of policies attached to the group
    type String
    Type of group
    namespace String
    aliasCanonicalId string
    Canonical ID of the Alias
    aliasCreationTime string
    Creation time of the Alias
    aliasId string
    aliasLastUpdateTime string
    Last update time of the alias
    aliasMergedFromCanonicalIds string[]
    List of canonical IDs merged with this alias
    aliasMetadata {[key: string]: any}
    Arbitrary metadata
    aliasMountAccessor string
    aliasMountPath string
    Authentication mount path which this alias belongs to
    aliasMountType string
    Authentication mount type which this alias belongs to
    aliasName string
    creationTime string
    Creation timestamp of the group
    dataJson string
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    groupId string
    groupName string
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime string
    Last updated time of the group
    memberEntityIds string[]
    List of Entity IDs which are members of this group
    memberGroupIds string[]
    List of Group IDs which are members of this group
    metadata {[key: string]: any}
    Arbitrary metadata
    modifyIndex number
    Modify index of the group
    namespaceId string
    Namespace of which the group is part of
    parentGroupIds string[]
    List of Group IDs which are parents of this group.
    policies string[]
    List of policies attached to the group
    type string
    Type of group
    namespace string
    alias_canonical_id str
    Canonical ID of the Alias
    alias_creation_time str
    Creation time of the Alias
    alias_id str
    alias_last_update_time str
    Last update time of the alias
    alias_merged_from_canonical_ids Sequence[str]
    List of canonical IDs merged with this alias
    alias_metadata Mapping[str, Any]
    Arbitrary metadata
    alias_mount_accessor str
    alias_mount_path str
    Authentication mount path which this alias belongs to
    alias_mount_type str
    Authentication mount type which this alias belongs to
    alias_name str
    creation_time str
    Creation timestamp of the group
    data_json str
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    group_id str
    group_name str
    id str
    The provider-assigned unique ID for this managed resource.
    last_update_time str
    Last updated time of the group
    member_entity_ids Sequence[str]
    List of Entity IDs which are members of this group
    member_group_ids Sequence[str]
    List of Group IDs which are members of this group
    metadata Mapping[str, Any]
    Arbitrary metadata
    modify_index int
    Modify index of the group
    namespace_id str
    Namespace of which the group is part of
    parent_group_ids Sequence[str]
    List of Group IDs which are parents of this group.
    policies Sequence[str]
    List of policies attached to the group
    type str
    Type of group
    namespace str
    aliasCanonicalId String
    Canonical ID of the Alias
    aliasCreationTime String
    Creation time of the Alias
    aliasId String
    aliasLastUpdateTime String
    Last update time of the alias
    aliasMergedFromCanonicalIds List<String>
    List of canonical IDs merged with this alias
    aliasMetadata Map<Any>
    Arbitrary metadata
    aliasMountAccessor String
    aliasMountPath String
    Authentication mount path which this alias belongs to
    aliasMountType String
    Authentication mount type which this alias belongs to
    aliasName String
    creationTime String
    Creation timestamp of the group
    dataJson String
    A string containing the full data payload retrieved from Vault, serialized in JSON format.
    groupId String
    groupName String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateTime String
    Last updated time of the group
    memberEntityIds List<String>
    List of Entity IDs which are members of this group
    memberGroupIds List<String>
    List of Group IDs which are members of this group
    metadata Map<Any>
    Arbitrary metadata
    modifyIndex Number
    Modify index of the group
    namespaceId String
    Namespace of which the group is part of
    parentGroupIds List<String>
    List of Group IDs which are parents of this group.
    policies List<String>
    List of policies attached to the group
    type String
    Type of group
    namespace String

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi