Class MemberEntitlementManagementApi
java.lang.Object
org.azd.utils.AzDAsyncApi<MemberEntitlementManagementApi>
org.azd.memberentitlementmanagement.MemberEntitlementManagementApi
- All Implemented Interfaces:
MemberEntitlementManagementDetails
public class MemberEntitlementManagementApi
extends AzDAsyncApi<MemberEntitlementManagementApi>
implements MemberEntitlementManagementDetails
MemberEntitlementManagementApi class to manage groups and user entitlements API
-
Constructor Summary
ConstructorDescriptionMemberEntitlementManagementApi
(Connection connection) Pass the connection object to work with Member Entitlement Management Api -
Method Summary
Modifier and TypeMethodDescriptionaddUserEntitlement
(AccountLicenseType accountLicenseType, String emailId, GroupType groupType, String projectId) Add a user, assign license and make them a member of a project group in an account.deleteUserEntitlement
(String userId) Delete a user from the account.getGroupEntitlement
(String groupId) Get a group entitlement.Get the group entitlements for an account.getMembers
(String groupId) Get direct members of a Group.getMembers
(String groupId, int maxResults, String pagingToken) Get direct members of a Group.getUserEntitlement
(String userId) Get User Entitlement for a user.Get a list of users/members entitlements.Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection.removeMemberFromGroup
(String groupId, String memberId) Remove a member from a Group.updateUserEntitlement
(String userId, List<Object> requestBody) Edit the entitlements (License, Extensions, Projects, Teams etc) for a user.updateUserEntitlement
(String userId, AccountLicenseType accountLicenseType, LicensingSource licensingSource) Edit the entitlements License for a user.Methods inherited from class org.azd.utils.AzDAsyncApi
createAsync
-
Constructor Details
-
MemberEntitlementManagementApi
Pass the connection object to work with Member Entitlement Management Api- Parameters:
connection
- Connection object
-
-
Method Details
-
getGroupEntitlements
Get the group entitlements for an account.- Specified by:
getGroupEntitlements
in interfaceMemberEntitlementManagementDetails
- Returns:
- GroupEntitlements
GroupEntitlements
- Throws:
AzDException
- Default Api Exception handler.
-
getGroupEntitlement
Get a group entitlement. If the group entitlement does not exist, returns null.- Specified by:
getGroupEntitlement
in interfaceMemberEntitlementManagementDetails
- Parameters:
groupId
- ID of the group.- Returns:
- GroupEntitlement
GroupEntitlement
- Throws:
AzDException
- Default Api Exception handler.
-
getUserEntitlementSummary
Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection.- Specified by:
getUserEntitlementSummary
in interfaceMemberEntitlementManagementDetails
- Returns:
- UsersSummary
UsersSummary
- Throws:
AzDException
- Default Api Exception handler.
-
getMembers
Get direct members of a Group.- Specified by:
getMembers
in interfaceMemberEntitlementManagementDetails
- Parameters:
groupId
- Id of the Group.- Returns:
- PagedGraphMemberList
PagedGraphMemberList
- Throws:
AzDException
- Default Api Exception handler.
-
getMembers
public PagedGraphMemberList getMembers(String groupId, int maxResults, String pagingToken) throws AzDException Get direct members of a Group.- Specified by:
getMembers
in interfaceMemberEntitlementManagementDetails
- Parameters:
groupId
- Id of the Group.maxResults
- Maximum number of results to retrieve.pagingToken
- Paging Token from the previous page fetched. If the 'pagingToken' is null, the results would be fetched from the beginning of the Members List.- Returns:
- PagedGraphMemberList
PagedGraphMemberList
- Throws:
AzDException
- Default Api Exception handler.
-
removeMemberFromGroup
Remove a member from a Group.- Specified by:
removeMemberFromGroup
in interfaceMemberEntitlementManagementDetails
- Parameters:
groupId
- Id of the group.memberId
- Id of the group.- Throws:
AzDException
- Default Api Exception handler.
-
addUserEntitlement
public UserEntitlementsResponse addUserEntitlement(AccountLicenseType accountLicenseType, String emailId, GroupType groupType, String projectId) throws AzDException Add a user, assign license and make them a member of a project group in an account.- Specified by:
addUserEntitlement
in interfaceMemberEntitlementManagementDetails
- Parameters:
accountLicenseType
- Type of Accounts License (e.g. Express, Stakeholder etc.)AccountLicenseType
emailId
- Email address of the user.groupType
- Type of the group. (e.g. Project Administrator, Project Contributor, etc.)GroupType
projectId
- Id of the project. Get the project id by running getProjects() or getProject("projectName") from CoreApi.- Returns:
- UserEntitlementsResponse
UserEntitlementsResponse
- Throws:
AzDException
- Default Api Exception handler.
-
deleteUserEntitlement
Delete a user from the account. The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.- Specified by:
deleteUserEntitlement
in interfaceMemberEntitlementManagementDetails
- Parameters:
userId
- userId ID of the user. Run getUserEntitlements() to get a list of users and get the user id.- Throws:
AzDException
- Default Api Exception handler.
-
getUserEntitlement
Get User Entitlement for a user.- Specified by:
getUserEntitlement
in interfaceMemberEntitlementManagementDetails
- Parameters:
userId
- userId ID of the user. Run getUserEntitlements() to get a list of users and get the user id.- Returns:
- UserEntitlement
UserEntitlement
- Throws:
AzDException
- Default Api Exception handler.
-
getUserEntitlements
Get a list of users/members entitlements.- Specified by:
getUserEntitlements
in interfaceMemberEntitlementManagementDetails
- Returns:
- PagedGraphMemberList
PagedGraphMemberList
- Throws:
AzDException
- Default Api Exception handler.
-
updateUserEntitlement
public UserEntitlementsResponse updateUserEntitlement(String userId, List<Object> requestBody) throws AzDException Edit the entitlements (License, Extensions, Projects, Teams etc) for a user. Pass a list of items that you want to edit for a user.- Specified by:
updateUserEntitlement
in interfaceMemberEntitlementManagementDetails
- Parameters:
userId
- ID of the user. Run getUserEntitlements() to get a list of users and get the user id.- Returns:
- UserEntitlementsResponse
UserEntitlementsResponse
- Throws:
AzDException
- Default Api Exception handler.
-
updateUserEntitlement
public UserEntitlementsResponse updateUserEntitlement(String userId, AccountLicenseType accountLicenseType, LicensingSource licensingSource) throws AzDException Edit the entitlements License for a user. Set the license account type and license source type for a user.- Specified by:
updateUserEntitlement
in interfaceMemberEntitlementManagementDetails
- Parameters:
userId
- ID of the user. Run getUserEntitlements() to get a list of users and get the user id.accountLicenseType
- Type of Accounts License (e.g. Express, Stakeholder etc.)AccountLicenseType
licensingSource
- Licensing Source (e.g. Accounts. MSDN etc.)LicensingSource
- Returns:
- UserEntitlementsResponse
UserEntitlementsResponse
- Throws:
AzDException
- Default Api Exception handler.
-