@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class KeyManagementApi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KeyManagementApi.GetAPIKeyOptionalParameters
Manage optional parameters to getAPIKey.
|
static class |
KeyManagementApi.GetApplicationKeyOptionalParameters
Manage optional parameters to getApplicationKey.
|
static class |
KeyManagementApi.ListAPIKeysOptionalParameters
Manage optional parameters to listAPIKeys.
|
static class |
KeyManagementApi.ListApplicationKeysOptionalParameters
Manage optional parameters to listApplicationKeys.
|
static class |
KeyManagementApi.ListCurrentUserApplicationKeysOptionalParameters
Manage optional parameters to listCurrentUserApplicationKeys.
|
static class |
KeyManagementApi.ListPersonalAccessTokensOptionalParameters
Manage optional parameters to listPersonalAccessTokens.
|
| Constructor and Description |
|---|
KeyManagementApi() |
KeyManagementApi(ApiClient apiClient) |
public KeyManagementApi()
public KeyManagementApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient - an instance of API clientpublic APIKeyResponse createAPIKey(APIKeyCreateRequest body) throws ApiException
See createAPIKeyWithHttpInfo(com.datadog.api.client.v2.model.APIKeyCreateRequest).
body - (required)ApiException - if fails to make API callpublic CompletableFuture<APIKeyResponse> createAPIKeyAsync(APIKeyCreateRequest body)
See createAPIKeyWithHttpInfoAsync(com.datadog.api.client.v2.model.APIKeyCreateRequest).
body - (required)public ApiResponse<APIKeyResponse> createAPIKeyWithHttpInfo(APIKeyCreateRequest body) throws ApiException
body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 201 | Created | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<APIKeyResponse>> createAPIKeyWithHttpInfoAsync(APIKeyCreateRequest body)
See createAPIKeyWithHttpInfo(com.datadog.api.client.v2.model.APIKeyCreateRequest).
body - (required)public ApplicationKeyResponse createCurrentUserApplicationKey(ApplicationKeyCreateRequest body) throws ApiException
body - (required)ApiException - if fails to make API callpublic CompletableFuture<ApplicationKeyResponse> createCurrentUserApplicationKeyAsync(ApplicationKeyCreateRequest body)
body - (required)public ApiResponse<ApplicationKeyResponse> createCurrentUserApplicationKeyWithHttpInfo(ApplicationKeyCreateRequest body) throws ApiException
body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 201 | Created | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ApplicationKeyResponse>> createCurrentUserApplicationKeyWithHttpInfoAsync(ApplicationKeyCreateRequest body)
body - (required)public PersonalAccessTokenCreateResponse createPersonalAccessToken(PersonalAccessTokenCreateRequest body) throws ApiException
body - (required)ApiException - if fails to make API callpublic CompletableFuture<PersonalAccessTokenCreateResponse> createPersonalAccessTokenAsync(PersonalAccessTokenCreateRequest body)
body - (required)public ApiResponse<PersonalAccessTokenCreateResponse> createPersonalAccessTokenWithHttpInfo(PersonalAccessTokenCreateRequest body) throws ApiException
body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 201 | Created | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<PersonalAccessTokenCreateResponse>> createPersonalAccessTokenWithHttpInfoAsync(PersonalAccessTokenCreateRequest body)
body - (required)public void deleteAPIKey(String apiKeyId) throws ApiException
apiKeyId - The ID of the API key. (required)ApiException - if fails to make API callpublic CompletableFuture<Void> deleteAPIKeyAsync(String apiKeyId)
apiKeyId - The ID of the API key. (required)public ApiResponse<Void> deleteAPIKeyWithHttpInfo(String apiKeyId) throws ApiException
apiKeyId - The ID of the API key. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<Void>> deleteAPIKeyWithHttpInfoAsync(String apiKeyId)
apiKeyId - The ID of the API key. (required)public void deleteApplicationKey(String appKeyId) throws ApiException
appKeyId - The ID of the application key. (required)ApiException - if fails to make API callpublic CompletableFuture<Void> deleteApplicationKeyAsync(String appKeyId)
See deleteApplicationKeyWithHttpInfoAsync(java.lang.String).
appKeyId - The ID of the application key. (required)public ApiResponse<Void> deleteApplicationKeyWithHttpInfo(String appKeyId) throws ApiException
appKeyId - The ID of the application key. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<Void>> deleteApplicationKeyWithHttpInfoAsync(String appKeyId)
appKeyId - The ID of the application key. (required)public void deleteCurrentUserApplicationKey(String appKeyId) throws ApiException
See deleteCurrentUserApplicationKeyWithHttpInfo(java.lang.String).
appKeyId - The ID of the application key. (required)ApiException - if fails to make API callpublic CompletableFuture<Void> deleteCurrentUserApplicationKeyAsync(String appKeyId)
See deleteCurrentUserApplicationKeyWithHttpInfoAsync(java.lang.String).
appKeyId - The ID of the application key. (required)public ApiResponse<Void> deleteCurrentUserApplicationKeyWithHttpInfo(String appKeyId) throws ApiException
appKeyId - The ID of the application key. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<Void>> deleteCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId)
See deleteCurrentUserApplicationKeyWithHttpInfo(java.lang.String).
appKeyId - The ID of the application key. (required)public APIKeyResponse getAPIKey(String apiKeyId) throws ApiException
apiKeyId - The ID of the API key. (required)ApiException - if fails to make API callpublic CompletableFuture<APIKeyResponse> getAPIKeyAsync(String apiKeyId)
apiKeyId - The ID of the API key. (required)public APIKeyResponse getAPIKey(String apiKeyId, KeyManagementApi.GetAPIKeyOptionalParameters parameters) throws ApiException
apiKeyId - The ID of the API key. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<APIKeyResponse> getAPIKeyAsync(String apiKeyId, KeyManagementApi.GetAPIKeyOptionalParameters parameters)
apiKeyId - The ID of the API key. (required)parameters - Optional parameters for the request.public ApiResponse<APIKeyResponse> getAPIKeyWithHttpInfo(String apiKeyId, KeyManagementApi.GetAPIKeyOptionalParameters parameters) throws ApiException
apiKeyId - The ID of the API key. (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<APIKeyResponse>> getAPIKeyWithHttpInfoAsync(String apiKeyId, KeyManagementApi.GetAPIKeyOptionalParameters parameters)
apiKeyId - The ID of the API key. (required)parameters - Optional parameters for the request.public ApplicationKeyResponse getApplicationKey(String appKeyId) throws ApiException
appKeyId - The ID of the application key. (required)ApiException - if fails to make API callpublic CompletableFuture<ApplicationKeyResponse> getApplicationKeyAsync(String appKeyId)
appKeyId - The ID of the application key. (required)public ApplicationKeyResponse getApplicationKey(String appKeyId, KeyManagementApi.GetApplicationKeyOptionalParameters parameters) throws ApiException
appKeyId - The ID of the application key. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<ApplicationKeyResponse> getApplicationKeyAsync(String appKeyId, KeyManagementApi.GetApplicationKeyOptionalParameters parameters)
appKeyId - The ID of the application key. (required)parameters - Optional parameters for the request.public ApiResponse<ApplicationKeyResponse> getApplicationKeyWithHttpInfo(String appKeyId, KeyManagementApi.GetApplicationKeyOptionalParameters parameters) throws ApiException
appKeyId - The ID of the application key. (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ApplicationKeyResponse>> getApplicationKeyWithHttpInfoAsync(String appKeyId, KeyManagementApi.GetApplicationKeyOptionalParameters parameters)
appKeyId - The ID of the application key. (required)parameters - Optional parameters for the request.public ApplicationKeyResponse getCurrentUserApplicationKey(String appKeyId) throws ApiException
See getCurrentUserApplicationKeyWithHttpInfo(java.lang.String).
appKeyId - The ID of the application key. (required)ApiException - if fails to make API callpublic CompletableFuture<ApplicationKeyResponse> getCurrentUserApplicationKeyAsync(String appKeyId)
See getCurrentUserApplicationKeyWithHttpInfoAsync(java.lang.String).
appKeyId - The ID of the application key. (required)public ApiResponse<ApplicationKeyResponse> getCurrentUserApplicationKeyWithHttpInfo(String appKeyId) throws ApiException
key field is not returned for
organizations in One-Time
Read mode.appKeyId - The ID of the application key. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ApplicationKeyResponse>> getCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId)
See getCurrentUserApplicationKeyWithHttpInfo(java.lang.String).
appKeyId - The ID of the application key. (required)public PersonalAccessTokenResponse getPersonalAccessToken(String tokenId) throws ApiException
tokenId - The ID of the access token. (required)ApiException - if fails to make API callpublic CompletableFuture<PersonalAccessTokenResponse> getPersonalAccessTokenAsync(String tokenId)
See getPersonalAccessTokenWithHttpInfoAsync(java.lang.String).
tokenId - The ID of the access token. (required)public ApiResponse<PersonalAccessTokenResponse> getPersonalAccessTokenWithHttpInfo(String tokenId) throws ApiException
tokenId - The ID of the access token. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<PersonalAccessTokenResponse>> getPersonalAccessTokenWithHttpInfoAsync(String tokenId)
tokenId - The ID of the access token. (required)public APIKeysResponse listAPIKeys() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<APIKeysResponse> listAPIKeysAsync()
public APIKeysResponse listAPIKeys(KeyManagementApi.ListAPIKeysOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<APIKeysResponse> listAPIKeysAsync(KeyManagementApi.ListAPIKeysOptionalParameters parameters)
parameters - Optional parameters for the request.public ApiResponse<APIKeysResponse> listAPIKeysWithHttpInfo(KeyManagementApi.ListAPIKeysOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<APIKeysResponse>> listAPIKeysWithHttpInfoAsync(KeyManagementApi.ListAPIKeysOptionalParameters parameters)
parameters - Optional parameters for the request.public ListApplicationKeysResponse listApplicationKeys() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<ListApplicationKeysResponse> listApplicationKeysAsync()
public ListApplicationKeysResponse listApplicationKeys(KeyManagementApi.ListApplicationKeysOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<ListApplicationKeysResponse> listApplicationKeysAsync(KeyManagementApi.ListApplicationKeysOptionalParameters parameters)
parameters - Optional parameters for the request.public ApiResponse<ListApplicationKeysResponse> listApplicationKeysWithHttpInfo(KeyManagementApi.ListApplicationKeysOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ListApplicationKeysResponse>> listApplicationKeysWithHttpInfoAsync(KeyManagementApi.ListApplicationKeysOptionalParameters parameters)
parameters - Optional parameters for the request.public ListApplicationKeysResponse listCurrentUserApplicationKeys() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<ListApplicationKeysResponse> listCurrentUserApplicationKeysAsync()
public ListApplicationKeysResponse listCurrentUserApplicationKeys(KeyManagementApi.ListCurrentUserApplicationKeysOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<ListApplicationKeysResponse> listCurrentUserApplicationKeysAsync(KeyManagementApi.ListCurrentUserApplicationKeysOptionalParameters parameters)
parameters - Optional parameters for the request.public ApiResponse<ListApplicationKeysResponse> listCurrentUserApplicationKeysWithHttpInfo(KeyManagementApi.ListCurrentUserApplicationKeysOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ListApplicationKeysResponse>> listCurrentUserApplicationKeysWithHttpInfoAsync(KeyManagementApi.ListCurrentUserApplicationKeysOptionalParameters parameters)
parameters - Optional parameters for the request.public ListPersonalAccessTokensResponse listPersonalAccessTokens() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<ListPersonalAccessTokensResponse> listPersonalAccessTokensAsync()
public ListPersonalAccessTokensResponse listPersonalAccessTokens(KeyManagementApi.ListPersonalAccessTokensOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<ListPersonalAccessTokensResponse> listPersonalAccessTokensAsync(KeyManagementApi.ListPersonalAccessTokensOptionalParameters parameters)
parameters - Optional parameters for the request.public ApiResponse<ListPersonalAccessTokensResponse> listPersonalAccessTokensWithHttpInfo(KeyManagementApi.ListPersonalAccessTokensOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ListPersonalAccessTokensResponse>> listPersonalAccessTokensWithHttpInfoAsync(KeyManagementApi.ListPersonalAccessTokensOptionalParameters parameters)
parameters - Optional parameters for the request.public void revokePersonalAccessToken(String tokenId) throws ApiException
See revokePersonalAccessTokenWithHttpInfo(java.lang.String).
tokenId - The ID of the access token. (required)ApiException - if fails to make API callpublic CompletableFuture<Void> revokePersonalAccessTokenAsync(String tokenId)
See revokePersonalAccessTokenWithHttpInfoAsync(java.lang.String).
tokenId - The ID of the access token. (required)public ApiResponse<Void> revokePersonalAccessTokenWithHttpInfo(String tokenId) throws ApiException
tokenId - The ID of the access token. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<Void>> revokePersonalAccessTokenWithHttpInfoAsync(String tokenId)
See revokePersonalAccessTokenWithHttpInfo(java.lang.String).
tokenId - The ID of the access token. (required)public APIKeyResponse updateAPIKey(String apiKeyId, APIKeyUpdateRequest body) throws ApiException
See updateAPIKeyWithHttpInfo(java.lang.String, com.datadog.api.client.v2.model.APIKeyUpdateRequest).
apiKeyId - The ID of the API key. (required)body - (required)ApiException - if fails to make API callpublic CompletableFuture<APIKeyResponse> updateAPIKeyAsync(String apiKeyId, APIKeyUpdateRequest body)
See updateAPIKeyWithHttpInfoAsync(java.lang.String, com.datadog.api.client.v2.model.APIKeyUpdateRequest).
apiKeyId - The ID of the API key. (required)body - (required)public ApiResponse<APIKeyResponse> updateAPIKeyWithHttpInfo(String apiKeyId, APIKeyUpdateRequest body) throws ApiException
apiKeyId - The ID of the API key. (required)body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<APIKeyResponse>> updateAPIKeyWithHttpInfoAsync(String apiKeyId, APIKeyUpdateRequest body)
See updateAPIKeyWithHttpInfo(java.lang.String, com.datadog.api.client.v2.model.APIKeyUpdateRequest).
apiKeyId - The ID of the API key. (required)body - (required)public ApplicationKeyResponse updateApplicationKey(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException
appKeyId - The ID of the application key. (required)body - (required)ApiException - if fails to make API callpublic CompletableFuture<ApplicationKeyResponse> updateApplicationKeyAsync(String appKeyId, ApplicationKeyUpdateRequest body)
appKeyId - The ID of the application key. (required)body - (required)public ApiResponse<ApplicationKeyResponse> updateApplicationKeyWithHttpInfo(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException
appKeyId - The ID of the application key. (required)body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ApplicationKeyResponse>> updateApplicationKeyWithHttpInfoAsync(String appKeyId, ApplicationKeyUpdateRequest body)
appKeyId - The ID of the application key. (required)body - (required)public ApplicationKeyResponse updateCurrentUserApplicationKey(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException
appKeyId - The ID of the application key. (required)body - (required)ApiException - if fails to make API callpublic CompletableFuture<ApplicationKeyResponse> updateCurrentUserApplicationKeyAsync(String appKeyId, ApplicationKeyUpdateRequest body)
appKeyId - The ID of the application key. (required)body - (required)public ApiResponse<ApplicationKeyResponse> updateCurrentUserApplicationKeyWithHttpInfo(String appKeyId, ApplicationKeyUpdateRequest body) throws ApiException
key field is not returned for
organizations in One-Time
Read mode.appKeyId - The ID of the application key. (required)body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ApplicationKeyResponse>> updateCurrentUserApplicationKeyWithHttpInfoAsync(String appKeyId, ApplicationKeyUpdateRequest body)
appKeyId - The ID of the application key. (required)body - (required)public PersonalAccessTokenResponse updatePersonalAccessToken(String tokenId, PersonalAccessTokenUpdateRequest body) throws ApiException
tokenId - The ID of the access token. (required)body - (required)ApiException - if fails to make API callpublic CompletableFuture<PersonalAccessTokenResponse> updatePersonalAccessTokenAsync(String tokenId, PersonalAccessTokenUpdateRequest body)
tokenId - The ID of the access token. (required)body - (required)public ApiResponse<PersonalAccessTokenResponse> updatePersonalAccessTokenWithHttpInfo(String tokenId, PersonalAccessTokenUpdateRequest body) throws ApiException
tokenId - The ID of the access token. (required)body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<PersonalAccessTokenResponse>> updatePersonalAccessTokenWithHttpInfoAsync(String tokenId, PersonalAccessTokenUpdateRequest body)
tokenId - The ID of the access token. (required)body - (required)public ValidateV2Response validate() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<ValidateV2Response> validateAsync()
public ApiResponse<ValidateV2Response> validateWithHttpInfo() throws ApiException
ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ValidateV2Response>> validateWithHttpInfoAsync()
public ValidateAPIKeyResponse validateAPIKey() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<ValidateAPIKeyResponse> validateAPIKeyAsync()
public ApiResponse<ValidateAPIKeyResponse> validateAPIKeyWithHttpInfo() throws ApiException
{"status": "ok"} on success, 401 or 403 otherwise. Useful as a
lightweight authentication probe before issuing other API calls that require full credentials.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<ValidateAPIKeyResponse>> validateAPIKeyWithHttpInfoAsync()
Copyright © 2026. All rights reserved.