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

tencentcloud.DasbUser

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 user

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.DasbUser("example", {
        authType: 0,
        departmentId: "1.2",
        email: "demo@tencent.com",
        phone: "+86|18345678782",
        realName: "terraform",
        userName: "tf_example",
        validateFrom: "2023-09-22T02:00:00+08:00",
        validateTo: "2023-09-23T03:00:00+08:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.DasbUser("example",
        auth_type=0,
        department_id="1.2",
        email="demo@tencent.com",
        phone="+86|18345678782",
        real_name="terraform",
        user_name="tf_example",
        validate_from="2023-09-22T02:00:00+08:00",
        validate_to="2023-09-23T03:00:00+08:00")
    
    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.NewDasbUser(ctx, "example", &tencentcloud.DasbUserArgs{
    			AuthType:     pulumi.Float64(0),
    			DepartmentId: pulumi.String("1.2"),
    			Email:        pulumi.String("demo@tencent.com"),
    			Phone:        pulumi.String("+86|18345678782"),
    			RealName:     pulumi.String("terraform"),
    			UserName:     pulumi.String("tf_example"),
    			ValidateFrom: pulumi.String("2023-09-22T02:00:00+08:00"),
    			ValidateTo:   pulumi.String("2023-09-23T03:00:00+08:00"),
    		})
    		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.DasbUser("example", new()
        {
            AuthType = 0,
            DepartmentId = "1.2",
            Email = "demo@tencent.com",
            Phone = "+86|18345678782",
            RealName = "terraform",
            UserName = "tf_example",
            ValidateFrom = "2023-09-22T02:00:00+08:00",
            ValidateTo = "2023-09-23T03:00:00+08:00",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DasbUser;
    import com.pulumi.tencentcloud.DasbUserArgs;
    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 DasbUser("example", DasbUserArgs.builder()
                .authType(0)
                .departmentId("1.2")
                .email("demo@tencent.com")
                .phone("+86|18345678782")
                .realName("terraform")
                .userName("tf_example")
                .validateFrom("2023-09-22T02:00:00+08:00")
                .validateTo("2023-09-23T03:00:00+08:00")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:DasbUser
        properties:
          authType: 0
          departmentId: '1.2'
          email: demo@tencent.com
          phone: +86|18345678782
          realName: terraform
          userName: tf_example
          validateFrom: 2023-09-22T02:00:00+08:00
          validateTo: 2023-09-23T03:00:00+08:00
    

    Create DasbUser Resource

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

    Constructor syntax

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

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

    RealName string
    Real name, maximum length 20 characters, cannot contain blank 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. If not passed, the default is 0.
    DasbUserId string
    ID of the resource.
    DepartmentId string
    Department ID, such as: 1.2.3.
    Email string
    Email. Please provide at least one of phone or email.
    GroupIdSets List<double>
    The set of user group IDs to which it belongs.
    Phone string
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    ValidateFrom string
    User effective time, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    ValidateTime string
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    ValidateTo string
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    RealName string
    Real name, maximum length 20 characters, cannot contain blank 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. If not passed, the default is 0.
    DasbUserId string
    ID of the resource.
    DepartmentId string
    Department ID, such as: 1.2.3.
    Email string
    Email. Please provide at least one of phone or email.
    GroupIdSets []float64
    The set of user group IDs to which it belongs.
    Phone string
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    ValidateFrom string
    User effective time, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    ValidateTime string
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    ValidateTo string
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    realName String
    Real name, maximum length 20 characters, cannot contain blank 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. If not passed, the default is 0.
    dasbUserId String
    ID of the resource.
    departmentId String
    Department ID, such as: 1.2.3.
    email String
    Email. Please provide at least one of phone or email.
    groupIdSets List<Double>
    The set of user group IDs to which it belongs.
    phone String
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    validateFrom String
    User effective time, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validateTime String
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validateTo String
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    realName string
    Real name, maximum length 20 characters, cannot contain blank 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. If not passed, the default is 0.
    dasbUserId string
    ID of the resource.
    departmentId string
    Department ID, such as: 1.2.3.
    email string
    Email. Please provide at least one of phone or email.
    groupIdSets number[]
    The set of user group IDs to which it belongs.
    phone string
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    validateFrom string
    User effective time, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validateTime string
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validateTo string
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    real_name str
    Real name, maximum length 20 characters, cannot contain blank 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. If not passed, the default is 0.
    dasb_user_id str
    ID of the resource.
    department_id str
    Department ID, such as: 1.2.3.
    email str
    Email. Please provide at least one of phone or email.
    group_id_sets Sequence[float]
    The set of user group IDs to which it belongs.
    phone str
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    validate_from str
    User effective time, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validate_time str
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validate_to str
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    realName String
    Real name, maximum length 20 characters, cannot contain blank 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. If not passed, the default is 0.
    dasbUserId String
    ID of the resource.
    departmentId String
    Department ID, such as: 1.2.3.
    email String
    Email. Please provide at least one of phone or email.
    groupIdSets List<Number>
    The set of user group IDs to which it belongs.
    phone String
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    validateFrom String
    User effective time, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validateTime String
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validateTo String
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DasbUser 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 DasbUser Resource

    Get an existing DasbUser 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?: DasbUserState, opts?: CustomResourceOptions): DasbUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth_type: Optional[float] = None,
            dasb_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_name: Optional[str] = None,
            validate_from: Optional[str] = None,
            validate_time: Optional[str] = None,
            validate_to: Optional[str] = None) -> DasbUser
    func GetDasbUser(ctx *Context, name string, id IDInput, state *DasbUserState, opts ...ResourceOption) (*DasbUser, error)
    public static DasbUser Get(string name, Input<string> id, DasbUserState? state, CustomResourceOptions? opts = null)
    public static DasbUser get(String name, Output<String> id, DasbUserState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DasbUser    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. If not passed, the default is 0.
    DasbUserId string
    ID of the resource.
    DepartmentId string
    Department ID, such as: 1.2.3.
    Email string
    Email. Please provide at least one of phone or email.
    GroupIdSets List<double>
    The set of user group IDs to which it belongs.
    Phone string
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    RealName string
    Real name, maximum length 20 characters, cannot contain blank characters.
    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, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    ValidateTime string
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    ValidateTo string
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    AuthType float64
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
    DasbUserId string
    ID of the resource.
    DepartmentId string
    Department ID, such as: 1.2.3.
    Email string
    Email. Please provide at least one of phone or email.
    GroupIdSets []float64
    The set of user group IDs to which it belongs.
    Phone string
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    RealName string
    Real name, maximum length 20 characters, cannot contain blank characters.
    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, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    ValidateTime string
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    ValidateTo string
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    authType Double
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
    dasbUserId String
    ID of the resource.
    departmentId String
    Department ID, such as: 1.2.3.
    email String
    Email. Please provide at least one of phone or email.
    groupIdSets List<Double>
    The set of user group IDs to which it belongs.
    phone String
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    realName String
    Real name, maximum length 20 characters, cannot contain blank characters.
    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, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validateTime String
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validateTo String
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    authType number
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
    dasbUserId string
    ID of the resource.
    departmentId string
    Department ID, such as: 1.2.3.
    email string
    Email. Please provide at least one of phone or email.
    groupIdSets number[]
    The set of user group IDs to which it belongs.
    phone string
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    realName string
    Real name, maximum length 20 characters, cannot contain blank characters.
    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, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validateTime string
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validateTo string
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    auth_type float
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
    dasb_user_id str
    ID of the resource.
    department_id str
    Department ID, such as: 1.2.3.
    email str
    Email. Please provide at least one of phone or email.
    group_id_sets Sequence[float]
    The set of user group IDs to which it belongs.
    phone str
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    real_name str
    Real name, maximum length 20 characters, cannot contain blank characters.
    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, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validate_time str
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validate_to str
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    authType Number
    Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
    dasbUserId String
    ID of the resource.
    departmentId String
    Department ID, such as: 1.2.3.
    email String
    Email. Please provide at least one of phone or email.
    groupIdSets List<Number>
    The set of user group IDs to which it belongs.
    phone String
    Enter it in the format of country area code|mobile phone number. For example: +86|***********, +852|xxxxxxxx. Please provide at least one of phone or email.
    realName String
    Real name, maximum length 20 characters, cannot contain blank characters.
    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, such as: 2021-09-22T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.
    validateTime String
    Access time period limit, a string composed of 0 and 1, length 168 (7 * 24), representing the time period the user is allowed to access in a week. The Nth character in the string represents the Nth hour of the week, 0 - means access is not allowed, 1 - means access is allowed.
    validateTo String
    User expiration time, such as: 2021-09-23T00:00:00+00:00If the effective and expiry time are not filled in, the user will be valid for a long time.

    Import

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

    $ pulumi import tencentcloud:index/dasbUser:DasbUser example 134
    

    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