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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.BhDevice("example", {deviceSet: {
        osName: "Linux",
        ip: "1.1.1.1",
        port: 22,
        name: "tf-example",
    }});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.BhDevice("example", device_set={
        "os_name": "Linux",
        "ip": "1.1.1.1",
        "port": 22,
        "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.NewBhDevice(ctx, "example", &tencentcloud.BhDeviceArgs{
    			DeviceSet: &tencentcloud.BhDeviceDeviceSetArgs{
    				OsName: pulumi.String("Linux"),
    				Ip:     pulumi.String("1.1.1.1"),
    				Port:   pulumi.Float64(22),
    				Name:   pulumi.String("tf-example"),
    			},
    		})
    		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.BhDevice("example", new()
        {
            DeviceSet = new Tencentcloud.Inputs.BhDeviceDeviceSetArgs
            {
                OsName = "Linux",
                Ip = "1.1.1.1",
                Port = 22,
                Name = "tf-example",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.BhDevice;
    import com.pulumi.tencentcloud.BhDeviceArgs;
    import com.pulumi.tencentcloud.inputs.BhDeviceDeviceSetArgs;
    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 BhDevice("example", BhDeviceArgs.builder()
                .deviceSet(BhDeviceDeviceSetArgs.builder()
                    .osName("Linux")
                    .ip("1.1.1.1")
                    .port(22.0)
                    .name("tf-example")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:BhDevice
        properties:
          deviceSet:
            osName: Linux
            ip: 1.1.1.1
            port: 22
            name: tf-example
    

    Create BhDevice Resource

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

    Constructor syntax

    new BhDevice(name: string, args: BhDeviceArgs, opts?: CustomResourceOptions);
    @overload
    def BhDevice(resource_name: str,
                 args: BhDeviceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def BhDevice(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 device_set: Optional[BhDeviceDeviceSetArgs] = None,
                 account_id: Optional[float] = None,
                 bh_device_id: Optional[str] = None)
    func NewBhDevice(ctx *Context, name string, args BhDeviceArgs, opts ...ResourceOption) (*BhDevice, error)
    public BhDevice(string name, BhDeviceArgs args, CustomResourceOptions? opts = null)
    public BhDevice(String name, BhDeviceArgs args)
    public BhDevice(String name, BhDeviceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:BhDevice
    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 BhDeviceArgs
    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 BhDeviceArgs
    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 BhDeviceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BhDeviceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BhDeviceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DeviceSet BhDeviceDeviceSet
    Asset parameter list.
    AccountId double
    Cloud account ID to which the asset belongs.
    BhDeviceId string
    ID of the resource.
    DeviceSet BhDeviceDeviceSetArgs
    Asset parameter list.
    AccountId float64
    Cloud account ID to which the asset belongs.
    BhDeviceId string
    ID of the resource.
    deviceSet BhDeviceDeviceSet
    Asset parameter list.
    accountId Double
    Cloud account ID to which the asset belongs.
    bhDeviceId String
    ID of the resource.
    deviceSet BhDeviceDeviceSet
    Asset parameter list.
    accountId number
    Cloud account ID to which the asset belongs.
    bhDeviceId string
    ID of the resource.
    device_set BhDeviceDeviceSetArgs
    Asset parameter list.
    account_id float
    Cloud account ID to which the asset belongs.
    bh_device_id str
    ID of the resource.
    deviceSet Property Map
    Asset parameter list.
    accountId Number
    Cloud account ID to which the asset belongs.
    bhDeviceId String
    ID of the resource.

    Outputs

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

    DeviceId double
    ID of the device.
    Id string
    The provider-assigned unique ID for this managed resource.
    DeviceId float64
    ID of the device.
    Id string
    The provider-assigned unique ID for this managed resource.
    deviceId Double
    ID of the device.
    id String
    The provider-assigned unique ID for this managed resource.
    deviceId number
    ID of the device.
    id string
    The provider-assigned unique ID for this managed resource.
    device_id float
    ID of the device.
    id str
    The provider-assigned unique ID for this managed resource.
    deviceId Number
    ID of the device.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BhDevice Resource

    Get an existing BhDevice 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?: BhDeviceState, opts?: CustomResourceOptions): BhDevice
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[float] = None,
            bh_device_id: Optional[str] = None,
            device_id: Optional[float] = None,
            device_set: Optional[BhDeviceDeviceSetArgs] = None) -> BhDevice
    func GetBhDevice(ctx *Context, name string, id IDInput, state *BhDeviceState, opts ...ResourceOption) (*BhDevice, error)
    public static BhDevice Get(string name, Input<string> id, BhDeviceState? state, CustomResourceOptions? opts = null)
    public static BhDevice get(String name, Output<String> id, BhDeviceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:BhDevice    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:
    AccountId double
    Cloud account ID to which the asset belongs.
    BhDeviceId string
    ID of the resource.
    DeviceId double
    ID of the device.
    DeviceSet BhDeviceDeviceSet
    Asset parameter list.
    AccountId float64
    Cloud account ID to which the asset belongs.
    BhDeviceId string
    ID of the resource.
    DeviceId float64
    ID of the device.
    DeviceSet BhDeviceDeviceSetArgs
    Asset parameter list.
    accountId Double
    Cloud account ID to which the asset belongs.
    bhDeviceId String
    ID of the resource.
    deviceId Double
    ID of the device.
    deviceSet BhDeviceDeviceSet
    Asset parameter list.
    accountId number
    Cloud account ID to which the asset belongs.
    bhDeviceId string
    ID of the resource.
    deviceId number
    ID of the device.
    deviceSet BhDeviceDeviceSet
    Asset parameter list.
    account_id float
    Cloud account ID to which the asset belongs.
    bh_device_id str
    ID of the resource.
    device_id float
    ID of the device.
    device_set BhDeviceDeviceSetArgs
    Asset parameter list.
    accountId Number
    Cloud account ID to which the asset belongs.
    bhDeviceId String
    ID of the resource.
    deviceId Number
    ID of the device.
    deviceSet Property Map
    Asset parameter list.

    Supporting Types

    BhDeviceDeviceSet, BhDeviceDeviceSetArgs

    Ip string
    IP address.
    OsName string
    The operating system name can only be one of the following: Host (Linux, Windows), Database (MySQL, SQL Server, MariaDB, PostgreSQL, MongoDBReplicaSet, MongoDBSharded, Redis), or Container (TKE, EKS).
    Port double
    Management port.
    ApCode string
    Region to which the asset belongs.
    ApName string
    Region name.
    DepartmentId string
    Department ID to which the asset belongs.
    EnableSsl double
    Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
    InstanceId string
    Asset instance ID.
    IpPortSets List<string>
    Asset multi-node: IP and port fields.
    Name string
    Host name, can be empty.
    PublicIp string
    Public IP.
    SslCert string
    SSL certificate, required when EnableSSL is enabled.
    SslCertName string
    SSL certificate name, required when EnableSSL is enabled.
    SubnetId string
    Subnet to which the asset belongs.
    VpcId string
    VPC to which the asset belongs.
    Ip string
    IP address.
    OsName string
    The operating system name can only be one of the following: Host (Linux, Windows), Database (MySQL, SQL Server, MariaDB, PostgreSQL, MongoDBReplicaSet, MongoDBSharded, Redis), or Container (TKE, EKS).
    Port float64
    Management port.
    ApCode string
    Region to which the asset belongs.
    ApName string
    Region name.
    DepartmentId string
    Department ID to which the asset belongs.
    EnableSsl float64
    Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
    InstanceId string
    Asset instance ID.
    IpPortSets []string
    Asset multi-node: IP and port fields.
    Name string
    Host name, can be empty.
    PublicIp string
    Public IP.
    SslCert string
    SSL certificate, required when EnableSSL is enabled.
    SslCertName string
    SSL certificate name, required when EnableSSL is enabled.
    SubnetId string
    Subnet to which the asset belongs.
    VpcId string
    VPC to which the asset belongs.
    ip String
    IP address.
    osName String
    The operating system name can only be one of the following: Host (Linux, Windows), Database (MySQL, SQL Server, MariaDB, PostgreSQL, MongoDBReplicaSet, MongoDBSharded, Redis), or Container (TKE, EKS).
    port Double
    Management port.
    apCode String
    Region to which the asset belongs.
    apName String
    Region name.
    departmentId String
    Department ID to which the asset belongs.
    enableSsl Double
    Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
    instanceId String
    Asset instance ID.
    ipPortSets List<String>
    Asset multi-node: IP and port fields.
    name String
    Host name, can be empty.
    publicIp String
    Public IP.
    sslCert String
    SSL certificate, required when EnableSSL is enabled.
    sslCertName String
    SSL certificate name, required when EnableSSL is enabled.
    subnetId String
    Subnet to which the asset belongs.
    vpcId String
    VPC to which the asset belongs.
    ip string
    IP address.
    osName string
    The operating system name can only be one of the following: Host (Linux, Windows), Database (MySQL, SQL Server, MariaDB, PostgreSQL, MongoDBReplicaSet, MongoDBSharded, Redis), or Container (TKE, EKS).
    port number
    Management port.
    apCode string
    Region to which the asset belongs.
    apName string
    Region name.
    departmentId string
    Department ID to which the asset belongs.
    enableSsl number
    Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
    instanceId string
    Asset instance ID.
    ipPortSets string[]
    Asset multi-node: IP and port fields.
    name string
    Host name, can be empty.
    publicIp string
    Public IP.
    sslCert string
    SSL certificate, required when EnableSSL is enabled.
    sslCertName string
    SSL certificate name, required when EnableSSL is enabled.
    subnetId string
    Subnet to which the asset belongs.
    vpcId string
    VPC to which the asset belongs.
    ip str
    IP address.
    os_name str
    The operating system name can only be one of the following: Host (Linux, Windows), Database (MySQL, SQL Server, MariaDB, PostgreSQL, MongoDBReplicaSet, MongoDBSharded, Redis), or Container (TKE, EKS).
    port float
    Management port.
    ap_code str
    Region to which the asset belongs.
    ap_name str
    Region name.
    department_id str
    Department ID to which the asset belongs.
    enable_ssl float
    Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
    instance_id str
    Asset instance ID.
    ip_port_sets Sequence[str]
    Asset multi-node: IP and port fields.
    name str
    Host name, can be empty.
    public_ip str
    Public IP.
    ssl_cert str
    SSL certificate, required when EnableSSL is enabled.
    ssl_cert_name str
    SSL certificate name, required when EnableSSL is enabled.
    subnet_id str
    Subnet to which the asset belongs.
    vpc_id str
    VPC to which the asset belongs.
    ip String
    IP address.
    osName String
    The operating system name can only be one of the following: Host (Linux, Windows), Database (MySQL, SQL Server, MariaDB, PostgreSQL, MongoDBReplicaSet, MongoDBSharded, Redis), or Container (TKE, EKS).
    port Number
    Management port.
    apCode String
    Region to which the asset belongs.
    apName String
    Region name.
    departmentId String
    Department ID to which the asset belongs.
    enableSsl Number
    Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
    instanceId String
    Asset instance ID.
    ipPortSets List<String>
    Asset multi-node: IP and port fields.
    name String
    Host name, can be empty.
    publicIp String
    Public IP.
    sslCert String
    SSL certificate, required when EnableSSL is enabled.
    sslCertName String
    SSL certificate name, required when EnableSSL is enabled.
    subnetId String
    Subnet to which the asset belongs.
    vpcId String
    VPC to which the asset belongs.

    Import

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

    $ pulumi import tencentcloud:index/bhDevice:BhDevice example 1875
    

    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