1. Packages
  2. StrongDM
  3. API Docs
  4. getAccountGroup
StrongDM v1.32.0 published on Monday, Oct 13, 2025 by Piers Karsenbarg

sdm.getAccountGroup

Deploy with Pulumi
sdm logo
StrongDM v1.32.0 published on Monday, Oct 13, 2025 by Piers Karsenbarg

    An AccountGroup is a link between an Account and a Group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sdm from "@pierskarsenbarg/sdm";
    
    const securityLeadGroups = sdm.getAccountGroup({
        accountId: sdm_account.security_lead.id,
    });
    const specificRelationship = sdm.getAccountGroup({
        id: "accountgroup-1234567890abcdef",
    });
    const usersInGroup = sdm.getAccountGroup({
        groupId: sdm_group.devops_group.id,
    });
    
    import pulumi
    import pulumi_sdm as sdm
    
    security_lead_groups = sdm.get_account_group(account_id=sdm_account["security_lead"]["id"])
    specific_relationship = sdm.get_account_group(id="accountgroup-1234567890abcdef")
    users_in_group = sdm.get_account_group(group_id=sdm_group["devops_group"]["id"])
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-sdm/sdk/go/sdm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sdm.LookupAccountGroup(ctx, &sdm.LookupAccountGroupArgs{
    			AccountId: pulumi.StringRef(sdm_account.Security_lead.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = sdm.LookupAccountGroup(ctx, &sdm.LookupAccountGroupArgs{
    			Id: pulumi.StringRef("accountgroup-1234567890abcdef"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = sdm.LookupAccountGroup(ctx, &sdm.LookupAccountGroupArgs{
    			GroupId: pulumi.StringRef(sdm_group.Devops_group.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sdm = Pulumi.Sdm;
    
    return await Deployment.RunAsync(() => 
    {
        var securityLeadGroups = Sdm.GetAccountGroup.Invoke(new()
        {
            AccountId = sdm_account.Security_lead.Id,
        });
    
        var specificRelationship = Sdm.GetAccountGroup.Invoke(new()
        {
            Id = "accountgroup-1234567890abcdef",
        });
    
        var usersInGroup = Sdm.GetAccountGroup.Invoke(new()
        {
            GroupId = sdm_group.Devops_group.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sdm.SdmFunctions;
    import com.pulumi.sdm.inputs.GetAccountGroupArgs;
    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 securityLeadGroups = SdmFunctions.getAccountGroup(GetAccountGroupArgs.builder()
                .accountId(sdm_account.security_lead().id())
                .build());
    
            final var specificRelationship = SdmFunctions.getAccountGroup(GetAccountGroupArgs.builder()
                .id("accountgroup-1234567890abcdef")
                .build());
    
            final var usersInGroup = SdmFunctions.getAccountGroup(GetAccountGroupArgs.builder()
                .groupId(sdm_group.devops_group().id())
                .build());
    
        }
    }
    
    variables:
      securityLeadGroups:
        fn::invoke:
          function: sdm:getAccountGroup
          arguments:
            accountId: ${sdm_account.security_lead.id}
      specificRelationship:
        fn::invoke:
          function: sdm:getAccountGroup
          arguments:
            id: accountgroup-1234567890abcdef
      usersInGroup:
        fn::invoke:
          function: sdm:getAccountGroup
          arguments:
            groupId: ${sdm_group.devops_group.id}
    

    Using getAccountGroup

    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 getAccountGroup(args: GetAccountGroupArgs, opts?: InvokeOptions): Promise<GetAccountGroupResult>
    function getAccountGroupOutput(args: GetAccountGroupOutputArgs, opts?: InvokeOptions): Output<GetAccountGroupResult>
    def get_account_group(account_id: Optional[str] = None,
                          group_id: Optional[str] = None,
                          id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetAccountGroupResult
    def get_account_group_output(account_id: Optional[pulumi.Input[str]] = None,
                          group_id: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetAccountGroupResult]
    func LookupAccountGroup(ctx *Context, args *LookupAccountGroupArgs, opts ...InvokeOption) (*LookupAccountGroupResult, error)
    func LookupAccountGroupOutput(ctx *Context, args *LookupAccountGroupOutputArgs, opts ...InvokeOption) LookupAccountGroupResultOutput

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

    public static class GetAccountGroup 
    {
        public static Task<GetAccountGroupResult> InvokeAsync(GetAccountGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountGroupResult> Invoke(GetAccountGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountGroupResult> getAccountGroup(GetAccountGroupArgs args, InvokeOptions options)
    public static Output<GetAccountGroupResult> getAccountGroup(GetAccountGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: sdm:index/getAccountGroup:getAccountGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Unique identifier of the Account.
    GroupId string
    Unique identifier of the Group.
    Id string
    Unique identifier of the AccountGroup.
    AccountId string
    Unique identifier of the Account.
    GroupId string
    Unique identifier of the Group.
    Id string
    Unique identifier of the AccountGroup.
    accountId String
    Unique identifier of the Account.
    groupId String
    Unique identifier of the Group.
    id String
    Unique identifier of the AccountGroup.
    accountId string
    Unique identifier of the Account.
    groupId string
    Unique identifier of the Group.
    id string
    Unique identifier of the AccountGroup.
    account_id str
    Unique identifier of the Account.
    group_id str
    Unique identifier of the Group.
    id str
    Unique identifier of the AccountGroup.
    accountId String
    Unique identifier of the Account.
    groupId String
    Unique identifier of the Group.
    id String
    Unique identifier of the AccountGroup.

    getAccountGroup Result

    The following output properties are available:

    AccountsGroups List<PiersKarsenbarg.Sdm.Outputs.GetAccountGroupAccountsGroup>
    A list where each element has the following attributes:
    Ids List<string>
    a list of strings of ids of data sources that match the given arguments.
    AccountId string
    Unique identifier of the Account.
    GroupId string
    Unique identifier of the Group.
    Id string
    Unique identifier of the AccountGroup.
    AccountsGroups []GetAccountGroupAccountsGroup
    A list where each element has the following attributes:
    Ids []string
    a list of strings of ids of data sources that match the given arguments.
    AccountId string
    Unique identifier of the Account.
    GroupId string
    Unique identifier of the Group.
    Id string
    Unique identifier of the AccountGroup.
    accountsGroups List<GetAccountGroupAccountsGroup>
    A list where each element has the following attributes:
    ids List<String>
    a list of strings of ids of data sources that match the given arguments.
    accountId String
    Unique identifier of the Account.
    groupId String
    Unique identifier of the Group.
    id String
    Unique identifier of the AccountGroup.
    accountsGroups GetAccountGroupAccountsGroup[]
    A list where each element has the following attributes:
    ids string[]
    a list of strings of ids of data sources that match the given arguments.
    accountId string
    Unique identifier of the Account.
    groupId string
    Unique identifier of the Group.
    id string
    Unique identifier of the AccountGroup.
    accounts_groups Sequence[GetAccountGroupAccountsGroup]
    A list where each element has the following attributes:
    ids Sequence[str]
    a list of strings of ids of data sources that match the given arguments.
    account_id str
    Unique identifier of the Account.
    group_id str
    Unique identifier of the Group.
    id str
    Unique identifier of the AccountGroup.
    accountsGroups List<Property Map>
    A list where each element has the following attributes:
    ids List<String>
    a list of strings of ids of data sources that match the given arguments.
    accountId String
    Unique identifier of the Account.
    groupId String
    Unique identifier of the Group.
    id String
    Unique identifier of the AccountGroup.

    Supporting Types

    GetAccountGroupAccountsGroup

    AccountId string
    Unique identifier of the Account.
    GroupId string
    Unique identifier of the Group.
    Id string
    Unique identifier of the AccountGroup.
    AccountId string
    Unique identifier of the Account.
    GroupId string
    Unique identifier of the Group.
    Id string
    Unique identifier of the AccountGroup.
    accountId String
    Unique identifier of the Account.
    groupId String
    Unique identifier of the Group.
    id String
    Unique identifier of the AccountGroup.
    accountId string
    Unique identifier of the Account.
    groupId string
    Unique identifier of the Group.
    id string
    Unique identifier of the AccountGroup.
    account_id str
    Unique identifier of the Account.
    group_id str
    Unique identifier of the Group.
    id str
    Unique identifier of the AccountGroup.
    accountId String
    Unique identifier of the Account.
    groupId String
    Unique identifier of the Group.
    id String
    Unique identifier of the AccountGroup.

    Package Details

    Repository
    sdm pierskarsenbarg/pulumi-sdm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sdm Terraform Provider.
    sdm logo
    StrongDM v1.32.0 published on Monday, Oct 13, 2025 by Piers Karsenbarg
      Meet Neo: Your AI Platform Teammate