Provides a resource to create a BH user
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.BhUser("example", {
userName: "tf-example",
realName: "Terraform",
phone: "+86|18991162528",
email: "demo@tencent.com",
authType: 0,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.BhUser("example",
user_name="tf-example",
real_name="Terraform",
phone="+86|18991162528",
email="demo@tencent.com",
auth_type=0)
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.NewBhUser(ctx, "example", &tencentcloud.BhUserArgs{
UserName: pulumi.String("tf-example"),
RealName: pulumi.String("Terraform"),
Phone: pulumi.String("+86|18991162528"),
Email: pulumi.String("demo@tencent.com"),
AuthType: pulumi.Float64(0),
})
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.BhUser("example", new()
{
UserName = "tf-example",
RealName = "Terraform",
Phone = "+86|18991162528",
Email = "demo@tencent.com",
AuthType = 0,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.BhUser;
import com.pulumi.tencentcloud.BhUserArgs;
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 BhUser("example", BhUserArgs.builder()
.userName("tf-example")
.realName("Terraform")
.phone("+86|18991162528")
.email("demo@tencent.com")
.authType(0.0)
.build());
}
}
resources:
example:
type: tencentcloud:BhUser
properties:
userName: tf-example
realName: Terraform
phone: +86|18991162528
email: demo@tencent.com
authType: 0
Create BhUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BhUser(name: string, args: BhUserArgs, opts?: CustomResourceOptions);@overload
def BhUser(resource_name: str,
args: BhUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BhUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
real_name: Optional[str] = None,
user_name: Optional[str] = None,
auth_type: Optional[float] = None,
bh_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 NewBhUser(ctx *Context, name string, args BhUserArgs, opts ...ResourceOption) (*BhUser, error)public BhUser(string name, BhUserArgs args, CustomResourceOptions? opts = null)
public BhUser(String name, BhUserArgs args)
public BhUser(String name, BhUserArgs args, CustomResourceOptions options)
type: tencentcloud:BhUser
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 BhUserArgs
- 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 BhUserArgs
- 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 BhUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BhUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BhUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BhUser 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 BhUser resource accepts the following input properties:
- Real
Name string - User's real name, maximum length 20 characters, cannot contain whitespace 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. Default is 0 if not provided.
- Bh
User stringId - ID of the resource.
- Department
Id string - Department ID to which the user belongs, e.g.: "1.2.3".
- Email string
- Email address. At least one of phone and email parameters must be provided.
- Group
Id List<double>Sets - User group ID set to which the user belongs.
- Phone string
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- Validate
From string - User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- Validate
Time string - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- Validate
To string - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- Real
Name string - User's real name, maximum length 20 characters, cannot contain whitespace 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. Default is 0 if not provided.
- Bh
User stringId - ID of the resource.
- Department
Id string - Department ID to which the user belongs, e.g.: "1.2.3".
- Email string
- Email address. At least one of phone and email parameters must be provided.
- Group
Id []float64Sets - User group ID set to which the user belongs.
- Phone string
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- Validate
From string - User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- Validate
Time string - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- Validate
To string - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- real
Name String - User's real name, maximum length 20 characters, cannot contain whitespace 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. Default is 0 if not provided.
- bh
User StringId - ID of the resource.
- department
Id String - Department ID to which the user belongs, e.g.: "1.2.3".
- email String
- Email address. At least one of phone and email parameters must be provided.
- group
Id List<Double>Sets - User group ID set to which the user belongs.
- phone String
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- validate
From String - User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate
Time String - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate
To String - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- real
Name string - User's real name, maximum length 20 characters, cannot contain whitespace 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. Default is 0 if not provided.
- bh
User stringId - ID of the resource.
- department
Id string - Department ID to which the user belongs, e.g.: "1.2.3".
- email string
- Email address. At least one of phone and email parameters must be provided.
- group
Id number[]Sets - User group ID set to which the user belongs.
- phone string
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- validate
From string - User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate
Time string - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate
To string - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- real_
name str - User's real name, maximum length 20 characters, cannot contain whitespace 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. Default is 0 if not provided.
- bh_
user_ strid - ID of the resource.
- department_
id str - Department ID to which the user belongs, e.g.: "1.2.3".
- email str
- Email address. At least one of phone and email parameters must be provided.
- group_
id_ Sequence[float]sets - User group ID set to which the user belongs.
- phone str
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- validate_
from str - User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate_
time str - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate_
to str - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- real
Name String - User's real name, maximum length 20 characters, cannot contain whitespace 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. Default is 0 if not provided.
- bh
User StringId - ID of the resource.
- department
Id String - Department ID to which the user belongs, e.g.: "1.2.3".
- email String
- Email address. At least one of phone and email parameters must be provided.
- group
Id List<Number>Sets - User group ID set to which the user belongs.
- phone String
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- validate
From String - User effective time, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate
Time String - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate
To String - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
Outputs
All input properties are implicitly available as output properties. Additionally, the BhUser resource produces the following output properties:
Look up Existing BhUser Resource
Get an existing BhUser 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?: BhUserState, opts?: CustomResourceOptions): BhUser@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auth_type: Optional[float] = None,
bh_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_id: Optional[float] = None,
user_name: Optional[str] = None,
validate_from: Optional[str] = None,
validate_time: Optional[str] = None,
validate_to: Optional[str] = None) -> BhUserfunc GetBhUser(ctx *Context, name string, id IDInput, state *BhUserState, opts ...ResourceOption) (*BhUser, error)public static BhUser Get(string name, Input<string> id, BhUserState? state, CustomResourceOptions? opts = null)public static BhUser get(String name, Output<String> id, BhUserState state, CustomResourceOptions options)resources: _: type: tencentcloud:BhUser 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. Default is 0 if not provided.
- Bh
User stringId - ID of the resource.
- Department
Id string - Department ID to which the user belongs, e.g.: "1.2.3".
- Email string
- Email address. At least one of phone and email parameters must be provided.
- Group
Id List<double>Sets - User group ID set to which the user belongs.
- Phone string
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- Real
Name string - User's real name, maximum length 20 characters, cannot contain whitespace characters.
- User
Id double - User ID.
- 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, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- Validate
Time string - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- Validate
To string - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- Auth
Type float64 - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
- Bh
User stringId - ID of the resource.
- Department
Id string - Department ID to which the user belongs, e.g.: "1.2.3".
- Email string
- Email address. At least one of phone and email parameters must be provided.
- Group
Id []float64Sets - User group ID set to which the user belongs.
- Phone string
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- Real
Name string - User's real name, maximum length 20 characters, cannot contain whitespace characters.
- User
Id float64 - User ID.
- 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, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- Validate
Time string - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- Validate
To string - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- auth
Type Double - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
- bh
User StringId - ID of the resource.
- department
Id String - Department ID to which the user belongs, e.g.: "1.2.3".
- email String
- Email address. At least one of phone and email parameters must be provided.
- group
Id List<Double>Sets - User group ID set to which the user belongs.
- phone String
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- real
Name String - User's real name, maximum length 20 characters, cannot contain whitespace characters.
- user
Id Double - User ID.
- 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, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate
Time String - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate
To String - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- auth
Type number - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
- bh
User stringId - ID of the resource.
- department
Id string - Department ID to which the user belongs, e.g.: "1.2.3".
- email string
- Email address. At least one of phone and email parameters must be provided.
- group
Id number[]Sets - User group ID set to which the user belongs.
- phone string
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- real
Name string - User's real name, maximum length 20 characters, cannot contain whitespace characters.
- user
Id number - User ID.
- 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, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate
Time string - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate
To string - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- auth_
type float - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
- bh_
user_ strid - ID of the resource.
- department_
id str - Department ID to which the user belongs, e.g.: "1.2.3".
- email str
- Email address. At least one of phone and email parameters must be provided.
- group_
id_ Sequence[float]sets - User group ID set to which the user belongs.
- phone str
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- real_
name str - User's real name, maximum length 20 characters, cannot contain whitespace characters.
- user_
id float - User ID.
- 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, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate_
time str - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate_
to str - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- auth
Type Number - Authentication method, 0 - local, 1 - LDAP, 2 - OAuth. Default is 0 if not provided.
- bh
User StringId - ID of the resource.
- department
Id String - Department ID to which the user belongs, e.g.: "1.2.3".
- email String
- Email address. At least one of phone and email parameters must be provided.
- group
Id List<Number>Sets - User group ID set to which the user belongs.
- phone String
- Input in the format of "country code|phone number", e.g.: "+86|xxxxxxxx". At least one of phone and email parameters must be provided.
- real
Name String - User's real name, maximum length 20 characters, cannot contain whitespace characters.
- user
Id Number - User ID.
- 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, e.g.: "2021-09-22T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
- validate
Time String - Access time restriction, a string composed of 0 and 1 with length 168 (7 * 24), representing the time slots allowed for the user in a week. The Nth character in the string represents the Nth hour in the week, 0 - not allowed to access, 1 - allowed to access.
- validate
To String - User expiration time, e.g.: "2021-09-23T00:00:00+00:00". If effective and expiration times are not filled, the user will be valid permanently.
Import
BH user can be imported using the id, e.g.
$ pulumi import tencentcloud:index/bhUser:BhUser example 2322
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.
