addUsersToGroup
Adds one or more specified users to a local group.
You must specify a groupName
and one or more user names.
Arguments | Descriptions |
---|---|
groupName |
The name of the group that must be unique among local groups. |
userName |
Use ec-perl to enter one or more user names to add to the group. |
userName |
Use ectool to enter one user name to add to the group. |
userNames |
Use ectool to enter two or more user names to add to the group. |
Positional arguments
ec-perl: groupName, userName
ectool: groupName, userName
or groupName, userNames
, depending on the number of user names.
createGroup
Creates a new local group of users or personas.
You must specify a groupName
.
Arguments | Descriptions |
---|---|
groupName |
Name for the new group that you are creating. Argument type: String |
personas |
(Optional) A list of one or more personas belonging to this group. Use Argument type: String |
userName |
(Optional) The user name to add to the group.
Argument type: Collection (ec-perl) or String (ectool) |
userNames |
(Optional) If using ectool, enter two or more user names to add to the group. Argument type: Collection |
Response
Returns a group object.
ectool
syntax: ectool createGroup <groupName> --userNames <user1> [optionals]
Examples
This example uses the singular userName
argument to add one user name to the group.
ectool createGroup "Build Users" --userName "Betty Barker"
This example uses the plural userNames
argument to add two or more user names to the group.
ectool createGroup "Build Users" --userNames "aallen" "Betty Barker" "cclark"
This example creates a group of personas.
ectool createGroup "personaGroup" --personas "persona1" "persona2"
createUser
Creates a new local user.
This API does not apply to non-local users. |
User or Group Lists
The commands createUser
and modifyUser
can have an optional argument called groupNames
. The commands createGroup
and modifyGroup
can have an optional argument named userNames
. In each case, the optional argument is followed by a list of groups or names.
Using ectool, your command string would be:
ectool createGroup "New Group Name" --userNames "A Adams" "B Barker"
To make this call via the Perl API, create a list of names and then pass a reference to the list as an optional parameter.
The name of the optional parameter is singular, "userName" or "userGroup," not the plural form used by ectool. |
Here is an example using the Perl API:
# Run the procedure—pass a reference to the list of names
$xPath = $cmdr->createGroup("New Group Name", {
` "userName" ⇒ ['A Adams', 'B Burns'] });`
You must specify a userName
.
Arguments | Descriptions |
---|---|
userName |
This could be the user’s full name, but more commonly it is the shortened name, first initial and last name, or nickname used for email. Argument type: String |
(Optional) The email address of the user. Argument type: String |
|
fullUserName |
(Optional) Full name of the user, not a nickname. Argument type: String |
groupNames |
(Optional) List of groups of which this user is a member. <group1 group2> Any group name containing spaces must be enclosed in double-quotes. Argument type: Collection |
password |
(Optional) The password of the user. Argument type: String |
personas |
(Optional) A list of one or more personas belonging to this user. Use Argument type: String |
Response
Returns a user object.
deleteGroup
Deletes a local group.
You must specify a groupName
.
Arguments | Descriptions |
---|---|
groupName |
The name of the group that must be unique among local groups. Argument type: String |
deleteUser
Deletes a local or registered user.
You must specify the userName
.
Arguments | Descriptions |
---|---|
userName |
The name of the user. Argument type: String |
getGroup
Retrieves a group by its name.
You must specify the groupName
.
Arguments | Descriptions |
---|---|
groupName |
The name of the group that must be unique among local groups. Argument type: String |
providerName |
(Optional) The name of the provider from which to retrieve the group.Using this option allows you to search only the specified (LDAP or Active Directory) provider for group information. Argument type: String |
traverseHierarchy |
(Optional) < Boolean flag— If this is set to Argument type: Boolean |
getGroups
Retrieves all groups.
Arguments | Descriptions |
---|---|
filter |
(Optional) A string used to filter the returned groups by their names. Argument type: String |
includeAll |
(Optional) < Boolean flag— When enabled (the value is Argument type: Boolean |
maximum |
(Optional) The maximum number of groups to return. Argument type: Integer |
getUser
Retrieves information about a user.
You must specify the userName
.
Arguments | Descriptions | ||
---|---|---|---|
userName |
The name of the user. Argument type: String |
||
providerName |
(Optional) The name of the directory provider, which limits the search to the specified directory provider. Argument type: String |
||
registerLDAPUser |
(Optional) < Boolean flag— If this is set to
Argument type: Boolean |
||
traverseHierarchy |
(Optional) < Boolean flag— If this is set to Argument type: Boolean |
getUsers
Retrieves information about all users. By default, this command returns users who have been added to the CloudBees CD/RO database, which means they have logged in previously.
When calling getUsers
, the default limit is 100 user records. Use the maximum
option to specify a larger number, but this may inhibit performance, or you could define a search pattern to filter your search and conduct multiple queries.
Arguments | Descriptions |
---|---|
filter |
(Optional) < filter pattern > Enter a filter pattern to match user names. The filter is not case sensitive and can include the Argument type: String |
includeAll |
(Optional) < Boolean flag— When this argument is Argument type: Boolean |
maximum |
(Optional) < number of users > Specify a larger number of user records to retrieve. The default limit is 100 user records. Argument type: Integer |
searchFields |
(Optional) Filter search fields that include the user’s full name and email address. Argument type: Collection |
sortKey |
(Optional) Sorts the list by the time of the users’ last login or user name. Possible values are Argument type: UserSortKey |
sortOrder |
(Optional) Sorts the list in ascending or descending order. Possible values are |
login
Logs into the server and saves the session ID for subsequent ectool use. The user name provided determines the permissions for commands that can be run during the session.
You must specify the userName
and password
.
Arguments | Descriptions |
---|---|
password |
The password for the user who is logging in. Argument type: String |
userName |
The name of a user who has login privileges. Argument type: String |
modifyGroup
Modifies an existing group.
You must specify groupName
.
Arguments | Descriptions |
---|---|
groupName |
Name of the group that must be unique among local groups. Argument type: String |
clearPersonas |
(Optional) < Boolean flag If the value is Argument type: Boolean |
migrateSettings |
(Optional) < targetGroupName > Use this argument to specify the new name to which the settings need to be moved. Argument type: String |
newName |
(Optional) Enter any name of your choice to rename the group. Argument type: String |
personas |
(Optional) A list of one or more persona names. Append these personas to this group. Use Argument type: String |
removeAllUsers |
(Optional) < Boolean flag If the value is Argument type: Boolean |
userName |
(Optional) If using ec-perl, enter one or more user names to add to the group.
Argument type: Collection |
userName |
(Optional) If using ectool, enter one user name to add to the group.
Argument type: String |
userNames |
(Optional) If using ectool, enter two or more user names to add to the group.
Argument type: Collection |
Response
Returns an updated group object.
ectool
syntax: ectool modifyGroup <groupName> [<optionals>]
Examples
This example has the singular userName
argument to add one user name to the group.
ectool modifyGroup "Build Users" --userName dduncan
This example has the plural userNames
argument to add two or more user names to the group.
ectool modifyGroup "Build Users" --userNames dduncan jack tthomas
This example adds personas to the existing group
ectool modifyGroup "Build Users" --personas persona1 persona2
modifyUser
Modifies a non-local (LDAP) user that is registered with CloudBees CD/RO (with certain limitations described below) or a local user.
===Using modifyUser for Non-Local (LDAP) Users
You cannot use modifyUser
for non-local users that are not registered with CloudBees CD/RO . You cannot use the following modifyUser
arguments for non-local users (regardless of whether they are registered with CloudBees CD/RO ):
-
email
-
fullUserName
-
password
-
migrateSettings
-
newName
You can use the following modifyUser
arguments for non-local users that are registered with CloudBees CD/RO :
-
groupNames
-
removeAllGroups
===User or Group Lists
The createUser
and modifyUser
commands can use an optional groupNames
argument. The createGroup
and modifyGroup
commands can have an optional userNames
argument. In each case, the argument is followed by a list of groups or names. Using ectool, your command string would be:
ectool createGroup "New Group Name" --userNames "A Adams" "B Barker"
To make this call via the Perl API, create a list of names and then pass a reference to the list as an optional parameter. The name of the optional parameter is singular, "userName" or "userGroup," not the plural form used by ectool. For example:
# Run the procedure—pass a reference to the list of names
$xPath = $cmdr\->createGroup("New Group Name", {
"userName" => ['A Adams', 'B Burns'] });
You must specify a userName
.
Arguments | Descriptions | ||
---|---|---|---|
userName |
The name used by the user to log in or receive email. For example, "jsmith". Argument type: String |
||
clearPersonas |
(Optional) < Boolean flag If the value is Argument type: Boolean |
||
(Optional) (local users only) The user’s email address. Argument type: String |
|||
fullUserName |
(Optional) (local users only) The user’s full name. For example, "John Smith". Argument type: String |
||
groupNames |
(Optional) group1 [ group2 …] Assigns the user to one or more groups and removes the user from any groups not included in the list. For a non-local user, this argument adds the user to a local group (not a non-local group). Argument type: Collection |
||
migrateSettings |
(Local users only) < targetUserName > The new name to which the settings need to be moved. Argument type: String |
||
newName |
(Optional) (local users only) The new name of the user (for example, changing an existing user’s surname). Argument type: String
|
||
password |
(Optional) (local users only) Enter a new password for the user. Argument type: String |
||
personas |
(Optional) A list of one or more persona names. Append these personas to this user. Use Argument type: String |
||
removeFromAllGroups |
(Optional) < Boolean flag — Argument type: String |
||
sessionPassword |
(Optional) If changing the user’s password, you must also enter the password you logged in with (the password you used in the Argument type: String |
Response
Returns a user object.
removeUsersFromGroup
Removes one or more users from an existing local group.
You must specify a groupName
and one or more user names.
Arguments | Descriptions |
---|---|
groupName |
The name of the group from which to remove users. Argument type: String |
userNames |
The list of users to remove from the group. Argument type: Collection |