Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.dms.getEnterpriseUsers
Explore with Pulumi AI
This data source provides a list of DMS Enterprise Users in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.90.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const dmsEnterpriseUsersDs = alicloud.dms.getEnterpriseUsers({
    ids: ["uid"],
    role: "USER",
    status: "NORMAL",
});
export const firstUserId = dmsEnterpriseUsersDs.then(dmsEnterpriseUsersDs => dmsEnterpriseUsersDs.users?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
dms_enterprise_users_ds = alicloud.dms.get_enterprise_users(ids=["uid"],
    role="USER",
    status="NORMAL")
pulumi.export("firstUserId", dms_enterprise_users_ds.users[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Declare the data source
		dmsEnterpriseUsersDs, err := dms.GetEnterpriseUsers(ctx, &dms.GetEnterpriseUsersArgs{
			Ids: []string{
				"uid",
			},
			Role:   pulumi.StringRef("USER"),
			Status: pulumi.StringRef("NORMAL"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstUserId", dmsEnterpriseUsersDs.Users[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    // Declare the data source
    var dmsEnterpriseUsersDs = AliCloud.Dms.GetEnterpriseUsers.Invoke(new()
    {
        Ids = new[]
        {
            "uid",
        },
        Role = "USER",
        Status = "NORMAL",
    });
    return new Dictionary<string, object?>
    {
        ["firstUserId"] = dmsEnterpriseUsersDs.Apply(getEnterpriseUsersResult => getEnterpriseUsersResult.Users[0]?.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dms.DmsFunctions;
import com.pulumi.alicloud.dms.inputs.GetEnterpriseUsersArgs;
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) {
        // Declare the data source
        final var dmsEnterpriseUsersDs = DmsFunctions.getEnterpriseUsers(GetEnterpriseUsersArgs.builder()
            .ids("uid")
            .role("USER")
            .status("NORMAL")
            .build());
        ctx.export("firstUserId", dmsEnterpriseUsersDs.applyValue(getEnterpriseUsersResult -> getEnterpriseUsersResult.users()[0].id()));
    }
}
variables:
  # Declare the data source
  dmsEnterpriseUsersDs:
    fn::invoke:
      function: alicloud:dms:getEnterpriseUsers
      arguments:
        ids:
          - uid
        role: USER
        status: NORMAL
outputs:
  firstUserId: ${dmsEnterpriseUsersDs.users[0].id}
Using getEnterpriseUsers
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEnterpriseUsers(args: GetEnterpriseUsersArgs, opts?: InvokeOptions): Promise<GetEnterpriseUsersResult>
function getEnterpriseUsersOutput(args: GetEnterpriseUsersOutputArgs, opts?: InvokeOptions): Output<GetEnterpriseUsersResult>def get_enterprise_users(ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         role: Optional[str] = None,
                         search_key: Optional[str] = None,
                         status: Optional[str] = None,
                         tid: Optional[int] = None,
                         opts: Optional[InvokeOptions] = None) -> GetEnterpriseUsersResult
def get_enterprise_users_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         role: Optional[pulumi.Input[str]] = None,
                         search_key: Optional[pulumi.Input[str]] = None,
                         status: Optional[pulumi.Input[str]] = None,
                         tid: Optional[pulumi.Input[int]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetEnterpriseUsersResult]func GetEnterpriseUsers(ctx *Context, args *GetEnterpriseUsersArgs, opts ...InvokeOption) (*GetEnterpriseUsersResult, error)
func GetEnterpriseUsersOutput(ctx *Context, args *GetEnterpriseUsersOutputArgs, opts ...InvokeOption) GetEnterpriseUsersResultOutput> Note: This function is named GetEnterpriseUsers in the Go SDK.
public static class GetEnterpriseUsers 
{
    public static Task<GetEnterpriseUsersResult> InvokeAsync(GetEnterpriseUsersArgs args, InvokeOptions? opts = null)
    public static Output<GetEnterpriseUsersResult> Invoke(GetEnterpriseUsersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEnterpriseUsersResult> getEnterpriseUsers(GetEnterpriseUsersArgs args, InvokeOptions options)
public static Output<GetEnterpriseUsersResult> getEnterpriseUsers(GetEnterpriseUsersArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:dms/getEnterpriseUsers:getEnterpriseUsers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of DMS Enterprise User IDs (UID).
- NameRegex string
- A regex string to filter the results by the DMS Enterprise User nick_name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Role string
- The role of the user to query.
- SearchKey string
- The keyword used to query users.
- Status string
- The status of the user.
- Tid int
- The ID of the tenant in DMS Enterprise.
- Ids []string
- A list of DMS Enterprise User IDs (UID).
- NameRegex string
- A regex string to filter the results by the DMS Enterprise User nick_name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Role string
- The role of the user to query.
- SearchKey string
- The keyword used to query users.
- Status string
- The status of the user.
- Tid int
- The ID of the tenant in DMS Enterprise.
- ids List<String>
- A list of DMS Enterprise User IDs (UID).
- nameRegex String
- A regex string to filter the results by the DMS Enterprise User nick_name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- role String
- The role of the user to query.
- searchKey String
- The keyword used to query users.
- status String
- The status of the user.
- tid Integer
- The ID of the tenant in DMS Enterprise.
- ids string[]
- A list of DMS Enterprise User IDs (UID).
- nameRegex string
- A regex string to filter the results by the DMS Enterprise User nick_name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- role string
- The role of the user to query.
- searchKey string
- The keyword used to query users.
- status string
- The status of the user.
- tid number
- The ID of the tenant in DMS Enterprise.
- ids Sequence[str]
- A list of DMS Enterprise User IDs (UID).
- name_regex str
- A regex string to filter the results by the DMS Enterprise User nick_name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- role str
- The role of the user to query.
- search_key str
- The keyword used to query users.
- status str
- The status of the user.
- tid int
- The ID of the tenant in DMS Enterprise.
- ids List<String>
- A list of DMS Enterprise User IDs (UID).
- nameRegex String
- A regex string to filter the results by the DMS Enterprise User nick_name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- role String
- The role of the user to query.
- searchKey String
- The keyword used to query users.
- status String
- The status of the user.
- tid Number
- The ID of the tenant in DMS Enterprise.
getEnterpriseUsers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of DMS Enterprise User IDs (UID).
- Names List<string>
- A list of DMS Enterprise User names.
- Users
List<Pulumi.Ali Cloud. Dms. Outputs. Get Enterprise Users User> 
- A list of DMS Enterprise Users. Each element contains the following attributes:
- NameRegex string
- OutputFile string
- Role string
- SearchKey string
- Status string
- The status of the user.
- Tid int
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of DMS Enterprise User IDs (UID).
- Names []string
- A list of DMS Enterprise User names.
- Users
[]GetEnterprise Users User 
- A list of DMS Enterprise Users. Each element contains the following attributes:
- NameRegex string
- OutputFile string
- Role string
- SearchKey string
- Status string
- The status of the user.
- Tid int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of DMS Enterprise User IDs (UID).
- names List<String>
- A list of DMS Enterprise User names.
- users
List<GetEnterprise Users User> 
- A list of DMS Enterprise Users. Each element contains the following attributes:
- nameRegex String
- outputFile String
- role String
- searchKey String
- status String
- The status of the user.
- tid Integer
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of DMS Enterprise User IDs (UID).
- names string[]
- A list of DMS Enterprise User names.
- users
GetEnterprise Users User[] 
- A list of DMS Enterprise Users. Each element contains the following attributes:
- nameRegex string
- outputFile string
- role string
- searchKey string
- status string
- The status of the user.
- tid number
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of DMS Enterprise User IDs (UID).
- names Sequence[str]
- A list of DMS Enterprise User names.
- users
Sequence[GetEnterprise Users User] 
- A list of DMS Enterprise Users. Each element contains the following attributes:
- name_regex str
- output_file str
- role str
- search_key str
- status str
- The status of the user.
- tid int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of DMS Enterprise User IDs (UID).
- names List<String>
- A list of DMS Enterprise User names.
- users List<Property Map>
- A list of DMS Enterprise Users. Each element contains the following attributes:
- nameRegex String
- outputFile String
- role String
- searchKey String
- status String
- The status of the user.
- tid Number
Supporting Types
GetEnterpriseUsersUser   
- Id string
- The Alibaba Cloud unique ID (UID) of the user.
- Mobile string
- The DingTalk number or mobile number of the user.
- NickName string
- The nickname of the user.
- ParentUid int
- The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
- RoleIds List<int>
- The list ids of the role that the user plays.
- RoleNames List<string>
- The list names of the role that he user plays.
- Status string
- The status of the user.
- Uid string
- UserId string
- The ID of the user.
- UserName string
- The nickname of the user.
- Id string
- The Alibaba Cloud unique ID (UID) of the user.
- Mobile string
- The DingTalk number or mobile number of the user.
- NickName string
- The nickname of the user.
- ParentUid int
- The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
- RoleIds []int
- The list ids of the role that the user plays.
- RoleNames []string
- The list names of the role that he user plays.
- Status string
- The status of the user.
- Uid string
- UserId string
- The ID of the user.
- UserName string
- The nickname of the user.
- id String
- The Alibaba Cloud unique ID (UID) of the user.
- mobile String
- The DingTalk number or mobile number of the user.
- nickName String
- The nickname of the user.
- parentUid Integer
- The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
- roleIds List<Integer>
- The list ids of the role that the user plays.
- roleNames List<String>
- The list names of the role that he user plays.
- status String
- The status of the user.
- uid String
- userId String
- The ID of the user.
- userName String
- The nickname of the user.
- id string
- The Alibaba Cloud unique ID (UID) of the user.
- mobile string
- The DingTalk number or mobile number of the user.
- nickName string
- The nickname of the user.
- parentUid number
- The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
- roleIds number[]
- The list ids of the role that the user plays.
- roleNames string[]
- The list names of the role that he user plays.
- status string
- The status of the user.
- uid string
- userId string
- The ID of the user.
- userName string
- The nickname of the user.
- id str
- The Alibaba Cloud unique ID (UID) of the user.
- mobile str
- The DingTalk number or mobile number of the user.
- nick_name str
- The nickname of the user.
- parent_uid int
- The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
- role_ids Sequence[int]
- The list ids of the role that the user plays.
- role_names Sequence[str]
- The list names of the role that he user plays.
- status str
- The status of the user.
- uid str
- user_id str
- The ID of the user.
- user_name str
- The nickname of the user.
- id String
- The Alibaba Cloud unique ID (UID) of the user.
- mobile String
- The DingTalk number or mobile number of the user.
- nickName String
- The nickname of the user.
- parentUid Number
- The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
- roleIds List<Number>
- The list ids of the role that the user plays.
- roleNames List<String>
- The list names of the role that he user plays.
- status String
- The status of the user.
- uid String
- userId String
- The ID of the user.
- userName String
- The nickname of the user.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.