1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. BhUserDirectory
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

    Provides a resource to create a BH user directory

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.BhUserDirectory("example", {
        dirId: 895784,
        dirName: "tf-example",
        userOrgSets: [
            {
                orgId: 1576799,
                orgName: "orgName1",
                orgIdPath: "819729.895784",
                orgNamePath: "Root.demo1",
                userTotal: 0,
            },
            {
                orgId: 896536,
                orgName: "orgName2",
                orgIdPath: "819729.895784.896536",
                orgNamePath: "Root.demo2.demo3",
                userTotal: 1,
            },
        ],
        source: 0,
        sourceName: "sourceName",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.BhUserDirectory("example",
        dir_id=895784,
        dir_name="tf-example",
        user_org_sets=[
            {
                "org_id": 1576799,
                "org_name": "orgName1",
                "org_id_path": "819729.895784",
                "org_name_path": "Root.demo1",
                "user_total": 0,
            },
            {
                "org_id": 896536,
                "org_name": "orgName2",
                "org_id_path": "819729.895784.896536",
                "org_name_path": "Root.demo2.demo3",
                "user_total": 1,
            },
        ],
        source=0,
        source_name="sourceName")
    
    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.NewBhUserDirectory(ctx, "example", &tencentcloud.BhUserDirectoryArgs{
    			DirId:   pulumi.Float64(895784),
    			DirName: pulumi.String("tf-example"),
    			UserOrgSets: tencentcloud.BhUserDirectoryUserOrgSetArray{
    				&tencentcloud.BhUserDirectoryUserOrgSetArgs{
    					OrgId:       pulumi.Float64(1576799),
    					OrgName:     pulumi.String("orgName1"),
    					OrgIdPath:   pulumi.String("819729.895784"),
    					OrgNamePath: pulumi.String("Root.demo1"),
    					UserTotal:   pulumi.Float64(0),
    				},
    				&tencentcloud.BhUserDirectoryUserOrgSetArgs{
    					OrgId:       pulumi.Float64(896536),
    					OrgName:     pulumi.String("orgName2"),
    					OrgIdPath:   pulumi.String("819729.895784.896536"),
    					OrgNamePath: pulumi.String("Root.demo2.demo3"),
    					UserTotal:   pulumi.Float64(1),
    				},
    			},
    			Source:     pulumi.Float64(0),
    			SourceName: pulumi.String("sourceName"),
    		})
    		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 = new Tencentcloud.BhUserDirectory("example", new()
        {
            DirId = 895784,
            DirName = "tf-example",
            UserOrgSets = new[]
            {
                new Tencentcloud.Inputs.BhUserDirectoryUserOrgSetArgs
                {
                    OrgId = 1576799,
                    OrgName = "orgName1",
                    OrgIdPath = "819729.895784",
                    OrgNamePath = "Root.demo1",
                    UserTotal = 0,
                },
                new Tencentcloud.Inputs.BhUserDirectoryUserOrgSetArgs
                {
                    OrgId = 896536,
                    OrgName = "orgName2",
                    OrgIdPath = "819729.895784.896536",
                    OrgNamePath = "Root.demo2.demo3",
                    UserTotal = 1,
                },
            },
            Source = 0,
            SourceName = "sourceName",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.BhUserDirectory;
    import com.pulumi.tencentcloud.BhUserDirectoryArgs;
    import com.pulumi.tencentcloud.inputs.BhUserDirectoryUserOrgSetArgs;
    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) {
            var example = new BhUserDirectory("example", BhUserDirectoryArgs.builder()
                .dirId(895784.0)
                .dirName("tf-example")
                .userOrgSets(            
                    BhUserDirectoryUserOrgSetArgs.builder()
                        .orgId(1576799.0)
                        .orgName("orgName1")
                        .orgIdPath("819729.895784")
                        .orgNamePath("Root.demo1")
                        .userTotal(0.0)
                        .build(),
                    BhUserDirectoryUserOrgSetArgs.builder()
                        .orgId(896536.0)
                        .orgName("orgName2")
                        .orgIdPath("819729.895784.896536")
                        .orgNamePath("Root.demo2.demo3")
                        .userTotal(1.0)
                        .build())
                .source(0.0)
                .sourceName("sourceName")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:BhUserDirectory
        properties:
          dirId: 895784
          dirName: tf-example
          userOrgSets:
            - orgId: 1.576799e+06
              orgName: orgName1
              orgIdPath: '819729.895784'
              orgNamePath: Root.demo1
              userTotal: 0
            - orgId: 896536
              orgName: orgName2
              orgIdPath: 819729.895784.896536
              orgNamePath: Root.demo2.demo3
              userTotal: 1
          source: 0
          sourceName: sourceName
    

    Create BhUserDirectory Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BhUserDirectory(name: string, args: BhUserDirectoryArgs, opts?: CustomResourceOptions);
    @overload
    def BhUserDirectory(resource_name: str,
                        args: BhUserDirectoryArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def BhUserDirectory(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        dir_id: Optional[float] = None,
                        dir_name: Optional[str] = None,
                        source: Optional[float] = None,
                        source_name: Optional[str] = None,
                        user_org_sets: Optional[Sequence[BhUserDirectoryUserOrgSetArgs]] = None,
                        bh_user_directory_id: Optional[str] = None)
    func NewBhUserDirectory(ctx *Context, name string, args BhUserDirectoryArgs, opts ...ResourceOption) (*BhUserDirectory, error)
    public BhUserDirectory(string name, BhUserDirectoryArgs args, CustomResourceOptions? opts = null)
    public BhUserDirectory(String name, BhUserDirectoryArgs args)
    public BhUserDirectory(String name, BhUserDirectoryArgs args, CustomResourceOptions options)
    
    type: tencentcloud:BhUserDirectory
    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 BhUserDirectoryArgs
    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 BhUserDirectoryArgs
    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 BhUserDirectoryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BhUserDirectoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BhUserDirectoryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    BhUserDirectory 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 BhUserDirectory resource accepts the following input properties:

    DirId double
    Directory ID.
    DirName string
    Directory name.
    Source double
    IOA associated user source type.
    SourceName string
    IOA associated user source name.
    UserOrgSets List<BhUserDirectoryUserOrgSet>
    IOA group information.
    BhUserDirectoryId string
    ID of the resource.
    DirId float64
    Directory ID.
    DirName string
    Directory name.
    Source float64
    IOA associated user source type.
    SourceName string
    IOA associated user source name.
    UserOrgSets []BhUserDirectoryUserOrgSetArgs
    IOA group information.
    BhUserDirectoryId string
    ID of the resource.
    dirId Double
    Directory ID.
    dirName String
    Directory name.
    source Double
    IOA associated user source type.
    sourceName String
    IOA associated user source name.
    userOrgSets List<BhUserDirectoryUserOrgSet>
    IOA group information.
    bhUserDirectoryId String
    ID of the resource.
    dirId number
    Directory ID.
    dirName string
    Directory name.
    source number
    IOA associated user source type.
    sourceName string
    IOA associated user source name.
    userOrgSets BhUserDirectoryUserOrgSet[]
    IOA group information.
    bhUserDirectoryId string
    ID of the resource.
    dir_id float
    Directory ID.
    dir_name str
    Directory name.
    source float
    IOA associated user source type.
    source_name str
    IOA associated user source name.
    user_org_sets Sequence[BhUserDirectoryUserOrgSetArgs]
    IOA group information.
    bh_user_directory_id str
    ID of the resource.
    dirId Number
    Directory ID.
    dirName String
    Directory name.
    source Number
    IOA associated user source type.
    sourceName String
    IOA associated user source name.
    userOrgSets List<Property Map>
    IOA group information.
    bhUserDirectoryId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BhUserDirectory resource produces the following output properties:

    DirectoryId double
    Directory ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserCount double
    Number of users included in the directory.
    DirectoryId float64
    Directory ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserCount float64
    Number of users included in the directory.
    directoryId Double
    Directory ID.
    id String
    The provider-assigned unique ID for this managed resource.
    userCount Double
    Number of users included in the directory.
    directoryId number
    Directory ID.
    id string
    The provider-assigned unique ID for this managed resource.
    userCount number
    Number of users included in the directory.
    directory_id float
    Directory ID.
    id str
    The provider-assigned unique ID for this managed resource.
    user_count float
    Number of users included in the directory.
    directoryId Number
    Directory ID.
    id String
    The provider-assigned unique ID for this managed resource.
    userCount Number
    Number of users included in the directory.

    Look up Existing BhUserDirectory Resource

    Get an existing BhUserDirectory 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?: BhUserDirectoryState, opts?: CustomResourceOptions): BhUserDirectory
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bh_user_directory_id: Optional[str] = None,
            dir_id: Optional[float] = None,
            dir_name: Optional[str] = None,
            directory_id: Optional[float] = None,
            source: Optional[float] = None,
            source_name: Optional[str] = None,
            user_count: Optional[float] = None,
            user_org_sets: Optional[Sequence[BhUserDirectoryUserOrgSetArgs]] = None) -> BhUserDirectory
    func GetBhUserDirectory(ctx *Context, name string, id IDInput, state *BhUserDirectoryState, opts ...ResourceOption) (*BhUserDirectory, error)
    public static BhUserDirectory Get(string name, Input<string> id, BhUserDirectoryState? state, CustomResourceOptions? opts = null)
    public static BhUserDirectory get(String name, Output<String> id, BhUserDirectoryState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:BhUserDirectory    get:      id: ${id}
    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.
    The following state arguments are supported:
    BhUserDirectoryId string
    ID of the resource.
    DirId double
    Directory ID.
    DirName string
    Directory name.
    DirectoryId double
    Directory ID.
    Source double
    IOA associated user source type.
    SourceName string
    IOA associated user source name.
    UserCount double
    Number of users included in the directory.
    UserOrgSets List<BhUserDirectoryUserOrgSet>
    IOA group information.
    BhUserDirectoryId string
    ID of the resource.
    DirId float64
    Directory ID.
    DirName string
    Directory name.
    DirectoryId float64
    Directory ID.
    Source float64
    IOA associated user source type.
    SourceName string
    IOA associated user source name.
    UserCount float64
    Number of users included in the directory.
    UserOrgSets []BhUserDirectoryUserOrgSetArgs
    IOA group information.
    bhUserDirectoryId String
    ID of the resource.
    dirId Double
    Directory ID.
    dirName String
    Directory name.
    directoryId Double
    Directory ID.
    source Double
    IOA associated user source type.
    sourceName String
    IOA associated user source name.
    userCount Double
    Number of users included in the directory.
    userOrgSets List<BhUserDirectoryUserOrgSet>
    IOA group information.
    bhUserDirectoryId string
    ID of the resource.
    dirId number
    Directory ID.
    dirName string
    Directory name.
    directoryId number
    Directory ID.
    source number
    IOA associated user source type.
    sourceName string
    IOA associated user source name.
    userCount number
    Number of users included in the directory.
    userOrgSets BhUserDirectoryUserOrgSet[]
    IOA group information.
    bh_user_directory_id str
    ID of the resource.
    dir_id float
    Directory ID.
    dir_name str
    Directory name.
    directory_id float
    Directory ID.
    source float
    IOA associated user source type.
    source_name str
    IOA associated user source name.
    user_count float
    Number of users included in the directory.
    user_org_sets Sequence[BhUserDirectoryUserOrgSetArgs]
    IOA group information.
    bhUserDirectoryId String
    ID of the resource.
    dirId Number
    Directory ID.
    dirName String
    Directory name.
    directoryId Number
    Directory ID.
    source Number
    IOA associated user source type.
    sourceName String
    IOA associated user source name.
    userCount Number
    Number of users included in the directory.
    userOrgSets List<Property Map>
    IOA group information.

    Supporting Types

    BhUserDirectoryUserOrgSet, BhUserDirectoryUserOrgSetArgs

    OrgId double
    IOA user organization ID.
    OrgIdPath string
    IOA user organization ID path.
    OrgName string
    IOA user organization name.
    OrgNamePath string
    IOA user organization name path.
    UserTotal double
    Number of users under the IOA user organization ID.
    OrgId float64
    IOA user organization ID.
    OrgIdPath string
    IOA user organization ID path.
    OrgName string
    IOA user organization name.
    OrgNamePath string
    IOA user organization name path.
    UserTotal float64
    Number of users under the IOA user organization ID.
    orgId Double
    IOA user organization ID.
    orgIdPath String
    IOA user organization ID path.
    orgName String
    IOA user organization name.
    orgNamePath String
    IOA user organization name path.
    userTotal Double
    Number of users under the IOA user organization ID.
    orgId number
    IOA user organization ID.
    orgIdPath string
    IOA user organization ID path.
    orgName string
    IOA user organization name.
    orgNamePath string
    IOA user organization name path.
    userTotal number
    Number of users under the IOA user organization ID.
    org_id float
    IOA user organization ID.
    org_id_path str
    IOA user organization ID path.
    org_name str
    IOA user organization name.
    org_name_path str
    IOA user organization name path.
    user_total float
    Number of users under the IOA user organization ID.
    orgId Number
    IOA user organization ID.
    orgIdPath String
    IOA user organization ID path.
    orgName String
    IOA user organization name.
    orgNamePath String
    IOA user organization name path.
    userTotal Number
    Number of users under the IOA user organization ID.

    Import

    BH user directory can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/bhUserDirectory:BhUserDirectory example 32
    

    To learn more about importing existing cloud resources, see Importing resources.

    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