Interface IGroupsApiClient
Interface for API client group operations.
Inherited Members
Namespace: Tableau.Migration.Api
Assembly: Tableau.Migration.dll
Syntax
public interface IGroupsApiClient : IPagedListApiClient<IGroup>, IPublishApiClient<IPublishableGroup, IGroup>, IPullApiClient<IGroup, IPublishableGroup>, IApiPageAccessor<IGroup>, IContentApiClient
Methods
AddUserToGroupAsync(Guid, Guid, CancellationToken)
Adds a user to a group.
Declaration
Task<IResult<IAddUserToGroupResult>> AddUserToGroupAsync(Guid groupId, Guid userId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | groupId | The ID of the group the user should belong to. |
Guid | userId | The user's ID. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IAddUserToGroupResult>> | The operation result. |
CreateLocalGroupAsync(string, string?, CancellationToken)
Creates a local group
Declaration
Task<IResult<IGroup>> CreateLocalGroupAsync(string name, string? minimumSiteRole, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
string | name | The new group's name. |
string | minimumSiteRole | The new group's minimum site role. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IGroup>> | The newly created group. |
DeleteGroupAsync(Guid, CancellationToken)
Deletes a group.
Declaration
Task<IResult> DeleteGroupAsync(Guid groupId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | groupId | The id of the group to delete. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult> |
GetAllGroupsAsync(int, int, CancellationToken)
Gets all groups in the current site.
Declaration
Task<IPagedResult<IGroup>> GetAllGroupsAsync(int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
int | pageNumber | The 1-indexed page number. |
int | pageSize | The size of the page. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<IGroup>> | A list of a page of groups in the current site. |
GetGroupUsersAsync(Guid, int, int, CancellationToken)
Gets the users belonging to a group
Declaration
Task<IPagedResult<IUser>> GetGroupUsersAsync(Guid groupId, int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | groupId | The group's ID |
int | pageNumber | The 1-indexed page number. |
int | pageSize | The size of the page. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<IUser>> | A list of users for the given group ID |
ImportGroupFromActiveDirectoryAsync(string, string, string, string?, CancellationToken)
Creates a group from Active Directory and imports the group's users.
Declaration
Task<IResult<IGroup>> ImportGroupFromActiveDirectoryAsync(string name, string domainName, string minimumSiteRole, string? grantLicenseMode, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
string | name | The new group's name. |
string | domainName | The Active Directory domain name. |
string | minimumSiteRole | The new group's minimum site role. |
string | grantLicenseMode | The mode for automatically applying licenses for group members. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IGroup>> | The newly created group. |
ImportGroupFromActiveDirectoryBackgroundProcessAsync(string, string, string, string?, CancellationToken)
Creates a group from Active Directory and imports the group's users as a background process
Declaration
Task<IResult<IImportJob>> ImportGroupFromActiveDirectoryBackgroundProcessAsync(string name, string domainName, string minimumSiteRole, string? grantLicenseMode, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
string | name | The new group's name. |
string | domainName | The Active Directory domain name. |
string | minimumSiteRole | The new group's minimum site role. |
string | grantLicenseMode | The mode for automatically applying licenses for group members. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IImportJob>> | The newly created group. |
RemoveUserFromGroupAsync(Guid, Guid, CancellationToken)
Removes a user from a group.
Declaration
Task<IResult> RemoveUserFromGroupAsync(Guid groupId, Guid userId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | groupId | The id of the group the user belongs to. |
Guid | userId | The user-id. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult> | The operation result. |