1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dms
  5. getEnterpriseUsers
Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 by Pulumi

alicloud.dms.getEnterpriseUsers

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        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 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 {
    		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
    	})
    }
    
    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) {
            final var dmsEnterpriseUsersDs = DmsFunctions.getEnterpriseUsers(GetEnterpriseUsersArgs.builder()
                .ids("uid")
                .role("USER")
                .status("NORMAL")
                .build());
    
            ctx.export("firstUserId", dmsEnterpriseUsersDs.applyValue(getEnterpriseUsersResult -> getEnterpriseUsersResult.users()[0].id()));
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    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)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const dmsEnterpriseUsersDs = alicloud.dms.getEnterpriseUsers({
        ids: ["uid"],
        role: "USER",
        status: "NORMAL",
    });
    export const firstUserId = dmsEnterpriseUsersDs.then(dmsEnterpriseUsersDs => dmsEnterpriseUsersDs.users?.[0]?.id);
    
    variables:
      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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:dms/getEnterpriseUsers:getEnterpriseUsers
      arguments:
        # arguments dictionary

    The 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.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 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 alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 by Pulumi