Class UserManagement
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.BaseService
-
- com.ibm.cloud.platform_services.user_management.v1.UserManagement
-
public class UserManagement extends com.ibm.cloud.sdk.core.service.BaseService
Manage the lifecycle of your users using User Management APIs. API Version: 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_SERVICE_NAME
Default service name used when configuring the `UserManagement` client.static java.lang.String
DEFAULT_SERVICE_URL
Default service endpoint URL.
-
Constructor Summary
Constructors Constructor Description UserManagement(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `UserManagement` client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
accept()
Accept an invitation.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
accept(AcceptOptions acceptOptions)
Accept an invitation.com.ibm.cloud.sdk.core.http.ServiceCall<UserProfile>
getUserProfile(GetUserProfileOptions getUserProfileOptions)
Get user profile.com.ibm.cloud.sdk.core.http.ServiceCall<UserSettings>
getUserSettings(GetUserSettingsOptions getUserSettingsOptions)
Get user settings.com.ibm.cloud.sdk.core.http.ServiceCall<InvitedUserList>
inviteUsers(InviteUsersOptions inviteUsersOptions)
Invite users to an account.com.ibm.cloud.sdk.core.http.ServiceCall<UserList>
listUsers(ListUsersOptions listUsersOptions)
List users.static UserManagement
newInstance()
Class method which constructs an instance of the `UserManagement` client.static UserManagement
newInstance(java.lang.String serviceName)
Class method which constructs an instance of the `UserManagement` client.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
removeUser(RemoveUserOptions removeUserOptions)
Remove user from account.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
updateUserProfile(UpdateUserProfileOptions updateUserProfileOptions)
Partially update user profile.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
updateUserSettings(UpdateUserSettingsOptions updateUserSettingsOptions)
Partially update user settings.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>
v3RemoveUser(V3RemoveUserOptions v3RemoveUserOptions)
Remove user from account (Asynchronous).-
Methods inherited from class com.ibm.cloud.sdk.core.service.BaseService
configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
-
-
-
-
Field Detail
-
DEFAULT_SERVICE_NAME
public static final java.lang.String DEFAULT_SERVICE_NAME
Default service name used when configuring the `UserManagement` client.- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_URL
public static final java.lang.String DEFAULT_SERVICE_URL
Default service endpoint URL.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UserManagement
public UserManagement(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `UserManagement` client. The specified service name and authenticator are used to configure the client instance.- Parameters:
serviceName
- the service name to be used when configuring the client instanceauthenticator
- theAuthenticator
instance to be configured for this client
-
-
Method Detail
-
newInstance
public static UserManagement newInstance()
Class method which constructs an instance of the `UserManagement` client. The default service name is used to configure the client instance.- Returns:
- an instance of the `UserManagement` client using external configuration
-
newInstance
public static UserManagement newInstance(java.lang.String serviceName)
Class method which constructs an instance of the `UserManagement` client. The specified service name is used to configure the client instance.- Parameters:
serviceName
- the service name to be used when configuring the client instance- Returns:
- an instance of the `UserManagement` client using external configuration
-
listUsers
public com.ibm.cloud.sdk.core.http.ServiceCall<UserList> listUsers(ListUsersOptions listUsersOptions)
List users. Retrieve users in the account. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have at least the viewer, editor, or administrator role on the User Management service. If unrestricted view is enabled, the user can see all users in the same account without an IAM role. If restricted view is enabled and user has the viewer, editor, or administrator role on the user management service, the API returns all users in the account. If unrestricted view is enabled and the user does not have these roles, the API returns only the current user. Users are returned in a paginated list with a default limit of 100 users. You can iterate through all users by following the `next_url` field. Additional substring search fields are supported to filter the users.- Parameters:
listUsersOptions
- theListUsersOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeUserList
-
inviteUsers
public com.ibm.cloud.sdk.core.http.ServiceCall<InvitedUserList> inviteUsers(InviteUsersOptions inviteUsersOptions)
Invite users to an account. Invite users to the account. You must use a user token for authorization. Service IDs can't invite users to the account. To use this method, the requesting user must have the editor or administrator role on the User Management service. For more information, see the [Inviting users](https://cloud.ibm.com/docs/account?topic=account-iamuserinv) documentation. You can specify the user account role and the corresponding IAM policy information in the request body. <br/><br/>When you invite a user to an account, the user is initially created in the `PROCESSING` state. After the user is successfully created, all specified permissions are configured, and the activation email is sent, the invited user is transitioned to the `PENDING` state. When the invited user clicks the activation email and creates and confirms their IBM Cloud account, the user is transitioned to `ACTIVE` state. If the user email is already verified, no email is generated.- Parameters:
inviteUsersOptions
- theInviteUsersOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeInvitedUserList
-
getUserProfile
public com.ibm.cloud.sdk.core.http.ServiceCall<UserProfile> getUserProfile(GetUserProfileOptions getUserProfileOptions)
Get user profile. Retrieve a user's profile by the user's IAM ID in your account. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have at least the viewer, editor, or administrator role on the User Management service.- Parameters:
getUserProfileOptions
- theGetUserProfileOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeUserProfile
-
updateUserProfile
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> updateUserProfile(UpdateUserProfileOptions updateUserProfileOptions)
Partially update user profile. Partially update a user's profile by user's IAM ID. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have at least the editor or administrator role on the User Management service. A user or service ID with these roles can change a user's state between `ACTIVE`, `VPN_ONLY`, or `DISABLED_CLASSIC_INFRASTRUCTURE`, but they can't change the state to `PROCESSING` or `PENDING` because these are system states. For other request body fields, a user can update their own profile without having User Management service permissions.- Parameters:
updateUserProfileOptions
- theUpdateUserProfileOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
removeUser
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> removeUser(RemoveUserOptions removeUserOptions)
Remove user from account. Remove users from an account by user's IAM ID. You must use a user token for authorization. Service IDs can't remove users from an account. To use this method, the requesting user must have the editor or administrator role on the User Management service. For more information, see the [Removing users](https://cloud.ibm.com/docs/account?topic=account-remove) documentation.- Parameters:
removeUserOptions
- theRemoveUserOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
accept
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> accept(AcceptOptions acceptOptions)
Accept an invitation. Accept a user invitation to an account. You can use the user's token for authorization. To use this method, the requesting user must provide the account ID for the account that they are accepting an invitation for. If the user already accepted the invitation request, it returns 204 with no response body.- Parameters:
acceptOptions
- theAcceptOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
accept
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> accept()
Accept an invitation. Accept a user invitation to an account. You can use the user's token for authorization. To use this method, the requesting user must provide the account ID for the account that they are accepting an invitation for. If the user already accepted the invitation request, it returns 204 with no response body.- Returns:
- a
ServiceCall
with a void result
-
v3RemoveUser
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> v3RemoveUser(V3RemoveUserOptions v3RemoveUserOptions)
Remove user from account (Asynchronous). Remove users from an account by using the user's IAM ID. You must use a user token for authorization. Service IDs can't remove users from an account. If removing the user fails it will set the user's state to ERROR_WHILE_DELETING. To use this method, the requesting user must have the editor or administrator role on the User Management service. For more information, see the [Removing users](https://cloud.ibm.com/docs/account?topic=account-remove) documentation.- Parameters:
v3RemoveUserOptions
- theV3RemoveUserOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
getUserSettings
public com.ibm.cloud.sdk.core.http.ServiceCall<UserSettings> getUserSettings(GetUserSettingsOptions getUserSettingsOptions)
Get user settings. Retrieve a user's settings by the user's IAM ID. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have the viewer, editor, or administrator role on the User Management service. <br/><br/>The user settings have several fields. The `language` field is the language setting for the user interface display language. The `notification_language` field is the language setting for phone and email notifications. The `allowed_ip_addresses` field specifies a list of IP addresses that the user can log in and perform operations from as described in [Allowing specific IP addresses for a user](https://cloud.ibm.com/docs/account?topic=account-ips). For information about the `self_manage` field, review information about the [user-managed login setting](https://cloud.ibm.com/docs/account?topic=account-types).- Parameters:
getUserSettingsOptions
- theGetUserSettingsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeUserSettings
-
updateUserSettings
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> updateUserSettings(UpdateUserSettingsOptions updateUserSettingsOptions)
Partially update user settings. Update a user's settings by the user's IAM ID. You can use the IAM service token or a user token for authorization. To fully use this method, the user or service ID must have the editor or administrator role on the User Management service. Without these roles, a user can update only their own `language` or `notification_language` fields. If `self_manage` is `true`, the user can also update the `allowed_ip_addresses` field.- Parameters:
updateUserSettingsOptions
- theUpdateUserSettingsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
-