You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/modules/iam_user_info.py
+86-30Lines changed: 86 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
#!/usr/bin/env python
2
2
# -*- coding: utf-8 -*-
3
3
4
-
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
4
+
# Copyright 2024 Cloudera, Inc. All Rights Reserved.
5
5
#
6
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
7
# you may not use this file except in compliance with the License.
@@ -34,12 +34,13 @@
34
34
author:
35
35
- "Webster Mudge (@wmudge)"
36
36
- "Dan Chaffelson (@chaffelson)"
37
+
- "Ronald Suplina (@rsuplina)"
37
38
options:
38
39
name:
39
40
description:
40
-
- A list of user names or CRNs or a single user name/CRN.
41
-
- If no user name or CRN is provided, all users are returned.
42
-
- Mutually exclusive with C(current_user).
41
+
- A list of user names or a single user name.
42
+
- If no user name is provided, all users are returned.
43
+
- Mutually exclusive with C(current_user) and C(user_id).
43
44
type: list
44
45
elements: str
45
46
required: False
@@ -48,10 +49,17 @@
48
49
current_user:
49
50
description:
50
51
- Flag to use the current user login.
51
-
- Mutually exclusive with C(name).
52
+
- Mutually exclusive with C(name) and C(user_id).
52
53
type: bool
53
54
required: False
54
55
default: False
56
+
user_id:
57
+
description:
58
+
- A list of user Ids or a single user Id name/CRN.
59
+
- Mutually exclusive with C(current_user) and C(name).
60
+
type: list
61
+
elements: str
62
+
required: False
55
63
filter:
56
64
description:
57
65
- Key value pair where the key is the field to compare and the value is a regex statement. If there is a match in the regex statment, the user will return.
@@ -68,11 +76,20 @@
68
76
69
77
# List basic information about all Users
70
78
- cloudera.cloud.iam_user_info:
79
+
view: summary
71
80
72
81
# Gather detailed information about a named User
73
82
- cloudera.cloud.iam_info:
74
83
name: Example
75
84
85
+
# Gather detailed information specific user Id
86
+
- cloudera.cloud.iam_info:
87
+
user_id: "11a111a-91f0-4ca2-9262-111aa1111"
88
+
89
+
# Gather detailed information about more users
90
+
- cloudera.cloud.iam_info:
91
+
name: ["user1", "user2"]
92
+
76
93
# Gather detailed information about a named User
77
94
- cloudera.cdp.iam_info:
78
95
filter:
@@ -134,6 +151,18 @@
134
151
returned: when supported
135
152
type: str
136
153
sample: u_023
154
+
groups:
155
+
description: List of groups that user is assigned.
156
+
returned: when supported
157
+
type: list
158
+
roles:
159
+
description: List of user assigned roles.
160
+
returned: when supported
161
+
type: list
162
+
resource_roles:
163
+
description: List of user assigned resource roles.
0 commit comments