@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class UsersApi extends Object
| Constructor and Description |
|---|
UsersApi() |
UsersApi(ApiClient apiClient) |
public UsersApi()
public UsersApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient - an instance of API clientpublic UserResponse createUser(User body) throws ApiException
See createUserWithHttpInfo(com.datadog.api.client.v1.model.User).
body - User object that needs to be created. (required)ApiException - if fails to make API callpublic CompletableFuture<UserResponse> createUserAsync(User body)
See createUserWithHttpInfoAsync(com.datadog.api.client.v1.model.User).
body - User object that needs to be created. (required)public ApiResponse<UserResponse> createUserWithHttpInfo(User body) throws ApiException
Note: Users can only be created with the admin access role if application keys belong to administrators.
body - User object that needs to be created. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | User created | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
| 409 | Conflict | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<UserResponse>> createUserWithHttpInfoAsync(User body)
See createUserWithHttpInfo(com.datadog.api.client.v1.model.User).
body - User object that needs to be created. (required)public UserDisableResponse disableUser(String userHandle) throws ApiException
userHandle - The handle of the user. (required)ApiException - if fails to make API callpublic CompletableFuture<UserDisableResponse> disableUserAsync(String userHandle)
userHandle - The handle of the user. (required)public ApiResponse<UserDisableResponse> disableUserWithHttpInfo(String userHandle) throws ApiException
Note: This endpoint can only be used with application keys belonging to administrators.
userHandle - The handle of the user. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | User disabled | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<UserDisableResponse>> disableUserWithHttpInfoAsync(String userHandle)
userHandle - The handle of the user. (required)public UserResponse getUser(String userHandle) throws ApiException
userHandle - The ID of the user. (required)ApiException - if fails to make API callpublic CompletableFuture<UserResponse> getUserAsync(String userHandle)
userHandle - The ID of the user. (required)public ApiResponse<UserResponse> getUserWithHttpInfo(String userHandle) throws ApiException
userHandle - The ID of the user. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK for get user | - |
| 403 | Authentication error | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<UserResponse>> getUserWithHttpInfoAsync(String userHandle)
userHandle - The ID of the user. (required)public UserListResponse listUsers() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<UserListResponse> listUsersAsync()
public ApiResponse<UserListResponse> listUsersWithHttpInfo() throws ApiException
ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 403 | Authentication error | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<UserListResponse>> listUsersWithHttpInfoAsync()
public UserResponse updateUser(String userHandle, User body) throws ApiException
See updateUserWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.User).
userHandle - The ID of the user. (required)body - Description of the update. (required)ApiException - if fails to make API callpublic CompletableFuture<UserResponse> updateUserAsync(String userHandle, User body)
See updateUserWithHttpInfoAsync(java.lang.String, com.datadog.api.client.v1.model.User).
userHandle - The ID of the user. (required)body - Description of the update. (required)public ApiResponse<UserResponse> updateUserWithHttpInfo(String userHandle, User body) throws ApiException
Note: It can only be used with application keys belonging to administrators.
userHandle - The ID of the user. (required)body - Description of the update. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | User updated | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<UserResponse>> updateUserWithHttpInfoAsync(String userHandle, User body)
See updateUserWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.User).
userHandle - The ID of the user. (required)body - Description of the update. (required)Copyright © 2024. All rights reserved.