tencentcloud.CamUser
Explore with Pulumi AI
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:
- Cam
User stringId - ID of the resource.
- Console
Login bool - Indicate whether the CAM user can login to the web console or not.
- Country
Code string - Country code of the phone number, for example: '86'.
- Email string
- 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 string
- Name of the CAM user.
- Need
Reset boolPassword - 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. - Phone
Num string - Phone number of the CAM user.
- Remark string
- Remark of the CAM user.
- Dictionary<string, string>
- A list of tags used to associate different resources.
- Use
Api bool - Indicate whether to generate the API secret key or not.
- Cam
User stringId - ID of the resource.
- Console
Login bool - Indicate whether the CAM user can login to the web console or not.
- Country
Code string - Country code of the phone number, for example: '86'.
- Email string
- 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 string
- Name of the CAM user.
- Need
Reset boolPassword - 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. - Phone
Num string - Phone number of the CAM user.
- Remark string
- Remark of the CAM user.
- map[string]string
- A list of tags used to associate different resources.
- Use
Api bool - Indicate whether to generate the API secret key or not.
- cam
User StringId - ID of the resource.
- console
Login Boolean - Indicate whether the CAM user can login to the web console or not.
- country
Code String - Country code of the phone number, for example: '86'.
- email String
- Email of the CAM user.
- force
Delete 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.
- need
Reset BooleanPassword - 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. - phone
Num String - Phone number of the CAM user.
- remark String
- Remark of the CAM user.
- Map<String,String>
- A list of tags used to associate different resources.
- use
Api Boolean - Indicate whether to generate the API secret key or not.
- cam
User stringId - ID of the resource.
- console
Login boolean - Indicate whether the CAM user can login to the web console or not.
- country
Code string - Country code of the phone number, for example: '86'.
- email string
- Email of the CAM user.
- force
Delete 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.
- need
Reset booleanPassword - 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. - phone
Num string - Phone number of the CAM user.
- remark string
- Remark of the CAM user.
- {[key: string]: string}
- A list of tags used to associate different resources.
- use
Api boolean - Indicate whether to generate the API secret key or not.
- cam_
user_ strid - 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_ boolpassword - 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.
- 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.
- cam
User StringId - ID of the resource.
- console
Login Boolean - Indicate whether the CAM user can login to the web console or not.
- country
Code String - Country code of the phone number, for example: '86'.
- email String
- Email of the CAM user.
- force
Delete 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.
- need
Reset BooleanPassword - 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. - phone
Num String - Phone number of the CAM user.
- remark String
- Remark of the CAM user.
- Map<String>
- A list of tags used to associate different resources.
- use
Api 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 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.
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.
- Cam
User stringId - ID of the resource.
- Console
Login bool - Indicate whether the CAM user can login to the web console or not.
- Country
Code string - Country code of the phone number, for example: '86'.
- Email string
- 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 string
- Name of the CAM user.
- Need
Reset boolPassword - 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. - Phone
Num string - Phone number of the CAM user.
- Remark string
- Remark of the CAM user.
- Secret
Id string - Secret ID of the CAM user.
- Secret
Key string - Secret key of the CAM user.
- 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.
- Use
Api bool - Indicate whether to generate the API secret key or not.
- Cam
User stringId - ID of the resource.
- Console
Login bool - Indicate whether the CAM user can login to the web console or not.
- Country
Code string - Country code of the phone number, for example: '86'.
- Email string
- 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 string
- Name of the CAM user.
- Need
Reset boolPassword - 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. - Phone
Num string - Phone number of the CAM user.
- Remark string
- Remark of the CAM user.
- Secret
Id string - Secret ID of the CAM user.
- Secret
Key string - Secret key of the CAM user.
- 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.
- Use
Api bool - Indicate whether to generate the API secret key or not.
- cam
User StringId - ID of the resource.
- console
Login Boolean - Indicate whether the CAM user can login to the web console or not.
- country
Code String - Country code of the phone number, for example: '86'.
- email String
- Email of the CAM user.
- force
Delete 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.
- need
Reset BooleanPassword - 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. - phone
Num String - Phone number of the CAM user.
- remark String
- Remark of the CAM user.
- secret
Id String - Secret ID of the CAM user.
- secret
Key String - Secret key of the CAM user.
- 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.
- use
Api Boolean - Indicate whether to generate the API secret key or not.
- cam
User stringId - ID of the resource.
- console
Login boolean - Indicate whether the CAM user can login to the web console or not.
- country
Code string - Country code of the phone number, for example: '86'.
- email string
- Email of the CAM user.
- force
Delete 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.
- need
Reset booleanPassword - 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. - phone
Num string - Phone number of the CAM user.
- remark string
- Remark of the CAM user.
- secret
Id string - Secret ID of the CAM user.
- secret
Key string - Secret key of the CAM user.
- {[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.
- use
Api boolean - Indicate whether to generate the API secret key or not.
- cam_
user_ strid - 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_ boolpassword - 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.
- 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.
- cam
User StringId - ID of the resource.
- console
Login Boolean - Indicate whether the CAM user can login to the web console or not.
- country
Code String - Country code of the phone number, for example: '86'.
- email String
- Email of the CAM user.
- force
Delete 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.
- need
Reset BooleanPassword - 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. - phone
Num String - Phone number of the CAM user.
- remark String
- Remark of the CAM user.
- secret
Id String - Secret ID of the CAM user.
- secret
Key String - Secret key of the CAM user.
- 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.
- use
Api 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.