tencentcloud.DasbUser
Explore with Pulumi AI
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:
- Real
Name string - Real name, maximum length 20 characters, cannot contain blank characters.
- User
Name string - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- Auth
Type double - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- Dasb
User stringId - ID of the resource.
- Department
Id string - Department ID, such as: 1.2.3.
- Email string
- Email. Please provide at least one of
phone
oremail
. - Group
Id List<double>Sets - 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
oremail
. - Validate
From 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.
- Validate
Time 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.
- Validate
To 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 string - Real name, maximum length 20 characters, cannot contain blank characters.
- User
Name string - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- Auth
Type float64 - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- Dasb
User stringId - ID of the resource.
- Department
Id string - Department ID, such as: 1.2.3.
- Email string
- Email. Please provide at least one of
phone
oremail
. - Group
Id []float64Sets - 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
oremail
. - Validate
From 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.
- Validate
Time 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.
- Validate
To 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 String - Real name, maximum length 20 characters, cannot contain blank characters.
- user
Name String - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- auth
Type Double - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- dasb
User StringId - ID of the resource.
- department
Id String - Department ID, such as: 1.2.3.
- email String
- Email. Please provide at least one of
phone
oremail
. - group
Id List<Double>Sets - 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
oremail
. - validate
From 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.
- validate
Time 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.
- validate
To 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 string - Real name, maximum length 20 characters, cannot contain blank characters.
- user
Name string - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- auth
Type number - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- dasb
User stringId - ID of the resource.
- department
Id string - Department ID, such as: 1.2.3.
- email string
- Email. Please provide at least one of
phone
oremail
. - group
Id number[]Sets - 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
oremail
. - validate
From 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.
- validate
Time 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.
- validate
To 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_ strid - ID of the resource.
- department_
id str - Department ID, such as: 1.2.3.
- email str
- Email. Please provide at least one of
phone
oremail
. - group_
id_ Sequence[float]sets - 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
oremail
. - 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.
- real
Name String - Real name, maximum length 20 characters, cannot contain blank characters.
- user
Name String - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- auth
Type Number - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- dasb
User StringId - ID of the resource.
- department
Id String - Department ID, such as: 1.2.3.
- email String
- Email. Please provide at least one of
phone
oremail
. - group
Id List<Number>Sets - 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
oremail
. - validate
From 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.
- validate
Time 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.
- validate
To 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.
- Auth
Type double - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- Dasb
User stringId - ID of the resource.
- Department
Id string - Department ID, such as: 1.2.3.
- Email string
- Email. Please provide at least one of
phone
oremail
. - Group
Id List<double>Sets - 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
oremail
. - Real
Name string - Real name, maximum length 20 characters, cannot contain blank characters.
- User
Name string - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- Validate
From 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.
- Validate
Time 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.
- Validate
To 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 float64 - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- Dasb
User stringId - ID of the resource.
- Department
Id string - Department ID, such as: 1.2.3.
- Email string
- Email. Please provide at least one of
phone
oremail
. - Group
Id []float64Sets - 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
oremail
. - Real
Name string - Real name, maximum length 20 characters, cannot contain blank characters.
- User
Name string - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- Validate
From 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.
- Validate
Time 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.
- Validate
To 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 Double - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- dasb
User StringId - ID of the resource.
- department
Id String - Department ID, such as: 1.2.3.
- email String
- Email. Please provide at least one of
phone
oremail
. - group
Id List<Double>Sets - 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
oremail
. - real
Name String - Real name, maximum length 20 characters, cannot contain blank characters.
- user
Name String - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- validate
From 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.
- validate
Time 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.
- validate
To 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 number - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- dasb
User stringId - ID of the resource.
- department
Id string - Department ID, such as: 1.2.3.
- email string
- Email. Please provide at least one of
phone
oremail
. - group
Id number[]Sets - 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
oremail
. - real
Name string - Real name, maximum length 20 characters, cannot contain blank characters.
- user
Name string - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- validate
From 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.
- validate
Time 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.
- validate
To 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_ strid - ID of the resource.
- department_
id str - Department ID, such as: 1.2.3.
- email str
- Email. Please provide at least one of
phone
oremail
. - group_
id_ Sequence[float]sets - 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
oremail
. - 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.
- auth
Type Number - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. If not passed, the default is 0.
- dasb
User StringId - ID of the resource.
- department
Id String - Department ID, such as: 1.2.3.
- email String
- Email. Please provide at least one of
phone
oremail
. - group
Id List<Number>Sets - 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
oremail
. - real
Name String - Real name, maximum length 20 characters, cannot contain blank characters.
- user
Name String - Username, 3-20 characters, must start with an English letter and cannot contain characters other than letters, numbers, '.', '_', '-'.
- validate
From 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.
- validate
Time 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.
- validate
To 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.