tencentcloud.CamMfaFlag
Explore with Pulumi AI
Provides a resource to create a CAM mfa flag
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const info = tencentcloud.getUserInfo({});
const example = new tencentcloud.CamMfaFlag("example", {
opUin: info.then(info => info.uin),
loginFlag: {
phone: 0,
stoken: 1,
wechat: 0,
},
actionFlag: {
phone: 0,
stoken: 1,
wechat: 0,
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
info = tencentcloud.get_user_info()
example = tencentcloud.CamMfaFlag("example",
op_uin=info.uin,
login_flag={
"phone": 0,
"stoken": 1,
"wechat": 0,
},
action_flag={
"phone": 0,
"stoken": 1,
"wechat": 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 {
info, err := tencentcloud.GetUserInfo(ctx, &tencentcloud.GetUserInfoArgs{}, nil)
if err != nil {
return err
}
_, err = tencentcloud.NewCamMfaFlag(ctx, "example", &tencentcloud.CamMfaFlagArgs{
OpUin: pulumi.String(info.Uin),
LoginFlag: &tencentcloud.CamMfaFlagLoginFlagArgs{
Phone: pulumi.Float64(0),
Stoken: pulumi.Float64(1),
Wechat: pulumi.Float64(0),
},
ActionFlag: &tencentcloud.CamMfaFlagActionFlagArgs{
Phone: pulumi.Float64(0),
Stoken: pulumi.Float64(1),
Wechat: 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 info = Tencentcloud.GetUserInfo.Invoke();
var example = new Tencentcloud.CamMfaFlag("example", new()
{
OpUin = info.Apply(getUserInfoResult => getUserInfoResult.Uin),
LoginFlag = new Tencentcloud.Inputs.CamMfaFlagLoginFlagArgs
{
Phone = 0,
Stoken = 1,
Wechat = 0,
},
ActionFlag = new Tencentcloud.Inputs.CamMfaFlagActionFlagArgs
{
Phone = 0,
Stoken = 1,
Wechat = 0,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetUserInfoArgs;
import com.pulumi.tencentcloud.CamMfaFlag;
import com.pulumi.tencentcloud.CamMfaFlagArgs;
import com.pulumi.tencentcloud.inputs.CamMfaFlagLoginFlagArgs;
import com.pulumi.tencentcloud.inputs.CamMfaFlagActionFlagArgs;
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) {
final var info = TencentcloudFunctions.getUserInfo();
var example = new CamMfaFlag("example", CamMfaFlagArgs.builder()
.opUin(info.applyValue(getUserInfoResult -> getUserInfoResult.uin()))
.loginFlag(CamMfaFlagLoginFlagArgs.builder()
.phone(0)
.stoken(1)
.wechat(0)
.build())
.actionFlag(CamMfaFlagActionFlagArgs.builder()
.phone(0)
.stoken(1)
.wechat(0)
.build())
.build());
}
}
resources:
example:
type: tencentcloud:CamMfaFlag
properties:
opUin: ${info.uin}
loginFlag:
phone: 0
stoken: 1
wechat: 0
actionFlag:
phone: 0
stoken: 1
wechat: 0
variables:
info:
fn::invoke:
function: tencentcloud:getUserInfo
arguments: {}
Create CamMfaFlag Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CamMfaFlag(name: string, args: CamMfaFlagArgs, opts?: CustomResourceOptions);
@overload
def CamMfaFlag(resource_name: str,
args: CamMfaFlagArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CamMfaFlag(resource_name: str,
opts: Optional[ResourceOptions] = None,
op_uin: Optional[float] = None,
action_flag: Optional[CamMfaFlagActionFlagArgs] = None,
cam_mfa_flag_id: Optional[str] = None,
login_flag: Optional[CamMfaFlagLoginFlagArgs] = None)
func NewCamMfaFlag(ctx *Context, name string, args CamMfaFlagArgs, opts ...ResourceOption) (*CamMfaFlag, error)
public CamMfaFlag(string name, CamMfaFlagArgs args, CustomResourceOptions? opts = null)
public CamMfaFlag(String name, CamMfaFlagArgs args)
public CamMfaFlag(String name, CamMfaFlagArgs args, CustomResourceOptions options)
type: tencentcloud:CamMfaFlag
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 CamMfaFlagArgs
- 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 CamMfaFlagArgs
- 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 CamMfaFlagArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CamMfaFlagArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CamMfaFlagArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CamMfaFlag 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 CamMfaFlag resource accepts the following input properties:
- Op
Uin double - Operate uin.
- Action
Flag CamMfa Flag Action Flag - Action flag setting.
- Cam
Mfa stringFlag Id - ID of the resource.
- Login
Flag CamMfa Flag Login Flag - Login flag setting.
- Op
Uin float64 - Operate uin.
- Action
Flag CamMfa Flag Action Flag Args - Action flag setting.
- Cam
Mfa stringFlag Id - ID of the resource.
- Login
Flag CamMfa Flag Login Flag Args - Login flag setting.
- op
Uin Double - Operate uin.
- action
Flag CamMfa Flag Action Flag - Action flag setting.
- cam
Mfa StringFlag Id - ID of the resource.
- login
Flag CamMfa Flag Login Flag - Login flag setting.
- op
Uin number - Operate uin.
- action
Flag CamMfa Flag Action Flag - Action flag setting.
- cam
Mfa stringFlag Id - ID of the resource.
- login
Flag CamMfa Flag Login Flag - Login flag setting.
- op_
uin float - Operate uin.
- action_
flag CamMfa Flag Action Flag Args - Action flag setting.
- cam_
mfa_ strflag_ id - ID of the resource.
- login_
flag CamMfa Flag Login Flag Args - Login flag setting.
- op
Uin Number - Operate uin.
- action
Flag Property Map - Action flag setting.
- cam
Mfa StringFlag Id - ID of the resource.
- login
Flag Property Map - Login flag setting.
Outputs
All input properties are implicitly available as output properties. Additionally, the CamMfaFlag 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 CamMfaFlag Resource
Get an existing CamMfaFlag 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?: CamMfaFlagState, opts?: CustomResourceOptions): CamMfaFlag
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action_flag: Optional[CamMfaFlagActionFlagArgs] = None,
cam_mfa_flag_id: Optional[str] = None,
login_flag: Optional[CamMfaFlagLoginFlagArgs] = None,
op_uin: Optional[float] = None) -> CamMfaFlag
func GetCamMfaFlag(ctx *Context, name string, id IDInput, state *CamMfaFlagState, opts ...ResourceOption) (*CamMfaFlag, error)
public static CamMfaFlag Get(string name, Input<string> id, CamMfaFlagState? state, CustomResourceOptions? opts = null)
public static CamMfaFlag get(String name, Output<String> id, CamMfaFlagState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CamMfaFlag 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.
- Action
Flag CamMfa Flag Action Flag - Action flag setting.
- Cam
Mfa stringFlag Id - ID of the resource.
- Login
Flag CamMfa Flag Login Flag - Login flag setting.
- Op
Uin double - Operate uin.
- Action
Flag CamMfa Flag Action Flag Args - Action flag setting.
- Cam
Mfa stringFlag Id - ID of the resource.
- Login
Flag CamMfa Flag Login Flag Args - Login flag setting.
- Op
Uin float64 - Operate uin.
- action
Flag CamMfa Flag Action Flag - Action flag setting.
- cam
Mfa StringFlag Id - ID of the resource.
- login
Flag CamMfa Flag Login Flag - Login flag setting.
- op
Uin Double - Operate uin.
- action
Flag CamMfa Flag Action Flag - Action flag setting.
- cam
Mfa stringFlag Id - ID of the resource.
- login
Flag CamMfa Flag Login Flag - Login flag setting.
- op
Uin number - Operate uin.
- action_
flag CamMfa Flag Action Flag Args - Action flag setting.
- cam_
mfa_ strflag_ id - ID of the resource.
- login_
flag CamMfa Flag Login Flag Args - Login flag setting.
- op_
uin float - Operate uin.
- action
Flag Property Map - Action flag setting.
- cam
Mfa StringFlag Id - ID of the resource.
- login
Flag Property Map - Login flag setting.
- op
Uin Number - Operate uin.
Supporting Types
CamMfaFlagActionFlag, CamMfaFlagActionFlagArgs
CamMfaFlagLoginFlag, CamMfaFlagLoginFlagArgs
Import
CAM mfa flag can be imported using the id, e.g.
$ pulumi import tencentcloud:index/camMfaFlag:CamMfaFlag example 100037718110
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.