Interface IAuthorizationsApi
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public interface IAuthorizationsApi
Methods
CloneAuthorizationAsync(Authorization, CancellationToken)
Clone an authorization.
Declaration
Task<Authorization> CloneAuthorizationAsync(Authorization authorization, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Authorization | authorization | authorization to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | cloned authorization |
CloneAuthorizationAsync(String, CancellationToken)
Clone an authorization.
Declaration
Task<Authorization> CloneAuthorizationAsync(string authorizationId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | authorizationId | ID of authorization to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | cloned authorization |
CreateAuthorizationAsync(Authorization, CancellationToken)
Create an authorization with defined permissions.
Declaration
Task<Authorization> CreateAuthorizationAsync(Authorization authorization, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Authorization | authorization | authorization to create |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | the created authorization |
CreateAuthorizationAsync(AuthorizationPostRequest, CancellationToken)
Create an authorization with defined permissions.
Declaration
Task<Authorization> CreateAuthorizationAsync(AuthorizationPostRequest authorization, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
AuthorizationPostRequest | authorization | authorization to create |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | the created authorization |
CreateAuthorizationAsync(Organization, List<Permission>, CancellationToken)
Create an authorization with defined permissions.
Declaration
Task<Authorization> CreateAuthorizationAsync(Organization organization, List<Permission> permissions, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Organization | organization | the owner of the authorization |
List<Permission> | permissions | the permissions for the authorization |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | the created authorization |
CreateAuthorizationAsync(String, List<Permission>, CancellationToken)
Create an authorization with defined permissions.
Declaration
Task<Authorization> CreateAuthorizationAsync(string orgId, List<Permission> permissions, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | orgId | the owner id of the authorization |
List<Permission> | permissions | the permissions for the authorization |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | the created authorization |
DeleteAuthorizationAsync(Authorization, CancellationToken)
Delete an authorization.
Declaration
System.Threading.Tasks.Task DeleteAuthorizationAsync(Authorization authorization, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Authorization | authorization | authorization to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | authorization deleted |
DeleteAuthorizationAsync(String, CancellationToken)
Delete an authorization.
Declaration
System.Threading.Tasks.Task DeleteAuthorizationAsync(string authorizationId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | authorizationId | ID of authorization to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | authorization deleted |
FindAuthorizationByIdAsync(String, CancellationToken)
Retrieve an authorization.
Declaration
Task<Authorization> FindAuthorizationByIdAsync(string authorizationId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | authorizationId | ID of authorization to get |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | authorization details |
FindAuthorizationsAsync(CancellationToken)
List all authorizations.
Declaration
Task<List<Authorization>> FindAuthorizationsAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Authorization>> | List all authorizations. |
FindAuthorizationsByUserAsync(User, CancellationToken)
List all authorizations belonging to specified user.
Declaration
Task<List<Authorization>> FindAuthorizationsByUserAsync(User user, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
User | user | user |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Authorization>> | A list of authorizations |
FindAuthorizationsByUserIdAsync(String, CancellationToken)
List all authorizations belonging to specified user.
Declaration
Task<List<Authorization>> FindAuthorizationsByUserIdAsync(string userId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | ID of user |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Authorization>> | A list of authorizations |
FindAuthorizationsByUserNameAsync(String, CancellationToken)
List all authorizations belonging to specified user.
Declaration
Task<List<Authorization>> FindAuthorizationsByUserNameAsync(string userName, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userName | Name of User |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Authorization>> | A list of authorizations |
UpdateAuthorizationAsync(Authorization, CancellationToken)
Updates the status of the authorization. Useful for setting an authorization to inactive or active.
Declaration
Task<Authorization> UpdateAuthorizationAsync(Authorization authorization, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Authorization | authorization | the authorization with updated status |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Authorization> | the updated authorization |