1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getBhAccountGroups
tencentcloud 1.82.50 published on Tuesday, Dec 30, 2025 by tencentcloudstack
tencentcloud logo
tencentcloud 1.82.50 published on Tuesday, Dec 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of BH account groups

    Example Usage

    Query all bh account groups

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getBhAccountGroups({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_bh_account_groups()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetBhAccountGroups(ctx, &tencentcloud.GetBhAccountGroupsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetBhAccountGroups.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetBhAccountGroupsArgs;
    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 example = TencentcloudFunctions.getBhAccountGroups(GetBhAccountGroupsArgs.builder()
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getBhAccountGroups
          arguments: {}
    

    Query bh account groups by filter

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getBhAccountGroups({
        deepIn: 1,
        parentId: 819729,
        groupName: "tf-example",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_bh_account_groups(deep_in=1,
        parent_id=819729,
        group_name="tf-example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetBhAccountGroups(ctx, &tencentcloud.GetBhAccountGroupsArgs{
    			DeepIn:    pulumi.Float64Ref(1),
    			ParentId:  pulumi.Float64Ref(819729),
    			GroupName: pulumi.StringRef("tf-example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetBhAccountGroups.Invoke(new()
        {
            DeepIn = 1,
            ParentId = 819729,
            GroupName = "tf-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetBhAccountGroupsArgs;
    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 example = TencentcloudFunctions.getBhAccountGroups(GetBhAccountGroupsArgs.builder()
                .deepIn(1)
                .parentId(819729)
                .groupName("tf-example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getBhAccountGroups
          arguments:
            deepIn: 1
            parentId: 819729
            groupName: tf-example
    

    Using getBhAccountGroups

    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 getBhAccountGroups(args: GetBhAccountGroupsArgs, opts?: InvokeOptions): Promise<GetBhAccountGroupsResult>
    function getBhAccountGroupsOutput(args: GetBhAccountGroupsOutputArgs, opts?: InvokeOptions): Output<GetBhAccountGroupsResult>
    def get_bh_account_groups(deep_in: Optional[float] = None,
                              group_name: Optional[str] = None,
                              id: Optional[str] = None,
                              page_num: Optional[float] = None,
                              parent_id: Optional[float] = None,
                              result_output_file: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetBhAccountGroupsResult
    def get_bh_account_groups_output(deep_in: Optional[pulumi.Input[float]] = None,
                              group_name: Optional[pulumi.Input[str]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              page_num: Optional[pulumi.Input[float]] = None,
                              parent_id: Optional[pulumi.Input[float]] = None,
                              result_output_file: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetBhAccountGroupsResult]
    func GetBhAccountGroups(ctx *Context, args *GetBhAccountGroupsArgs, opts ...InvokeOption) (*GetBhAccountGroupsResult, error)
    func GetBhAccountGroupsOutput(ctx *Context, args *GetBhAccountGroupsOutputArgs, opts ...InvokeOption) GetBhAccountGroupsResultOutput

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

    public static class GetBhAccountGroups 
    {
        public static Task<GetBhAccountGroupsResult> InvokeAsync(GetBhAccountGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetBhAccountGroupsResult> Invoke(GetBhAccountGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBhAccountGroupsResult> getBhAccountGroups(GetBhAccountGroupsArgs args, InvokeOptions options)
    public static Output<GetBhAccountGroupsResult> getBhAccountGroups(GetBhAccountGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getBhAccountGroups:getBhAccountGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeepIn double
    Whether to recursively query, 0 for non-recursive, 1 for recursive.
    GroupName string
    Account group name, fuzzy query.
    Id string
    Account group ID.
    PageNum double
    Get data from which page.
    ParentId double
    Parent account group ID, default 0, query all groups under the root account group.
    ResultOutputFile string
    Used to save results.
    DeepIn float64
    Whether to recursively query, 0 for non-recursive, 1 for recursive.
    GroupName string
    Account group name, fuzzy query.
    Id string
    Account group ID.
    PageNum float64
    Get data from which page.
    ParentId float64
    Parent account group ID, default 0, query all groups under the root account group.
    ResultOutputFile string
    Used to save results.
    deepIn Double
    Whether to recursively query, 0 for non-recursive, 1 for recursive.
    groupName String
    Account group name, fuzzy query.
    id String
    Account group ID.
    pageNum Double
    Get data from which page.
    parentId Double
    Parent account group ID, default 0, query all groups under the root account group.
    resultOutputFile String
    Used to save results.
    deepIn number
    Whether to recursively query, 0 for non-recursive, 1 for recursive.
    groupName string
    Account group name, fuzzy query.
    id string
    Account group ID.
    pageNum number
    Get data from which page.
    parentId number
    Parent account group ID, default 0, query all groups under the root account group.
    resultOutputFile string
    Used to save results.
    deep_in float
    Whether to recursively query, 0 for non-recursive, 1 for recursive.
    group_name str
    Account group name, fuzzy query.
    id str
    Account group ID.
    page_num float
    Get data from which page.
    parent_id float
    Parent account group ID, default 0, query all groups under the root account group.
    result_output_file str
    Used to save results.
    deepIn Number
    Whether to recursively query, 0 for non-recursive, 1 for recursive.
    groupName String
    Account group name, fuzzy query.
    id String
    Account group ID.
    pageNum Number
    Get data from which page.
    parentId Number
    Parent account group ID, default 0, query all groups under the root account group.
    resultOutputFile String
    Used to save results.

    getBhAccountGroups Result

    The following output properties are available:

    AccountGroupSets List<GetBhAccountGroupsAccountGroupSet>
    Account group information.
    Id string
    Account group ID.
    DeepIn double
    GroupName string
    PageNum double
    ParentId double
    Parent account group ID.
    ResultOutputFile string
    AccountGroupSets []GetBhAccountGroupsAccountGroupSet
    Account group information.
    Id string
    Account group ID.
    DeepIn float64
    GroupName string
    PageNum float64
    ParentId float64
    Parent account group ID.
    ResultOutputFile string
    accountGroupSets List<GetBhAccountGroupsAccountGroupSet>
    Account group information.
    id String
    Account group ID.
    deepIn Double
    groupName String
    pageNum Double
    parentId Double
    Parent account group ID.
    resultOutputFile String
    accountGroupSets GetBhAccountGroupsAccountGroupSet[]
    Account group information.
    id string
    Account group ID.
    deepIn number
    groupName string
    pageNum number
    parentId number
    Parent account group ID.
    resultOutputFile string
    account_group_sets Sequence[GetBhAccountGroupsAccountGroupSet]
    Account group information.
    id str
    Account group ID.
    deep_in float
    group_name str
    page_num float
    parent_id float
    Parent account group ID.
    result_output_file str
    accountGroupSets List<Property Map>
    Account group information.
    id String
    Account group ID.
    deepIn Number
    groupName String
    pageNum Number
    parentId Number
    Parent account group ID.
    resultOutputFile String

    Supporting Types

    GetBhAccountGroupsAccountGroupSet

    Description string
    Account group description.
    Id double
    Account group ID.
    IdPath string
    Account group ID path.
    ImportType string
    Account group import type.
    IsLeaf bool
    Whether it is a leaf node.
    Name string
    Account group name.
    NamePath string
    Account group name path.
    OrgId string
    Source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    ParentId double
    Parent account group ID, default 0, query all groups under the root account group.
    ParentOrgId string
    Parent source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    Source double
    Account group source.
    Status double
    Whether the account group has been connected, 0 means not connected, 1 means connected.
    UserTotal double
    Total number of users under the account group.
    Description string
    Account group description.
    Id float64
    Account group ID.
    IdPath string
    Account group ID path.
    ImportType string
    Account group import type.
    IsLeaf bool
    Whether it is a leaf node.
    Name string
    Account group name.
    NamePath string
    Account group name path.
    OrgId string
    Source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    ParentId float64
    Parent account group ID, default 0, query all groups under the root account group.
    ParentOrgId string
    Parent source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    Source float64
    Account group source.
    Status float64
    Whether the account group has been connected, 0 means not connected, 1 means connected.
    UserTotal float64
    Total number of users under the account group.
    description String
    Account group description.
    id Double
    Account group ID.
    idPath String
    Account group ID path.
    importType String
    Account group import type.
    isLeaf Boolean
    Whether it is a leaf node.
    name String
    Account group name.
    namePath String
    Account group name path.
    orgId String
    Source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    parentId Double
    Parent account group ID, default 0, query all groups under the root account group.
    parentOrgId String
    Parent source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    source Double
    Account group source.
    status Double
    Whether the account group has been connected, 0 means not connected, 1 means connected.
    userTotal Double
    Total number of users under the account group.
    description string
    Account group description.
    id number
    Account group ID.
    idPath string
    Account group ID path.
    importType string
    Account group import type.
    isLeaf boolean
    Whether it is a leaf node.
    name string
    Account group name.
    namePath string
    Account group name path.
    orgId string
    Source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    parentId number
    Parent account group ID, default 0, query all groups under the root account group.
    parentOrgId string
    Parent source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    source number
    Account group source.
    status number
    Whether the account group has been connected, 0 means not connected, 1 means connected.
    userTotal number
    Total number of users under the account group.
    description str
    Account group description.
    id float
    Account group ID.
    id_path str
    Account group ID path.
    import_type str
    Account group import type.
    is_leaf bool
    Whether it is a leaf node.
    name str
    Account group name.
    name_path str
    Account group name path.
    org_id str
    Source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    parent_id float
    Parent account group ID, default 0, query all groups under the root account group.
    parent_org_id str
    Parent source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    source float
    Account group source.
    status float
    Whether the account group has been connected, 0 means not connected, 1 means connected.
    user_total float
    Total number of users under the account group.
    description String
    Account group description.
    id Number
    Account group ID.
    idPath String
    Account group ID path.
    importType String
    Account group import type.
    isLeaf Boolean
    Whether it is a leaf node.
    name String
    Account group name.
    namePath String
    Account group name path.
    orgId String
    Source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    parentId Number
    Parent account group ID, default 0, query all groups under the root account group.
    parentOrgId String
    Parent source account organization ID. When using third-party import user sources, record the group ID of this group in the source organization structure.
    source Number
    Account group source.
    status Number
    Whether the account group has been connected, 0 means not connected, 1 means connected.
    userTotal Number
    Total number of users under the account group.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.82.50 published on Tuesday, Dec 30, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate