1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dms
  5. getEnterpriseUsers
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.dms.getEnterpriseUsers

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetEnterpriseUsers(ctx *Context, args *GetEnterpriseUsersArgs, opts ...InvokeOption) (*GetEnterpriseUsersResult, error)
func GetEnterpriseUsersOutput(ctx *Context, args *GetEnterpriseUsersOutputArgs, opts ...InvokeOption) GetEnterpriseUsersResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetEnterpriseUsersResult> getEnterpriseUsers(GetEnterpriseUsersArgs args, InvokeOptions options)
public static Output<GetEnterpriseUsersResult> getEnterpriseUsers(GetEnterpriseUsersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:dms/getEnterpriseUsers:getEnterpriseUsers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of DMS Enterprise User IDs (UID).
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The role of the user to query.
SearchKey Changes to this property will trigger replacement. string
The keyword used to query users.
Status Changes to this property will trigger replacement. string
The status of the user.
Tid Changes to this property will trigger replacement. int
The ID of the tenant in DMS Enterprise.
Ids Changes to this property will trigger replacement. []string
A list of DMS Enterprise User IDs (UID).
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The role of the user to query.
SearchKey Changes to this property will trigger replacement. string
The keyword used to query users.
Status Changes to this property will trigger replacement. string
The status of the user.
Tid Changes to this property will trigger replacement. int
The ID of the tenant in DMS Enterprise.
ids Changes to this property will trigger replacement. List<String>
A list of DMS Enterprise User IDs (UID).
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The role of the user to query.
searchKey Changes to this property will trigger replacement. String
The keyword used to query users.
status Changes to this property will trigger replacement. String
The status of the user.
tid Changes to this property will trigger replacement. Integer
The ID of the tenant in DMS Enterprise.
ids Changes to this property will trigger replacement. string[]
A list of DMS Enterprise User IDs (UID).
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The role of the user to query.
searchKey Changes to this property will trigger replacement. string
The keyword used to query users.
status Changes to this property will trigger replacement. string
The status of the user.
tid Changes to this property will trigger replacement. number
The ID of the tenant in DMS Enterprise.
ids Changes to this property will trigger replacement. Sequence[str]
A list of DMS Enterprise User IDs (UID).
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The role of the user to query.
search_key Changes to this property will trigger replacement. str
The keyword used to query users.
status Changes to this property will trigger replacement. str
The status of the user.
tid Changes to this property will trigger replacement. int
The ID of the tenant in DMS Enterprise.
ids Changes to this property will trigger replacement. List<String>
A list of DMS Enterprise User IDs (UID).
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The role of the user to query.
searchKey Changes to this property will trigger replacement. String
The keyword used to query users.
status Changes to this property will trigger replacement. String
The status of the user.
tid Changes to this property will trigger replacement. 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.AliCloud.Dms.Outputs.GetEnterpriseUsersUser>
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 []GetEnterpriseUsersUser
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<GetEnterpriseUsersUser>
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 GetEnterpriseUsersUser[]
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[GetEnterpriseUsersUser]
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 This property is required. string
The Alibaba Cloud unique ID (UID) of the user.
Mobile This property is required. string
The DingTalk number or mobile number of the user.
NickName This property is required. string
The nickname of the user.
ParentUid This property is required. int
The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
RoleIds This property is required. List<int>
The list ids of the role that the user plays.
RoleNames This property is required. List<string>
The list names of the role that he user plays.
Status This property is required. string
The status of the user.
Uid This property is required. string
UserId This property is required. string
The ID of the user.
UserName This property is required. string
The nickname of the user.
Id This property is required. string
The Alibaba Cloud unique ID (UID) of the user.
Mobile This property is required. string
The DingTalk number or mobile number of the user.
NickName This property is required. string
The nickname of the user.
ParentUid This property is required. int
The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
RoleIds This property is required. []int
The list ids of the role that the user plays.
RoleNames This property is required. []string
The list names of the role that he user plays.
Status This property is required. string
The status of the user.
Uid This property is required. string
UserId This property is required. string
The ID of the user.
UserName This property is required. string
The nickname of the user.
id This property is required. String
The Alibaba Cloud unique ID (UID) of the user.
mobile This property is required. String
The DingTalk number or mobile number of the user.
nickName This property is required. String
The nickname of the user.
parentUid This property is required. Integer
The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
roleIds This property is required. List<Integer>
The list ids of the role that the user plays.
roleNames This property is required. List<String>
The list names of the role that he user plays.
status This property is required. String
The status of the user.
uid This property is required. String
userId This property is required. String
The ID of the user.
userName This property is required. String
The nickname of the user.
id This property is required. string
The Alibaba Cloud unique ID (UID) of the user.
mobile This property is required. string
The DingTalk number or mobile number of the user.
nickName This property is required. string
The nickname of the user.
parentUid This property is required. number
The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
roleIds This property is required. number[]
The list ids of the role that the user plays.
roleNames This property is required. string[]
The list names of the role that he user plays.
status This property is required. string
The status of the user.
uid This property is required. string
userId This property is required. string
The ID of the user.
userName This property is required. string
The nickname of the user.
id This property is required. str
The Alibaba Cloud unique ID (UID) of the user.
mobile This property is required. str
The DingTalk number or mobile number of the user.
nick_name This property is required. str
The nickname of the user.
parent_uid This property is required. int
The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
role_ids This property is required. Sequence[int]
The list ids of the role that the user plays.
role_names This property is required. Sequence[str]
The list names of the role that he user plays.
status This property is required. str
The status of the user.
uid This property is required. str
user_id This property is required. str
The ID of the user.
user_name This property is required. str
The nickname of the user.
id This property is required. String
The Alibaba Cloud unique ID (UID) of the user.
mobile This property is required. String
The DingTalk number or mobile number of the user.
nickName This property is required. String
The nickname of the user.
parentUid This property is required. Number
The Alibaba Cloud unique ID (UID) of the parent account if the user corresponds to a Resource Access Management (RAM) user.
roleIds This property is required. List<Number>
The list ids of the role that the user plays.
roleNames This property is required. List<String>
The list names of the role that he user plays.
status This property is required. String
The status of the user.
uid This property is required. String
userId This property is required. String
The ID of the user.
userName This property is required. 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 alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi