alicloud.dms.EnterpriseUser
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tfexamplename";
const _default = new alicloud.ram.User("default", {
name: name,
displayName: name,
mobile: "86-18688888888",
email: "hello.uuu@aaa.com",
comments: "example",
});
const defaultEnterpriseUser = new alicloud.dms.EnterpriseUser("default", {
uid: _default.id,
userName: name,
roleNames: ["DBA"],
mobile: "86-18688888888",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tfexamplename"
default = alicloud.ram.User("default",
name=name,
display_name=name,
mobile="86-18688888888",
email="hello.uuu@aaa.com",
comments="example")
default_enterprise_user = alicloud.dms.EnterpriseUser("default",
uid=default.id,
user_name=name,
role_names=["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
}
_, err := ram.NewUser(ctx, "default", &ram.UserArgs{
Name: pulumi.String(name),
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, "default", &dms.EnterpriseUserArgs{
Uid: _default.ID(),
UserName: pulumi.String(name),
RoleNames: pulumi.StringArray{
pulumi.String("DBA"),
},
Mobile: pulumi.String("86-18688888888"),
})
if err != nil {
return err
}
return nil
})
}
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 @default = new AliCloud.Ram.User("default", new()
{
Name = name,
DisplayName = name,
Mobile = "86-18688888888",
Email = "hello.uuu@aaa.com",
Comments = "example",
});
var defaultEnterpriseUser = new AliCloud.Dms.EnterpriseUser("default", new()
{
Uid = @default.Id,
UserName = name,
RoleNames = new[]
{
"DBA",
},
Mobile = "86-18688888888",
});
});
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 default_ = new User("default", UserArgs.builder()
.name(name)
.displayName(name)
.mobile("86-18688888888")
.email("hello.uuu@aaa.com")
.comments("example")
.build());
var defaultEnterpriseUser = new EnterpriseUser("defaultEnterpriseUser", EnterpriseUserArgs.builder()
.uid(default_.id())
.userName(name)
.roleNames("DBA")
.mobile("86-18688888888")
.build());
}
}
configuration:
name:
type: string
default: tfexamplename
resources:
default:
type: alicloud:ram:User
properties:
name: ${name}
displayName: ${name}
mobile: 86-18688888888
email: hello.uuu@aaa.com
comments: example
defaultEnterpriseUser:
type: alicloud:dms:EnterpriseUser
name: default
properties:
uid: ${default.id}
userName: ${name}
roleNames:
- DBA
mobile: 86-18688888888
Create EnterpriseUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnterpriseUser(name: string, args: EnterpriseUserArgs, opts?: CustomResourceOptions);
@overload
def EnterpriseUser(resource_name: str,
args: EnterpriseUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnterpriseUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
uid: Optional[str] = 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,
user_name: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var enterpriseUserResource = new AliCloud.Dms.EnterpriseUser("enterpriseUserResource", new()
{
Uid = "string",
MaxExecuteCount = 0,
MaxResultCount = 0,
Mobile = "string",
RoleNames = new[]
{
"string",
},
Status = "string",
Tid = 0,
UserName = "string",
});
example, err := dms.NewEnterpriseUser(ctx, "enterpriseUserResource", &dms.EnterpriseUserArgs{
Uid: pulumi.String("string"),
MaxExecuteCount: pulumi.Int(0),
MaxResultCount: pulumi.Int(0),
Mobile: pulumi.String("string"),
RoleNames: pulumi.StringArray{
pulumi.String("string"),
},
Status: pulumi.String("string"),
Tid: pulumi.Int(0),
UserName: pulumi.String("string"),
})
var enterpriseUserResource = new EnterpriseUser("enterpriseUserResource", EnterpriseUserArgs.builder()
.uid("string")
.maxExecuteCount(0)
.maxResultCount(0)
.mobile("string")
.roleNames("string")
.status("string")
.tid(0)
.userName("string")
.build());
enterprise_user_resource = alicloud.dms.EnterpriseUser("enterpriseUserResource",
uid="string",
max_execute_count=0,
max_result_count=0,
mobile="string",
role_names=["string"],
status="string",
tid=0,
user_name="string")
const enterpriseUserResource = new alicloud.dms.EnterpriseUser("enterpriseUserResource", {
uid: "string",
maxExecuteCount: 0,
maxResultCount: 0,
mobile: "string",
roleNames: ["string"],
status: "string",
tid: 0,
userName: "string",
});
type: alicloud:dms:EnterpriseUser
properties:
maxExecuteCount: 0
maxResultCount: 0
mobile: string
roleNames:
- string
status: string
tid: 0
uid: string
userName: string
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.
- Max
Execute intCount - Maximum number of inquiries on the day.
- Max
Result intCount - Query the maximum number of rows on the day.
- Mobile string
- The DingTalk number or mobile number of the user.
- Nick
Name string - It has been deprecated from 1.100.0 and use
user_name
instead. - Role
Names 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.
- User
Name string - The nickname of the user.
- Uid string
- The Alibaba Cloud unique ID (UID) of the user to add.
- Max
Execute intCount - Maximum number of inquiries on the day.
- Max
Result intCount - Query the maximum number of rows on the day.
- Mobile string
- The DingTalk number or mobile number of the user.
- Nick
Name string - It has been deprecated from 1.100.0 and use
user_name
instead. - Role
Names []string - The roles that the user plays.
- Status string
- The state of DMS Enterprise User. Valid values:
NORMAL
,DISABLE
. - Tid int
- The tenant ID.
- User
Name string - The nickname of the user.
- uid String
- The Alibaba Cloud unique ID (UID) of the user to add.
- max
Execute IntegerCount - Maximum number of inquiries on the day.
- max
Result IntegerCount - Query the maximum number of rows on the day.
- mobile String
- The DingTalk number or mobile number of the user.
- nick
Name String - It has been deprecated from 1.100.0 and use
user_name
instead. - role
Names 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.
- user
Name String - The nickname of the user.
- uid string
- The Alibaba Cloud unique ID (UID) of the user to add.
- max
Execute numberCount - Maximum number of inquiries on the day.
- max
Result numberCount - Query the maximum number of rows on the day.
- mobile string
- The DingTalk number or mobile number of the user.
- nick
Name string - It has been deprecated from 1.100.0 and use
user_name
instead. - role
Names string[] - The roles that the user plays.
- status string
- The state of DMS Enterprise User. Valid values:
NORMAL
,DISABLE
. - tid number
- The tenant ID.
- user
Name string - The nickname of the user.
- uid str
- The Alibaba Cloud unique ID (UID) of the user to add.
- max_
execute_ intcount - Maximum number of inquiries on the day.
- max_
result_ intcount - 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. - 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.
- max
Execute NumberCount - Maximum number of inquiries on the day.
- max
Result NumberCount - Query the maximum number of rows on the day.
- mobile String
- The DingTalk number or mobile number of the user.
- nick
Name String - It has been deprecated from 1.100.0 and use
user_name
instead. - role
Names 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.
- user
Name 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.
- Max
Execute intCount - Maximum number of inquiries on the day.
- Max
Result intCount - Query the maximum number of rows on the day.
- Mobile string
- The DingTalk number or mobile number of the user.
- Nick
Name string - It has been deprecated from 1.100.0 and use
user_name
instead. - Role
Names 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.
- User
Name string - The nickname of the user.
- Max
Execute intCount - Maximum number of inquiries on the day.
- Max
Result intCount - Query the maximum number of rows on the day.
- Mobile string
- The DingTalk number or mobile number of the user.
- Nick
Name string - It has been deprecated from 1.100.0 and use
user_name
instead. - Role
Names []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.
- User
Name string - The nickname of the user.
- max
Execute IntegerCount - Maximum number of inquiries on the day.
- max
Result IntegerCount - Query the maximum number of rows on the day.
- mobile String
- The DingTalk number or mobile number of the user.
- nick
Name String - It has been deprecated from 1.100.0 and use
user_name
instead. - role
Names 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.
- user
Name String - The nickname of the user.
- max
Execute numberCount - Maximum number of inquiries on the day.
- max
Result numberCount - Query the maximum number of rows on the day.
- mobile string
- The DingTalk number or mobile number of the user.
- nick
Name string - It has been deprecated from 1.100.0 and use
user_name
instead. - role
Names 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.
- user
Name string - The nickname of the user.
- max_
execute_ intcount - Maximum number of inquiries on the day.
- max_
result_ intcount - 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. - 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.
- max
Execute NumberCount - Maximum number of inquiries on the day.
- max
Result NumberCount - Query the maximum number of rows on the day.
- mobile String
- The DingTalk number or mobile number of the user.
- nick
Name String - It has been deprecated from 1.100.0 and use
user_name
instead. - role
Names 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.
- user
Name 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.