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:
- Device
Set BhDevice Device Set - Asset parameter list.
- Account
Id double - Cloud account ID to which the asset belongs.
- Bh
Device stringId - ID of the resource.
- Device
Set BhDevice Device Set Args - Asset parameter list.
- Account
Id float64 - Cloud account ID to which the asset belongs.
- Bh
Device stringId - ID of the resource.
- device
Set BhDevice Device Set - Asset parameter list.
- account
Id Double - Cloud account ID to which the asset belongs.
- bh
Device StringId - ID of the resource.
- device
Set BhDevice Device Set - Asset parameter list.
- account
Id number - Cloud account ID to which the asset belongs.
- bh
Device stringId - ID of the resource.
- device_
set BhDevice Device Set Args - Asset parameter list.
- account_
id float - Cloud account ID to which the asset belongs.
- bh_
device_ strid - ID of the resource.
- device
Set Property Map - Asset parameter list.
- account
Id Number - Cloud account ID to which the asset belongs.
- bh
Device StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the BhDevice resource produces the following output properties:
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) -> BhDevicefunc 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.
- Account
Id double - Cloud account ID to which the asset belongs.
- Bh
Device stringId - ID of the resource.
- Device
Id double - ID of the device.
- Device
Set BhDevice Device Set - Asset parameter list.
- Account
Id float64 - Cloud account ID to which the asset belongs.
- Bh
Device stringId - ID of the resource.
- Device
Id float64 - ID of the device.
- Device
Set BhDevice Device Set Args - Asset parameter list.
- account
Id Double - Cloud account ID to which the asset belongs.
- bh
Device StringId - ID of the resource.
- device
Id Double - ID of the device.
- device
Set BhDevice Device Set - Asset parameter list.
- account
Id number - Cloud account ID to which the asset belongs.
- bh
Device stringId - ID of the resource.
- device
Id number - ID of the device.
- device
Set BhDevice Device Set - Asset parameter list.
- account_
id float - Cloud account ID to which the asset belongs.
- bh_
device_ strid - ID of the resource.
- device_
id float - ID of the device.
- device_
set BhDevice Device Set Args - Asset parameter list.
- account
Id Number - Cloud account ID to which the asset belongs.
- bh
Device StringId - ID of the resource.
- device
Id Number - ID of the device.
- device
Set Property Map - Asset parameter list.
Supporting Types
BhDeviceDeviceSet, BhDeviceDeviceSetArgs
- Ip string
- IP address.
- Os
Name 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.
- Ap
Code string - Region to which the asset belongs.
- Ap
Name string - Region name.
- Department
Id string - Department ID to which the asset belongs.
- Enable
Ssl double - Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
- Instance
Id string - Asset instance ID.
- Ip
Port List<string>Sets - Asset multi-node: IP and port fields.
- Name string
- Host name, can be empty.
- Public
Ip string - Public IP.
- Ssl
Cert string - SSL certificate, required when EnableSSL is enabled.
- Ssl
Cert stringName - SSL certificate name, required when EnableSSL is enabled.
- Subnet
Id string - Subnet to which the asset belongs.
- Vpc
Id string - VPC to which the asset belongs.
- Ip string
- IP address.
- Os
Name 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.
- Ap
Code string - Region to which the asset belongs.
- Ap
Name string - Region name.
- Department
Id string - Department ID to which the asset belongs.
- Enable
Ssl float64 - Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
- Instance
Id string - Asset instance ID.
- Ip
Port []stringSets - Asset multi-node: IP and port fields.
- Name string
- Host name, can be empty.
- Public
Ip string - Public IP.
- Ssl
Cert string - SSL certificate, required when EnableSSL is enabled.
- Ssl
Cert stringName - SSL certificate name, required when EnableSSL is enabled.
- Subnet
Id string - Subnet to which the asset belongs.
- Vpc
Id string - VPC to which the asset belongs.
- ip String
- IP address.
- os
Name 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.
- ap
Code String - Region to which the asset belongs.
- ap
Name String - Region name.
- department
Id String - Department ID to which the asset belongs.
- enable
Ssl Double - Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
- instance
Id String - Asset instance ID.
- ip
Port List<String>Sets - Asset multi-node: IP and port fields.
- name String
- Host name, can be empty.
- public
Ip String - Public IP.
- ssl
Cert String - SSL certificate, required when EnableSSL is enabled.
- ssl
Cert StringName - SSL certificate name, required when EnableSSL is enabled.
- subnet
Id String - Subnet to which the asset belongs.
- vpc
Id String - VPC to which the asset belongs.
- ip string
- IP address.
- os
Name 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.
- ap
Code string - Region to which the asset belongs.
- ap
Name string - Region name.
- department
Id string - Department ID to which the asset belongs.
- enable
Ssl number - Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
- instance
Id string - Asset instance ID.
- ip
Port string[]Sets - Asset multi-node: IP and port fields.
- name string
- Host name, can be empty.
- public
Ip string - Public IP.
- ssl
Cert string - SSL certificate, required when EnableSSL is enabled.
- ssl
Cert stringName - SSL certificate name, required when EnableSSL is enabled.
- subnet
Id string - Subnet to which the asset belongs.
- vpc
Id 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_ Sequence[str]sets - 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_ strname - 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.
- os
Name 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.
- ap
Code String - Region to which the asset belongs.
- ap
Name String - Region name.
- department
Id String - Department ID to which the asset belongs.
- enable
Ssl Number - Whether to enable SSL, 1: enable, 0: disable, only supports Redis assets.
- instance
Id String - Asset instance ID.
- ip
Port List<String>Sets - Asset multi-node: IP and port fields.
- name String
- Host name, can be empty.
- public
Ip String - Public IP.
- ssl
Cert String - SSL certificate, required when EnableSSL is enabled.
- ssl
Cert StringName - SSL certificate name, required when EnableSSL is enabled.
- subnet
Id String - Subnet to which the asset belongs.
- vpc
Id 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
tencentcloudTerraform Provider.
