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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.BhUser("example", {
        userName: "tf-example",
        realName: "Terraform",
        phone: "+86|18991162528",
        email: "demo@tencent.com",
        authType: 0,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.BhUser("example",
        user_name="tf-example",
        real_name="Terraform",
        phone="+86|18991162528",
        email="demo@tencent.com",
        auth_type=0)
    
    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.NewBhUser(ctx, "example", &tencentcloud.BhUserArgs{
    			UserName: pulumi.String("tf-example"),
    			RealName: pulumi.String("Terraform"),
    			Phone:    pulumi.String("+86|18991162528"),
    			Email:    pulumi.String("demo@tencent.com"),
    			AuthType: pulumi.Float64(0),
    		})
    		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.BhUser("example", new()
        {
            UserName = "tf-example",
            RealName = "Terraform",
            Phone = "+86|18991162528",
            Email = "demo@tencent.com",
            AuthType = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.BhUser;
    import com.pulumi.tencentcloud.BhUserArgs;
    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 BhUser("example", BhUserArgs.builder()
                .userName("tf-example")
                .realName("Terraform")
                .phone("+86|18991162528")
                .email("demo@tencent.com")
                .authType(0.0)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:BhUser
        properties:
          userName: tf-example
          realName: Terraform
          phone: +86|18991162528
          email: demo@tencent.com
          authType: 0
    

    Create BhUser Resource

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

    Constructor syntax

    new BhUser(name: string, args: BhUserArgs, opts?: CustomResourceOptions);
    @overload
    def BhUser(resource_name: str,
               args: BhUserArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def BhUser(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               real_name: Optional[str] = None,
               user_name: Optional[str] = None,
               auth_type: Optional[float] = None,
               bh_user_id: Optional[str] = None,
               department_id: Optional[str] = None,
               email: Optional[str] = None,
               group_id_sets: Optional[Sequence[float]] = None,
               phone: Optional[str] = None,
               validate_from: Optional[str] = None,
               validate_time: Optional[str] = None,
               validate_to: Optional[str] = None)
    func NewBhUser(ctx *Context, name string, args BhUserArgs, opts ...ResourceOption) (*BhUser, error)
    public BhUser(string name, BhUserArgs args, CustomResourceOptions? opts = null)
    public BhUser(String name, BhUserArgs args)
    public BhUser(String name, BhUserArgs args, CustomResourceOptions options)
    
    type: tencentcloud:BhUser
    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 BhUserArgs
    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 BhUserArgs
    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 BhUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BhUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BhUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    RealName string
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    UserName string
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    AuthType double
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    BhUserId string
    ID of the resource.
    DepartmentId string
    Department ID to which the user belongs, e.g.: "1.2.3".
    Email string
    Email address. At least one of phone and email parameters must be provided.
    GroupIdSets List<double>
    User group ID set to which the user belongs.
    Phone string
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    ValidateFrom string
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    ValidateTime string
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    ValidateTo string
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    RealName string
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    UserName string
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    AuthType float64
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    BhUserId string
    ID of the resource.
    DepartmentId string
    Department ID to which the user belongs, e.g.: "1.2.3".
    Email string
    Email address. At least one of phone and email parameters must be provided.
    GroupIdSets []float64
    User group ID set to which the user belongs.
    Phone string
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    ValidateFrom string
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    ValidateTime string
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    ValidateTo string
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    realName String
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    userName String
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    authType Double
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bhUserId String
    ID of the resource.
    departmentId String
    Department ID to which the user belongs, e.g.: "1.2.3".
    email String
    Email address. At least one of phone and email parameters must be provided.
    groupIdSets List<Double>
    User group ID set to which the user belongs.
    phone String
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    validateFrom String
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validateTime String
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validateTo String
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    realName string
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    userName string
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    authType number
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bhUserId string
    ID of the resource.
    departmentId string
    Department ID to which the user belongs, e.g.: "1.2.3".
    email string
    Email address. At least one of phone and email parameters must be provided.
    groupIdSets number[]
    User group ID set to which the user belongs.
    phone string
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    validateFrom string
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validateTime string
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validateTo string
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    real_name str
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    user_name str
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    auth_type float
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bh_user_id str
    ID of the resource.
    department_id str
    Department ID to which the user belongs, e.g.: "1.2.3".
    email str
    Email address. At least one of phone and email parameters must be provided.
    group_id_sets Sequence[float]
    User group ID set to which the user belongs.
    phone str
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    validate_from str
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validate_time str
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validate_to str
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    realName String
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    userName String
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    authType Number
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bhUserId String
    ID of the resource.
    departmentId String
    Department ID to which the user belongs, e.g.: "1.2.3".
    email String
    Email address. At least one of phone and email parameters must be provided.
    groupIdSets List<Number>
    User group ID set to which the user belongs.
    phone String
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    validateFrom String
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validateTime String
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validateTo String
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    UserId double
    User ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId float64
    User ID.
    id String
    The provider-assigned unique ID for this managed resource.
    userId Double
    User ID.
    id string
    The provider-assigned unique ID for this managed resource.
    userId number
    User ID.
    id str
    The provider-assigned unique ID for this managed resource.
    user_id float
    User ID.
    id String
    The provider-assigned unique ID for this managed resource.
    userId Number
    User ID.

    Look up Existing BhUser Resource

    Get an existing BhUser 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?: BhUserState, opts?: CustomResourceOptions): BhUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth_type: Optional[float] = None,
            bh_user_id: Optional[str] = None,
            department_id: Optional[str] = None,
            email: Optional[str] = None,
            group_id_sets: Optional[Sequence[float]] = None,
            phone: Optional[str] = None,
            real_name: Optional[str] = None,
            user_id: Optional[float] = None,
            user_name: Optional[str] = None,
            validate_from: Optional[str] = None,
            validate_time: Optional[str] = None,
            validate_to: Optional[str] = None) -> BhUser
    func GetBhUser(ctx *Context, name string, id IDInput, state *BhUserState, opts ...ResourceOption) (*BhUser, error)
    public static BhUser Get(string name, Input<string> id, BhUserState? state, CustomResourceOptions? opts = null)
    public static BhUser get(String name, Output<String> id, BhUserState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:BhUser    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:
    AuthType double
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    BhUserId string
    ID of the resource.
    DepartmentId string
    Department ID to which the user belongs, e.g.: "1.2.3".
    Email string
    Email address. At least one of phone and email parameters must be provided.
    GroupIdSets List<double>
    User group ID set to which the user belongs.
    Phone string
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    RealName string
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    UserId double
    User ID.
    UserName string
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    ValidateFrom string
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    ValidateTime string
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    ValidateTo string
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    AuthType float64
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    BhUserId string
    ID of the resource.
    DepartmentId string
    Department ID to which the user belongs, e.g.: "1.2.3".
    Email string
    Email address. At least one of phone and email parameters must be provided.
    GroupIdSets []float64
    User group ID set to which the user belongs.
    Phone string
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    RealName string
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    UserId float64
    User ID.
    UserName string
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    ValidateFrom string
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    ValidateTime string
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    ValidateTo string
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    authType Double
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bhUserId String
    ID of the resource.
    departmentId String
    Department ID to which the user belongs, e.g.: "1.2.3".
    email String
    Email address. At least one of phone and email parameters must be provided.
    groupIdSets List<Double>
    User group ID set to which the user belongs.
    phone String
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    realName String
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    userId Double
    User ID.
    userName String
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    validateFrom String
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validateTime String
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validateTo String
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    authType number
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bhUserId string
    ID of the resource.
    departmentId string
    Department ID to which the user belongs, e.g.: "1.2.3".
    email string
    Email address. At least one of phone and email parameters must be provided.
    groupIdSets number[]
    User group ID set to which the user belongs.
    phone string
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    realName string
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    userId number
    User ID.
    userName string
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    validateFrom string
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validateTime string
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validateTo string
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    auth_type float
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bh_user_id str
    ID of the resource.
    department_id str
    Department ID to which the user belongs, e.g.: "1.2.3".
    email str
    Email address. At least one of phone and email parameters must be provided.
    group_id_sets Sequence[float]
    User group ID set to which the user belongs.
    phone str
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    real_name str
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    user_id float
    User ID.
    user_name str
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    validate_from str
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validate_time str
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validate_to str
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    authType Number
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
    bhUserId String
    ID of the resource.
    departmentId String
    Department ID to which the user belongs, e.g.: "1.2.3".
    email String
    Email address. At least one of phone and email parameters must be provided.
    groupIdSets List<Number>
    User group ID set to which the user belongs.
    phone String
    Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
    realName String
    User's real name, maximum length 20 characters, cannot contain whitespace characters.
    userId Number
    User ID.
    userName String
    Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, ., _, -.
    validateFrom String
    User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
    validateTime String
    Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
    validateTo String
    User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.

    Import

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

    $ pulumi import tencentcloud:index/bhUser:BhUser example 2322
    

    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