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

tencentcloud.CamMfaFlag

Explore with Pulumi AI

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

    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:

    OpUin double
    Operate uin.
    ActionFlag CamMfaFlagActionFlag
    Action flag setting.
    CamMfaFlagId string
    ID of the resource.
    LoginFlag CamMfaFlagLoginFlag
    Login flag setting.
    OpUin float64
    Operate uin.
    ActionFlag CamMfaFlagActionFlagArgs
    Action flag setting.
    CamMfaFlagId string
    ID of the resource.
    LoginFlag CamMfaFlagLoginFlagArgs
    Login flag setting.
    opUin Double
    Operate uin.
    actionFlag CamMfaFlagActionFlag
    Action flag setting.
    camMfaFlagId String
    ID of the resource.
    loginFlag CamMfaFlagLoginFlag
    Login flag setting.
    opUin number
    Operate uin.
    actionFlag CamMfaFlagActionFlag
    Action flag setting.
    camMfaFlagId string
    ID of the resource.
    loginFlag CamMfaFlagLoginFlag
    Login flag setting.
    op_uin float
    Operate uin.
    action_flag CamMfaFlagActionFlagArgs
    Action flag setting.
    cam_mfa_flag_id str
    ID of the resource.
    login_flag CamMfaFlagLoginFlagArgs
    Login flag setting.
    opUin Number
    Operate uin.
    actionFlag Property Map
    Action flag setting.
    camMfaFlagId String
    ID of the resource.
    loginFlag 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.
    The following state arguments are supported:
    ActionFlag CamMfaFlagActionFlag
    Action flag setting.
    CamMfaFlagId string
    ID of the resource.
    LoginFlag CamMfaFlagLoginFlag
    Login flag setting.
    OpUin double
    Operate uin.
    ActionFlag CamMfaFlagActionFlagArgs
    Action flag setting.
    CamMfaFlagId string
    ID of the resource.
    LoginFlag CamMfaFlagLoginFlagArgs
    Login flag setting.
    OpUin float64
    Operate uin.
    actionFlag CamMfaFlagActionFlag
    Action flag setting.
    camMfaFlagId String
    ID of the resource.
    loginFlag CamMfaFlagLoginFlag
    Login flag setting.
    opUin Double
    Operate uin.
    actionFlag CamMfaFlagActionFlag
    Action flag setting.
    camMfaFlagId string
    ID of the resource.
    loginFlag CamMfaFlagLoginFlag
    Login flag setting.
    opUin number
    Operate uin.
    action_flag CamMfaFlagActionFlagArgs
    Action flag setting.
    cam_mfa_flag_id str
    ID of the resource.
    login_flag CamMfaFlagLoginFlagArgs
    Login flag setting.
    op_uin float
    Operate uin.
    actionFlag Property Map
    Action flag setting.
    camMfaFlagId String
    ID of the resource.
    loginFlag Property Map
    Login flag setting.
    opUin Number
    Operate uin.

    Supporting Types

    CamMfaFlagActionFlag, CamMfaFlagActionFlagArgs

    Phone double
    Phone.
    Stoken double
    Soft token.
    Wechat double
    Wechat.
    Phone float64
    Phone.
    Stoken float64
    Soft token.
    Wechat float64
    Wechat.
    phone Double
    Phone.
    stoken Double
    Soft token.
    wechat Double
    Wechat.
    phone number
    Phone.
    stoken number
    Soft token.
    wechat number
    Wechat.
    phone float
    Phone.
    stoken float
    Soft token.
    wechat float
    Wechat.
    phone Number
    Phone.
    stoken Number
    Soft token.
    wechat Number
    Wechat.

    CamMfaFlagLoginFlag, CamMfaFlagLoginFlagArgs

    Phone double
    Phone.
    Stoken double
    Soft token.
    Wechat double
    Wechat.
    Phone float64
    Phone.
    Stoken float64
    Soft token.
    Wechat float64
    Wechat.
    phone Double
    Phone.
    stoken Double
    Soft token.
    wechat Double
    Wechat.
    phone number
    Phone.
    stoken number
    Soft token.
    wechat number
    Wechat.
    phone float
    Phone.
    stoken float
    Soft token.
    wechat float
    Wechat.
    phone Number
    Phone.
    stoken Number
    Soft token.
    wechat Number
    Wechat.

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack