1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. DasbDeviceAccount
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.DasbDeviceAccount

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a dasb device_account

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleDasbDevice = new tencentcloud.DasbDevice("exampleDasbDevice", {
        osName: "Linux",
        ip: "192.168.0.1",
        port: 80,
    });
    const exampleDasbDeviceAccount = new tencentcloud.DasbDeviceAccount("exampleDasbDeviceAccount", {
        deviceId: exampleDasbDevice.dasbDeviceId,
        account: "root",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_dasb_device = tencentcloud.DasbDevice("exampleDasbDevice",
        os_name="Linux",
        ip="192.168.0.1",
        port=80)
    example_dasb_device_account = tencentcloud.DasbDeviceAccount("exampleDasbDeviceAccount",
        device_id=example_dasb_device.dasb_device_id,
        account="root")
    
    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 {
    		exampleDasbDevice, err := tencentcloud.NewDasbDevice(ctx, "exampleDasbDevice", &tencentcloud.DasbDeviceArgs{
    			OsName: pulumi.String("Linux"),
    			Ip:     pulumi.String("192.168.0.1"),
    			Port:   pulumi.Float64(80),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewDasbDeviceAccount(ctx, "exampleDasbDeviceAccount", &tencentcloud.DasbDeviceAccountArgs{
    			DeviceId: exampleDasbDevice.DasbDeviceId,
    			Account:  pulumi.String("root"),
    		})
    		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 exampleDasbDevice = new Tencentcloud.DasbDevice("exampleDasbDevice", new()
        {
            OsName = "Linux",
            Ip = "192.168.0.1",
            Port = 80,
        });
    
        var exampleDasbDeviceAccount = new Tencentcloud.DasbDeviceAccount("exampleDasbDeviceAccount", new()
        {
            DeviceId = exampleDasbDevice.DasbDeviceId,
            Account = "root",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DasbDevice;
    import com.pulumi.tencentcloud.DasbDeviceArgs;
    import com.pulumi.tencentcloud.DasbDeviceAccount;
    import com.pulumi.tencentcloud.DasbDeviceAccountArgs;
    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 exampleDasbDevice = new DasbDevice("exampleDasbDevice", DasbDeviceArgs.builder()
                .osName("Linux")
                .ip("192.168.0.1")
                .port(80)
                .build());
    
            var exampleDasbDeviceAccount = new DasbDeviceAccount("exampleDasbDeviceAccount", DasbDeviceAccountArgs.builder()
                .deviceId(exampleDasbDevice.dasbDeviceId())
                .account("root")
                .build());
    
        }
    }
    
    resources:
      exampleDasbDevice:
        type: tencentcloud:DasbDevice
        properties:
          osName: Linux
          ip: 192.168.0.1
          port: 80
      exampleDasbDeviceAccount:
        type: tencentcloud:DasbDeviceAccount
        properties:
          deviceId: ${exampleDasbDevice.dasbDeviceId}
          account: root
    

    Create DasbDeviceAccount Resource

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

    Constructor syntax

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

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

    Account string
    Device account.
    DeviceId double
    Device ID.
    DasbDeviceAccountId string
    ID of the resource.
    Account string
    Device account.
    DeviceId float64
    Device ID.
    DasbDeviceAccountId string
    ID of the resource.
    account String
    Device account.
    deviceId Double
    Device ID.
    dasbDeviceAccountId String
    ID of the resource.
    account string
    Device account.
    deviceId number
    Device ID.
    dasbDeviceAccountId string
    ID of the resource.
    account str
    Device account.
    device_id float
    Device ID.
    dasb_device_account_id str
    ID of the resource.
    account String
    Device account.
    deviceId Number
    Device ID.
    dasbDeviceAccountId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DasbDeviceAccount Resource

    Get an existing DasbDeviceAccount 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?: DasbDeviceAccountState, opts?: CustomResourceOptions): DasbDeviceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account: Optional[str] = None,
            dasb_device_account_id: Optional[str] = None,
            device_id: Optional[float] = None) -> DasbDeviceAccount
    func GetDasbDeviceAccount(ctx *Context, name string, id IDInput, state *DasbDeviceAccountState, opts ...ResourceOption) (*DasbDeviceAccount, error)
    public static DasbDeviceAccount Get(string name, Input<string> id, DasbDeviceAccountState? state, CustomResourceOptions? opts = null)
    public static DasbDeviceAccount get(String name, Output<String> id, DasbDeviceAccountState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DasbDeviceAccount    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:
    Account string
    Device account.
    DasbDeviceAccountId string
    ID of the resource.
    DeviceId double
    Device ID.
    Account string
    Device account.
    DasbDeviceAccountId string
    ID of the resource.
    DeviceId float64
    Device ID.
    account String
    Device account.
    dasbDeviceAccountId String
    ID of the resource.
    deviceId Double
    Device ID.
    account string
    Device account.
    dasbDeviceAccountId string
    ID of the resource.
    deviceId number
    Device ID.
    account str
    Device account.
    dasb_device_account_id str
    ID of the resource.
    device_id float
    Device ID.
    account String
    Device account.
    dasbDeviceAccountId String
    ID of the resource.
    deviceId Number
    Device ID.

    Import

    dasb device_account can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/dasbDeviceAccount:DasbDeviceAccount example 11
    

    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.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack