Interface IPoliciesClient
Version: 3.2
Contains functionality to get and update policies.
Namespace: StylelabsStylelabs.MSdkClients
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public interface IPoliciesClientMethods
GetUserGroupPolicyAsync(long)
Gets the policy from specified user group.
Declaration
RequestResponse
Task<IUserGroupPolicy> GetUserGroupPolicyAsync(long userGroupId)Parameters
| Type | Name | Description |
|---|---|---|
| long | userGroupId |
Id of the user group to get the policy from. |
Returns
| Type | Description |
|---|---|
| Task<>IUserGroupPolicy |
The policy or null when it was not found. |
GetUserPolicyAsync(long)
Gets the policy from specified user.
Declaration
RequestResponse
Task<IUserPolicy> GetUserPolicyAsync(long userId)Parameters
| Type | Name | Description |
|---|---|---|
| long | userId |
Id of the user to get the policy from. |
Returns
| Type | Description |
|---|---|
| Task<>IUserPolicy |
The policy or null when it was not found. |
UpdateAsync(IPolicy)
Updates the specified policy.
Declaration
RequestResponse
Task UpdateAsync(IPolicy policy)Parameters
| Type | Name | Description |
|---|---|---|
| IPolicy | policy |
The policy to update. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ValidationException |
Thrown when the policy could not be saved because a validation error occurred. |