alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.eds.getUsers

This data source provides the Elastic Desktop Service (ECD) Users of the current Alibaba Cloud user.

NOTE: Available in v1.142.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Eds.User("default", new()
    {
        EndUserId = "example_value",
        Email = "your_email",
        Phone = "your_phone",
        Password = "your_password",
    });

    var ids = AliCloud.Eds.GetUsers.Invoke();

    return new Dictionary<string, object?>
    {
        ["ecdUserId1"] = ids.Apply(getUsersResult => getUsersResult.Users[0]?.Id),
    };
});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eds.NewUser(ctx, "default", &eds.UserArgs{
			EndUserId: pulumi.String("example_value"),
			Email:     pulumi.String("your_email"),
			Phone:     pulumi.String("your_phone"),
			Password:  pulumi.String("your_password"),
		})
		if err != nil {
			return err
		}
		ids, err := eds.GetUsers(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("ecdUserId1", ids.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.eds.User;
import com.pulumi.alicloud.eds.UserArgs;
import com.pulumi.alicloud.eds.EdsFunctions;
import com.pulumi.alicloud.eds.inputs.GetUsersArgs;
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) {
        var default_ = new User("default", UserArgs.builder()        
            .endUserId("example_value")
            .email("your_email")
            .phone("your_phone")
            .password("your_password")
            .build());

        final var ids = EdsFunctions.getUsers();

        ctx.export("ecdUserId1", ids.applyValue(getUsersResult -> getUsersResult.users()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.eds.User("default",
    end_user_id="example_value",
    email="your_email",
    phone="your_phone",
    password="your_password")
ids = alicloud.eds.get_users()
pulumi.export("ecdUserId1", ids.users[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.eds.User("default", {
    endUserId: "example_value",
    email: "your_email",
    phone: "your_phone",
    password: "your_password",
});
const ids = alicloud.eds.getUsers({});
export const ecdUserId1 = ids.then(ids => ids.users?.[0]?.id);
resources:
  default:
    type: alicloud:eds:User
    properties:
      endUserId: example_value
      email: your_email
      phone: your_phone
      password: your_password
variables:
  ids:
    fn::invoke:
      Function: alicloud:eds:getUsers
      Arguments: {}
outputs:
  ecdUserId1: ${ids.users[0].id}

Using getUsers

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 getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
function getUsersOutput(args: GetUsersOutputArgs, opts?: InvokeOptions): Output<GetUsersResult>
def get_users(ids: Optional[Sequence[str]] = None,
              output_file: Optional[str] = None,
              status: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetUsersResult
def get_users_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
              output_file: Optional[pulumi.Input[str]] = None,
              status: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)
func GetUsersOutput(ctx *Context, args *GetUsersOutputArgs, opts ...InvokeOption) GetUsersResultOutput

> Note: This function is named GetUsers in the Go SDK.

public static class GetUsers 
{
    public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
    public static Output<GetUsersResult> Invoke(GetUsersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:eds/getUsers:getUsers
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of User IDs.

OutputFile string
Status string

The status of the resource.

Ids []string

A list of User IDs.

OutputFile string
Status string

The status of the resource.

ids List<String>

A list of User IDs.

outputFile String
status String

The status of the resource.

ids string[]

A list of User IDs.

outputFile string
status string

The status of the resource.

ids Sequence[str]

A list of User IDs.

output_file str
status str

The status of the resource.

ids List<String>

A list of User IDs.

outputFile String
status String

The status of the resource.

getUsers Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Users List<Pulumi.AliCloud.Eds.Outputs.GetUsersUser>
OutputFile string
Status string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Users []GetUsersUser
OutputFile string
Status string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
users List<GetUsersUser>
outputFile String
status String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
users GetUsersUser[]
outputFile string
status string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
users Sequence[GetUsersUser]
output_file str
status str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
users List<Property Map>
outputFile String
status String

Supporting Types

GetUsersUser

Email string

The email of the user email.

EndUserId string

The Username. The custom setting is composed of lowercase letters, numbers and underscores, and the length is 3~24 characters.

Id string

The ID of the user id.

Phone string

The phone of the mobile phone number.

Status string

The status of the resource.

Email string

The email of the user email.

EndUserId string

The Username. The custom setting is composed of lowercase letters, numbers and underscores, and the length is 3~24 characters.

Id string

The ID of the user id.

Phone string

The phone of the mobile phone number.

Status string

The status of the resource.

email String

The email of the user email.

endUserId String

The Username. The custom setting is composed of lowercase letters, numbers and underscores, and the length is 3~24 characters.

id String

The ID of the user id.

phone String

The phone of the mobile phone number.

status String

The status of the resource.

email string

The email of the user email.

endUserId string

The Username. The custom setting is composed of lowercase letters, numbers and underscores, and the length is 3~24 characters.

id string

The ID of the user id.

phone string

The phone of the mobile phone number.

status string

The status of the resource.

email str

The email of the user email.

end_user_id str

The Username. The custom setting is composed of lowercase letters, numbers and underscores, and the length is 3~24 characters.

id str

The ID of the user id.

phone str

The phone of the mobile phone number.

status str

The status of the resource.

email String

The email of the user email.

endUserId String

The Username. The custom setting is composed of lowercase letters, numbers and underscores, and the length is 3~24 characters.

id String

The ID of the user id.

phone String

The phone of the mobile phone number.

status String

The status of the resource.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.