Package com.influxdb.client
Interface AuthorizationsApi
@ThreadSafe
public interface AuthorizationsApi
The client of the InfluxDB 2.x that implement Authorization HTTP API endpoint.
- Author:
- Jakub Bednar (bednar@github) (17/09/2018 11:09)
-
Method Summary
Modifier and TypeMethodDescriptioncloneAuthorization(Authorization authorization) Clone an authorization.cloneAuthorization(String authorizationID) Clone an authorization.createAuthorization(Authorization authorization) Create an new authorization.Create an authorization.createAuthorization(Organization organization, List<Permission> permissions) Create an authorization with definedpermissions.createAuthorization(String orgID, List<Permission> permissions) Create an authorization with definedpermissions.voiddeleteAuthorization(Authorization authorization) Delete an authorization.voiddeleteAuthorization(String authorizationID) Delete an authorization.findAuthorizationByID(String authorizationID) Retrieve an authorization.List all authorizations.findAuthorizationsByOrg(Organization organization) List all authorizations for specifiedorganization.findAuthorizationsByOrgID(String orgID) List all authorizations for specifiedorgID.findAuthorizationsByUser(User user) List all authorizations for specifieduser.findAuthorizationsByUserID(String userID) List all authorizations for specifieduserID.findAuthorizationsByUserName(String userName) List all authorizations for specifieduserName.updateAuthorization(Authorization authorization) Updates the status of the authorization.updateAuthorization(String authorizationID, AuthorizationUpdateRequest request) Update an authorization to be active or inactive.
-
Method Details
-
createAuthorization
Create an new authorization.- Parameters:
authorization- authorization to create.- Returns:
- created authorization
-
createAuthorization
@Nonnull Authorization createAuthorization(@Nonnull Organization organization, @Nonnull List<Permission> permissions) Create an authorization with definedpermissions.- Parameters:
organization- owner of authorizationpermissions- the permissions for the authorization- Returns:
- created authorization
-
createAuthorization
@Nonnull Authorization createAuthorization(@Nonnull String orgID, @Nonnull List<Permission> permissions) Create an authorization with definedpermissions.- Parameters:
orgID- owner id of authorizationpermissions- the permissions for the authorization- Returns:
- created authorization
-
createAuthorization
Create an authorization.Use this method to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The response contains the new authorization with the generated API token.
- Parameters:
request- The authorization to create.- Returns:
- Newly created authorization
-
updateAuthorization
Updates the status of the authorization. Useful for setting an authorization to inactive or active.- Parameters:
authorization- the authorization with updated status- Returns:
- updated authorization
-
updateAuthorization
@Nonnull Authorization updateAuthorization(@Nonnull String authorizationID, @Nonnull AuthorizationUpdateRequest request) Update an authorization to be active or inactive.- Parameters:
authorizationID- The ID of the authorization to update.request- Authorization to update- Returns:
- The active or inactive authorization
-
deleteAuthorization
Delete an authorization.- Parameters:
authorization- authorization to delete
-
deleteAuthorization
Delete an authorization.- Parameters:
authorizationID- ID of authorization to delete
-
cloneAuthorization
Clone an authorization.- Parameters:
authorizationID- ID of authorization to clone- Returns:
- cloned authorization
-
cloneAuthorization
Clone an authorization.- Parameters:
authorization- authorization to clone- Returns:
- cloned authorization
-
findAuthorizations
List all authorizations.- Returns:
- list all authorizations
-
findAuthorizationByID
Retrieve an authorization.- Parameters:
authorizationID- ID of authorization to get- Returns:
- authorization details
-
findAuthorizationsByUser
List all authorizations for specifieduser.- Parameters:
user- filter authorizations belonging to a user- Returns:
- A list of authorizations
-
findAuthorizationsByUserID
List all authorizations for specifieduserID.- Parameters:
userID- filter authorizations belonging to a user ID- Returns:
- A list of authorizations
-
findAuthorizationsByUserName
List all authorizations for specifieduserName.- Parameters:
userName- filter authorizations belonging to a user name- Returns:
- A list of authorizations
-
findAuthorizationsByOrg
List all authorizations for specifiedorganization.- Parameters:
organization- filter authorizations belonging to a org- Returns:
- A list of authorizations
-
findAuthorizationsByOrgID
List all authorizations for specifiedorgID.- Parameters:
orgID- filter authorizations belonging to a org id- Returns:
- A list of authorizations
-