1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dms
  5. EnterpriseUser
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.dms.EnterpriseUser

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    Provides a DMS Enterprise User resource. For information about Alidms Enterprise User and how to use it, see What is Resource Alidms Enterprise User.

    NOTE: Available since v1.90.0.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tfexamplename";
        var defaultUser = new AliCloud.Ram.User("defaultUser", new()
        {
            DisplayName = name,
            Mobile = "86-18688888888",
            Email = "hello.uuu@aaa.com",
            Comments = "example",
        });
    
        var defaultEnterpriseUser = new AliCloud.Dms.EnterpriseUser("defaultEnterpriseUser", new()
        {
            Uid = defaultUser.Id,
            UserName = name,
            RoleNames = new[]
            {
                "DBA",
            },
            Mobile = "86-18688888888",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tfexamplename"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultUser, err := ram.NewUser(ctx, "defaultUser", &ram.UserArgs{
    			DisplayName: pulumi.String(name),
    			Mobile:      pulumi.String("86-18688888888"),
    			Email:       pulumi.String("hello.uuu@aaa.com"),
    			Comments:    pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dms.NewEnterpriseUser(ctx, "defaultEnterpriseUser", &dms.EnterpriseUserArgs{
    			Uid:      defaultUser.ID(),
    			UserName: pulumi.String(name),
    			RoleNames: pulumi.StringArray{
    				pulumi.String("DBA"),
    			},
    			Mobile: pulumi.String("86-18688888888"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ram.User;
    import com.pulumi.alicloud.ram.UserArgs;
    import com.pulumi.alicloud.dms.EnterpriseUser;
    import com.pulumi.alicloud.dms.EnterpriseUserArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("tfexamplename");
            var defaultUser = new User("defaultUser", UserArgs.builder()        
                .displayName(name)
                .mobile("86-18688888888")
                .email("hello.uuu@aaa.com")
                .comments("example")
                .build());
    
            var defaultEnterpriseUser = new EnterpriseUser("defaultEnterpriseUser", EnterpriseUserArgs.builder()        
                .uid(defaultUser.id())
                .userName(name)
                .roleNames("DBA")
                .mobile("86-18688888888")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tfexamplename"
    default_user = alicloud.ram.User("defaultUser",
        display_name=name,
        mobile="86-18688888888",
        email="hello.uuu@aaa.com",
        comments="example")
    default_enterprise_user = alicloud.dms.EnterpriseUser("defaultEnterpriseUser",
        uid=default_user.id,
        user_name=name,
        role_names=["DBA"],
        mobile="86-18688888888")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tfexamplename";
    const defaultUser = new alicloud.ram.User("defaultUser", {
        displayName: name,
        mobile: "86-18688888888",
        email: "hello.uuu@aaa.com",
        comments: "example",
    });
    const defaultEnterpriseUser = new alicloud.dms.EnterpriseUser("defaultEnterpriseUser", {
        uid: defaultUser.id,
        userName: name,
        roleNames: ["DBA"],
        mobile: "86-18688888888",
    });
    
    configuration:
      name:
        type: string
        default: tfexamplename
    resources:
      defaultUser:
        type: alicloud:ram:User
        properties:
          displayName: ${name}
          mobile: 86-18688888888
          email: hello.uuu@aaa.com
          comments: example
      defaultEnterpriseUser:
        type: alicloud:dms:EnterpriseUser
        properties:
          uid: ${defaultUser.id}
          userName: ${name}
          roleNames:
            - DBA
          mobile: 86-18688888888
    

    Create EnterpriseUser Resource

    new EnterpriseUser(name: string, args: EnterpriseUserArgs, opts?: CustomResourceOptions);
    @overload
    def EnterpriseUser(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       max_execute_count: Optional[int] = None,
                       max_result_count: Optional[int] = None,
                       mobile: Optional[str] = None,
                       nick_name: Optional[str] = None,
                       role_names: Optional[Sequence[str]] = None,
                       status: Optional[str] = None,
                       tid: Optional[int] = None,
                       uid: Optional[str] = None,
                       user_name: Optional[str] = None)
    @overload
    def EnterpriseUser(resource_name: str,
                       args: EnterpriseUserArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewEnterpriseUser(ctx *Context, name string, args EnterpriseUserArgs, opts ...ResourceOption) (*EnterpriseUser, error)
    public EnterpriseUser(string name, EnterpriseUserArgs args, CustomResourceOptions? opts = null)
    public EnterpriseUser(String name, EnterpriseUserArgs args)
    public EnterpriseUser(String name, EnterpriseUserArgs args, CustomResourceOptions options)
    
    type: alicloud:dms:EnterpriseUser
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EnterpriseUserArgs
    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 EnterpriseUserArgs
    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 EnterpriseUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnterpriseUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnterpriseUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EnterpriseUser Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EnterpriseUser resource accepts the following input properties:

    Uid string

    The Alibaba Cloud unique ID (UID) of the user to add.

    MaxExecuteCount int

    Maximum number of inquiries on the day.

    MaxResultCount int

    Query the maximum number of rows on the day.

    Mobile string

    The DingTalk number or mobile number of the user.

    NickName string

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    RoleNames List<string>

    The roles that the user plays.

    Status string

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    Tid int

    The tenant ID.

    UserName string

    The nickname of the user.

    Uid string

    The Alibaba Cloud unique ID (UID) of the user to add.

    MaxExecuteCount int

    Maximum number of inquiries on the day.

    MaxResultCount int

    Query the maximum number of rows on the day.

    Mobile string

    The DingTalk number or mobile number of the user.

    NickName string

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    RoleNames []string

    The roles that the user plays.

    Status string

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    Tid int

    The tenant ID.

    UserName string

    The nickname of the user.

    uid String

    The Alibaba Cloud unique ID (UID) of the user to add.

    maxExecuteCount Integer

    Maximum number of inquiries on the day.

    maxResultCount Integer

    Query the maximum number of rows on the day.

    mobile String

    The DingTalk number or mobile number of the user.

    nickName String

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    roleNames List<String>

    The roles that the user plays.

    status String

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid Integer

    The tenant ID.

    userName String

    The nickname of the user.

    uid string

    The Alibaba Cloud unique ID (UID) of the user to add.

    maxExecuteCount number

    Maximum number of inquiries on the day.

    maxResultCount number

    Query the maximum number of rows on the day.

    mobile string

    The DingTalk number or mobile number of the user.

    nickName string

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    roleNames string[]

    The roles that the user plays.

    status string

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid number

    The tenant ID.

    userName string

    The nickname of the user.

    uid str

    The Alibaba Cloud unique ID (UID) of the user to add.

    max_execute_count int

    Maximum number of inquiries on the day.

    max_result_count int

    Query the maximum number of rows on the day.

    mobile str

    The DingTalk number or mobile number of the user.

    nick_name str

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    role_names Sequence[str]

    The roles that the user plays.

    status str

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid int

    The tenant ID.

    user_name str

    The nickname of the user.

    uid String

    The Alibaba Cloud unique ID (UID) of the user to add.

    maxExecuteCount Number

    Maximum number of inquiries on the day.

    maxResultCount Number

    Query the maximum number of rows on the day.

    mobile String

    The DingTalk number or mobile number of the user.

    nickName String

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    roleNames List<String>

    The roles that the user plays.

    status String

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid Number

    The tenant ID.

    userName String

    The nickname of the user.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EnterpriseUser 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 EnterpriseUser Resource

    Get an existing EnterpriseUser 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?: EnterpriseUserState, opts?: CustomResourceOptions): EnterpriseUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            max_execute_count: Optional[int] = None,
            max_result_count: Optional[int] = None,
            mobile: Optional[str] = None,
            nick_name: Optional[str] = None,
            role_names: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            tid: Optional[int] = None,
            uid: Optional[str] = None,
            user_name: Optional[str] = None) -> EnterpriseUser
    func GetEnterpriseUser(ctx *Context, name string, id IDInput, state *EnterpriseUserState, opts ...ResourceOption) (*EnterpriseUser, error)
    public static EnterpriseUser Get(string name, Input<string> id, EnterpriseUserState? state, CustomResourceOptions? opts = null)
    public static EnterpriseUser get(String name, Output<String> id, EnterpriseUserState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    MaxExecuteCount int

    Maximum number of inquiries on the day.

    MaxResultCount int

    Query the maximum number of rows on the day.

    Mobile string

    The DingTalk number or mobile number of the user.

    NickName string

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    RoleNames List<string>

    The roles that the user plays.

    Status string

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    Tid int

    The tenant ID.

    Uid string

    The Alibaba Cloud unique ID (UID) of the user to add.

    UserName string

    The nickname of the user.

    MaxExecuteCount int

    Maximum number of inquiries on the day.

    MaxResultCount int

    Query the maximum number of rows on the day.

    Mobile string

    The DingTalk number or mobile number of the user.

    NickName string

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    RoleNames []string

    The roles that the user plays.

    Status string

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    Tid int

    The tenant ID.

    Uid string

    The Alibaba Cloud unique ID (UID) of the user to add.

    UserName string

    The nickname of the user.

    maxExecuteCount Integer

    Maximum number of inquiries on the day.

    maxResultCount Integer

    Query the maximum number of rows on the day.

    mobile String

    The DingTalk number or mobile number of the user.

    nickName String

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    roleNames List<String>

    The roles that the user plays.

    status String

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid Integer

    The tenant ID.

    uid String

    The Alibaba Cloud unique ID (UID) of the user to add.

    userName String

    The nickname of the user.

    maxExecuteCount number

    Maximum number of inquiries on the day.

    maxResultCount number

    Query the maximum number of rows on the day.

    mobile string

    The DingTalk number or mobile number of the user.

    nickName string

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    roleNames string[]

    The roles that the user plays.

    status string

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid number

    The tenant ID.

    uid string

    The Alibaba Cloud unique ID (UID) of the user to add.

    userName string

    The nickname of the user.

    max_execute_count int

    Maximum number of inquiries on the day.

    max_result_count int

    Query the maximum number of rows on the day.

    mobile str

    The DingTalk number or mobile number of the user.

    nick_name str

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    role_names Sequence[str]

    The roles that the user plays.

    status str

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid int

    The tenant ID.

    uid str

    The Alibaba Cloud unique ID (UID) of the user to add.

    user_name str

    The nickname of the user.

    maxExecuteCount Number

    Maximum number of inquiries on the day.

    maxResultCount Number

    Query the maximum number of rows on the day.

    mobile String

    The DingTalk number or mobile number of the user.

    nickName String

    It has been deprecated from 1.100.0 and use user_name instead.

    Deprecated:

    Field 'nick_name' has been deprecated from version 1.100.0. Use 'user_name' instead.

    roleNames List<String>

    The roles that the user plays.

    status String

    The state of DMS Enterprise User. Valid values: NORMAL, DISABLE.

    tid Number

    The tenant ID.

    uid String

    The Alibaba Cloud unique ID (UID) of the user to add.

    userName String

    The nickname of the user.

    Import

    DMS Enterprise User can be imported using the id, e.g.

     $ pulumi import alicloud:dms/enterpriseUser:EnterpriseUser example 24356xxx
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi