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

tencentcloud.CamUser

Explore with Pulumi AI

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

    Provides a resource to manage CAM user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CamUser("example", {
        consoleLogin: true,
        countryCode: "86",
        email: "example@qq.com",
        forceDelete: true,
        needResetPassword: true,
        password: "Password@123",
        phoneNum: "189********",
        remark: "Remark.",
        tags: {
            createBy: "Terraform",
        },
        useApi: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CamUser("example",
        console_login=True,
        country_code="86",
        email="example@qq.com",
        force_delete=True,
        need_reset_password=True,
        password="Password@123",
        phone_num="189********",
        remark="Remark.",
        tags={
            "createBy": "Terraform",
        },
        use_api=True)
    
    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.NewCamUser(ctx, "example", &tencentcloud.CamUserArgs{
    			ConsoleLogin:      pulumi.Bool(true),
    			CountryCode:       pulumi.String("86"),
    			Email:             pulumi.String("example@qq.com"),
    			ForceDelete:       pulumi.Bool(true),
    			NeedResetPassword: pulumi.Bool(true),
    			Password:          pulumi.String("Password@123"),
    			PhoneNum:          pulumi.String("189********"),
    			Remark:            pulumi.String("Remark."),
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("Terraform"),
    			},
    			UseApi: pulumi.Bool(true),
    		})
    		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.CamUser("example", new()
        {
            ConsoleLogin = true,
            CountryCode = "86",
            Email = "example@qq.com",
            ForceDelete = true,
            NeedResetPassword = true,
            Password = "Password@123",
            PhoneNum = "189********",
            Remark = "Remark.",
            Tags = 
            {
                { "createBy", "Terraform" },
            },
            UseApi = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CamUser;
    import com.pulumi.tencentcloud.CamUserArgs;
    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 CamUser("example", CamUserArgs.builder()
                .consoleLogin(true)
                .countryCode("86")
                .email("example@qq.com")
                .forceDelete(true)
                .needResetPassword(true)
                .password("Password@123")
                .phoneNum("189********")
                .remark("Remark.")
                .tags(Map.of("createBy", "Terraform"))
                .useApi(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CamUser
        properties:
          consoleLogin: true
          countryCode: '86'
          email: example@qq.com
          forceDelete: true
          needResetPassword: true
          password: Password@123
          phoneNum: 189********
          remark: Remark.
          tags:
            createBy: Terraform
          useApi: true
    

    Create CamUser Resource

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

    Constructor syntax

    new CamUser(name: string, args?: CamUserArgs, opts?: CustomResourceOptions);
    @overload
    def CamUser(resource_name: str,
                args: Optional[CamUserArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def CamUser(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cam_user_id: Optional[str] = None,
                console_login: Optional[bool] = None,
                country_code: Optional[str] = None,
                email: Optional[str] = None,
                force_delete: Optional[bool] = None,
                name: Optional[str] = None,
                need_reset_password: Optional[bool] = None,
                password: Optional[str] = None,
                phone_num: Optional[str] = None,
                remark: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                use_api: Optional[bool] = None)
    func NewCamUser(ctx *Context, name string, args *CamUserArgs, opts ...ResourceOption) (*CamUser, error)
    public CamUser(string name, CamUserArgs? args = null, CustomResourceOptions? opts = null)
    public CamUser(String name, CamUserArgs args)
    public CamUser(String name, CamUserArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CamUser
    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 CamUserArgs
    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 CamUserArgs
    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 CamUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CamUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CamUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    CamUserId string
    ID of the resource.
    ConsoleLogin bool
    Indicate whether the CAM user can login to the web console or not.
    CountryCode string
    Country code of the phone number, for example: '86'.
    Email string
    Email of the CAM user.
    ForceDelete bool
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    Name string
    Name of the CAM user.
    NeedResetPassword bool
    Indicate whether the CAM user need to reset the password when first logins.
    Password string
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    PhoneNum string
    Phone number of the CAM user.
    Remark string
    Remark of the CAM user.
    Tags Dictionary<string, string>
    A list of tags used to associate different resources.
    UseApi bool
    Indicate whether to generate the API secret key or not.
    CamUserId string
    ID of the resource.
    ConsoleLogin bool
    Indicate whether the CAM user can login to the web console or not.
    CountryCode string
    Country code of the phone number, for example: '86'.
    Email string
    Email of the CAM user.
    ForceDelete bool
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    Name string
    Name of the CAM user.
    NeedResetPassword bool
    Indicate whether the CAM user need to reset the password when first logins.
    Password string
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    PhoneNum string
    Phone number of the CAM user.
    Remark string
    Remark of the CAM user.
    Tags map[string]string
    A list of tags used to associate different resources.
    UseApi bool
    Indicate whether to generate the API secret key or not.
    camUserId String
    ID of the resource.
    consoleLogin Boolean
    Indicate whether the CAM user can login to the web console or not.
    countryCode String
    Country code of the phone number, for example: '86'.
    email String
    Email of the CAM user.
    forceDelete Boolean
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name String
    Name of the CAM user.
    needResetPassword Boolean
    Indicate whether the CAM user need to reset the password when first logins.
    password String
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phoneNum String
    Phone number of the CAM user.
    remark String
    Remark of the CAM user.
    tags Map<String,String>
    A list of tags used to associate different resources.
    useApi Boolean
    Indicate whether to generate the API secret key or not.
    camUserId string
    ID of the resource.
    consoleLogin boolean
    Indicate whether the CAM user can login to the web console or not.
    countryCode string
    Country code of the phone number, for example: '86'.
    email string
    Email of the CAM user.
    forceDelete boolean
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name string
    Name of the CAM user.
    needResetPassword boolean
    Indicate whether the CAM user need to reset the password when first logins.
    password string
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phoneNum string
    Phone number of the CAM user.
    remark string
    Remark of the CAM user.
    tags {[key: string]: string}
    A list of tags used to associate different resources.
    useApi boolean
    Indicate whether to generate the API secret key or not.
    cam_user_id str
    ID of the resource.
    console_login bool
    Indicate whether the CAM user can login to the web console or not.
    country_code str
    Country code of the phone number, for example: '86'.
    email str
    Email of the CAM user.
    force_delete bool
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name str
    Name of the CAM user.
    need_reset_password bool
    Indicate whether the CAM user need to reset the password when first logins.
    password str
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phone_num str
    Phone number of the CAM user.
    remark str
    Remark of the CAM user.
    tags Mapping[str, str]
    A list of tags used to associate different resources.
    use_api bool
    Indicate whether to generate the API secret key or not.
    camUserId String
    ID of the resource.
    consoleLogin Boolean
    Indicate whether the CAM user can login to the web console or not.
    countryCode String
    Country code of the phone number, for example: '86'.
    email String
    Email of the CAM user.
    forceDelete Boolean
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name String
    Name of the CAM user.
    needResetPassword Boolean
    Indicate whether the CAM user need to reset the password when first logins.
    password String
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phoneNum String
    Phone number of the CAM user.
    remark String
    Remark of the CAM user.
    tags Map<String>
    A list of tags used to associate different resources.
    useApi Boolean
    Indicate whether to generate the API secret key or not.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    SecretId string
    Secret ID of the CAM user.
    SecretKey string
    Secret key of the CAM user.
    Uid double
    ID of the CAM user.
    Uin double
    Uin of the CAM User.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretId string
    Secret ID of the CAM user.
    SecretKey string
    Secret key of the CAM user.
    Uid float64
    ID of the CAM user.
    Uin float64
    Uin of the CAM User.
    id String
    The provider-assigned unique ID for this managed resource.
    secretId String
    Secret ID of the CAM user.
    secretKey String
    Secret key of the CAM user.
    uid Double
    ID of the CAM user.
    uin Double
    Uin of the CAM User.
    id string
    The provider-assigned unique ID for this managed resource.
    secretId string
    Secret ID of the CAM user.
    secretKey string
    Secret key of the CAM user.
    uid number
    ID of the CAM user.
    uin number
    Uin of the CAM User.
    id str
    The provider-assigned unique ID for this managed resource.
    secret_id str
    Secret ID of the CAM user.
    secret_key str
    Secret key of the CAM user.
    uid float
    ID of the CAM user.
    uin float
    Uin of the CAM User.
    id String
    The provider-assigned unique ID for this managed resource.
    secretId String
    Secret ID of the CAM user.
    secretKey String
    Secret key of the CAM user.
    uid Number
    ID of the CAM user.
    uin Number
    Uin of the CAM User.

    Look up Existing CamUser Resource

    Get an existing CamUser 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?: CamUserState, opts?: CustomResourceOptions): CamUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cam_user_id: Optional[str] = None,
            console_login: Optional[bool] = None,
            country_code: Optional[str] = None,
            email: Optional[str] = None,
            force_delete: Optional[bool] = None,
            name: Optional[str] = None,
            need_reset_password: Optional[bool] = None,
            password: Optional[str] = None,
            phone_num: Optional[str] = None,
            remark: Optional[str] = None,
            secret_id: Optional[str] = None,
            secret_key: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            uid: Optional[float] = None,
            uin: Optional[float] = None,
            use_api: Optional[bool] = None) -> CamUser
    func GetCamUser(ctx *Context, name string, id IDInput, state *CamUserState, opts ...ResourceOption) (*CamUser, error)
    public static CamUser Get(string name, Input<string> id, CamUserState? state, CustomResourceOptions? opts = null)
    public static CamUser get(String name, Output<String> id, CamUserState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CamUser    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:
    CamUserId string
    ID of the resource.
    ConsoleLogin bool
    Indicate whether the CAM user can login to the web console or not.
    CountryCode string
    Country code of the phone number, for example: '86'.
    Email string
    Email of the CAM user.
    ForceDelete bool
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    Name string
    Name of the CAM user.
    NeedResetPassword bool
    Indicate whether the CAM user need to reset the password when first logins.
    Password string
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    PhoneNum string
    Phone number of the CAM user.
    Remark string
    Remark of the CAM user.
    SecretId string
    Secret ID of the CAM user.
    SecretKey string
    Secret key of the CAM user.
    Tags Dictionary<string, string>
    A list of tags used to associate different resources.
    Uid double
    ID of the CAM user.
    Uin double
    Uin of the CAM User.
    UseApi bool
    Indicate whether to generate the API secret key or not.
    CamUserId string
    ID of the resource.
    ConsoleLogin bool
    Indicate whether the CAM user can login to the web console or not.
    CountryCode string
    Country code of the phone number, for example: '86'.
    Email string
    Email of the CAM user.
    ForceDelete bool
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    Name string
    Name of the CAM user.
    NeedResetPassword bool
    Indicate whether the CAM user need to reset the password when first logins.
    Password string
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    PhoneNum string
    Phone number of the CAM user.
    Remark string
    Remark of the CAM user.
    SecretId string
    Secret ID of the CAM user.
    SecretKey string
    Secret key of the CAM user.
    Tags map[string]string
    A list of tags used to associate different resources.
    Uid float64
    ID of the CAM user.
    Uin float64
    Uin of the CAM User.
    UseApi bool
    Indicate whether to generate the API secret key or not.
    camUserId String
    ID of the resource.
    consoleLogin Boolean
    Indicate whether the CAM user can login to the web console or not.
    countryCode String
    Country code of the phone number, for example: '86'.
    email String
    Email of the CAM user.
    forceDelete Boolean
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name String
    Name of the CAM user.
    needResetPassword Boolean
    Indicate whether the CAM user need to reset the password when first logins.
    password String
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phoneNum String
    Phone number of the CAM user.
    remark String
    Remark of the CAM user.
    secretId String
    Secret ID of the CAM user.
    secretKey String
    Secret key of the CAM user.
    tags Map<String,String>
    A list of tags used to associate different resources.
    uid Double
    ID of the CAM user.
    uin Double
    Uin of the CAM User.
    useApi Boolean
    Indicate whether to generate the API secret key or not.
    camUserId string
    ID of the resource.
    consoleLogin boolean
    Indicate whether the CAM user can login to the web console or not.
    countryCode string
    Country code of the phone number, for example: '86'.
    email string
    Email of the CAM user.
    forceDelete boolean
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name string
    Name of the CAM user.
    needResetPassword boolean
    Indicate whether the CAM user need to reset the password when first logins.
    password string
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phoneNum string
    Phone number of the CAM user.
    remark string
    Remark of the CAM user.
    secretId string
    Secret ID of the CAM user.
    secretKey string
    Secret key of the CAM user.
    tags {[key: string]: string}
    A list of tags used to associate different resources.
    uid number
    ID of the CAM user.
    uin number
    Uin of the CAM User.
    useApi boolean
    Indicate whether to generate the API secret key or not.
    cam_user_id str
    ID of the resource.
    console_login bool
    Indicate whether the CAM user can login to the web console or not.
    country_code str
    Country code of the phone number, for example: '86'.
    email str
    Email of the CAM user.
    force_delete bool
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name str
    Name of the CAM user.
    need_reset_password bool
    Indicate whether the CAM user need to reset the password when first logins.
    password str
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phone_num str
    Phone number of the CAM user.
    remark str
    Remark of the CAM user.
    secret_id str
    Secret ID of the CAM user.
    secret_key str
    Secret key of the CAM user.
    tags Mapping[str, str]
    A list of tags used to associate different resources.
    uid float
    ID of the CAM user.
    uin float
    Uin of the CAM User.
    use_api bool
    Indicate whether to generate the API secret key or not.
    camUserId String
    ID of the resource.
    consoleLogin Boolean
    Indicate whether the CAM user can login to the web console or not.
    countryCode String
    Country code of the phone number, for example: '86'.
    email String
    Email of the CAM user.
    forceDelete Boolean
    Indicate whether to force deletes the CAM user. If set false, the API secret key will be checked and failed when exists; otherwise the user will be deleted directly. Default is false.
    name String
    Name of the CAM user.
    needResetPassword Boolean
    Indicate whether the CAM user need to reset the password when first logins.
    password String
    The password of the CAM user. Password should be at least 8 characters and no more than 32 characters, includes uppercase letters, lowercase letters, numbers and special characters. Only required when console_login is true. If not set, a random password will be automatically generated.
    phoneNum String
    Phone number of the CAM user.
    remark String
    Remark of the CAM user.
    secretId String
    Secret ID of the CAM user.
    secretKey String
    Secret key of the CAM user.
    tags Map<String>
    A list of tags used to associate different resources.
    uid Number
    ID of the CAM user.
    uin Number
    Uin of the CAM User.
    useApi Boolean
    Indicate whether to generate the API secret key or not.

    Import

    CAM user can be imported using the user name, e.g.

    $ pulumi import tencentcloud:index/camUser:CamUser example tf-example
    

    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