/
getUsers.ts
108 lines (104 loc) · 3.83 KB
/
getUsers.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
/**
* Provides details about a list of users in the gitlab provider. The results include id, username, email, name and more about the requested users. Users can also be sorted and filtered using several options.
*
* **NOTE**: Some of the available options require administrator privileges. Please visit [Gitlab API documentation][users_for_admins] for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
*
* const example = pulumi.output(gitlab.getUsers({
* createdBefore: "2019-01-01",
* orderBy: "name",
* sort: "desc",
* }));
* ```
*
* > This content is derived from https://github.com/terraform-providers/terraform-provider-gitlab/blob/master/website/docs/d/users.html.markdown.
*/
export function getUsers(args?: GetUsersArgs, opts?: pulumi.InvokeOptions): Promise<GetUsersResult> {
args = args || {};
return pulumi.runtime.invoke("gitlab:index/getUsers:getUsers", {
"active": args.active,
"blocked": args.blocked,
"createdAfter": args.createdAfter,
"createdBefore": args.createdBefore,
"externProvider": args.externProvider,
"externUid": args.externUid,
"orderBy": args.orderBy,
"search": args.search,
"sort": args.sort,
}, opts);
}
/**
* A collection of arguments for invoking getUsers.
*/
export interface GetUsersArgs {
/**
* Filter users that are active.
*/
readonly active?: boolean;
/**
* Filter users that are blocked.
*/
readonly blocked?: boolean;
/**
* Search for users created after a specific date. (Requires administrator privileges)
*/
readonly createdAfter?: string;
/**
* Search for users created before a specific date. (Requires administrator privileges)
*/
readonly createdBefore?: string;
/**
* Lookup users by external provider. (Requires administrator privileges)
*/
readonly externProvider?: string;
/**
* Lookup users by external UID. (Requires administrator privileges)
*/
readonly externUid?: string;
/**
* Order the users' list by `id`, `name`, `username`, `created_at` or `updated_at`. (Requires administrator privileges)
*/
readonly orderBy?: string;
/**
* Search users by username, name or email.
*/
readonly search?: string;
/**
* Sort users' list in asc or desc order. (Requires administrator privileges)
*/
readonly sort?: string;
}
/**
* A collection of values returned by getUsers.
*/
export interface GetUsersResult {
readonly active?: boolean;
readonly blocked?: boolean;
readonly createdAfter?: string;
readonly createdBefore?: string;
readonly externProvider?: string;
/**
* The external UID of the user.
*/
readonly externUid?: string;
readonly orderBy?: string;
readonly search?: string;
readonly sort?: string;
/**
* The list of users.
*/
readonly users: { avatarUrl: string, bio: string, canCreateGroup: boolean, canCreateProject: boolean, colorSchemeId: number, createdAt: string, currentSignInAt: string, email: string, externUid: string, external: boolean, id: number, isAdmin: boolean, lastSignInAt: string, linkedin: string, location: string, name: string, organization: string, projectsLimit: number, provider: string, skype: string, state: string, themeId: number, twitter: string, twoFactorEnabled: boolean, username: string, websiteUrl: string }[];
/**
* id is the provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}