Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,9 +1132,9 @@ components:
schema:
type: string
PersonalAccessTokenID:
description: The UUID of the personal access token.
description: The ID of the personal access token.
in: path
name: pat_uuid
name: pat_id
required: true
schema:
example: "00000000-0000-1234-0000-000000000000"
Expand Down Expand Up @@ -29172,11 +29172,6 @@ components:
FullPersonalAccessTokenAttributes:
description: Attributes of a full personal access token, including the token key.
properties:
alias:
description: The alias (short identifier) of the personal access token.
example: "2H9MCNMBM8FQjQ16YucXkX"
readOnly: true
type: string
created_at:
description: Creation date of the personal access token.
example: "2024-01-01T00:00:00+00:00"
Expand Down Expand Up @@ -52995,11 +52990,6 @@ components:
PersonalAccessTokenAttributes:
description: Attributes of a personal access token.
properties:
alias:
description: The alias (short identifier) of the personal access token.
example: "2H9MCNMBM8FQjQ16YucXkX"
readOnly: true
type: string
created_at:
description: Creation date of the personal access token.
example: "2024-01-01T00:00:00+00:00"
Expand Down Expand Up @@ -77461,6 +77451,10 @@ components:
description: Title of the user.
nullable: true
type: string
uuid:
description: UUID of the user.
readOnly: true
type: string
verified:
description: Whether the user is verified.
type: boolean
Expand Down Expand Up @@ -105498,7 +105492,7 @@ paths:
operator: OR
permissions:
- user_app_keys
/api/v2/personal_access_tokens/{pat_uuid}:
/api/v2/personal_access_tokens/{pat_id}:
delete:
description: Revoke a specific personal access token.
operationId: RevokePersonalAccessToken
Expand Down Expand Up @@ -115188,7 +115182,7 @@ paths:
operator: OR
permissions:
- service_account_write
/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}:
/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}:
delete:
description: Revoke a specific access token for a service account.
operationId: RevokeServiceAccountAccessToken
Expand Down
122 changes: 60 additions & 62 deletions src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1402,25 +1402,24 @@ public ApiResponse<ApplicationKeyResponse> getCurrentUserApplicationKeyWithHttpI
*
* <p>See {@link #getPersonalAccessTokenWithHttpInfo}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return PersonalAccessTokenResponse
* @throws ApiException if fails to make API call
*/
public PersonalAccessTokenResponse getPersonalAccessToken(String patUuid) throws ApiException {
return getPersonalAccessTokenWithHttpInfo(patUuid).getData();
public PersonalAccessTokenResponse getPersonalAccessToken(String patId) throws ApiException {
return getPersonalAccessTokenWithHttpInfo(patId).getData();
}

/**
* Get a personal access token.
*
* <p>See {@link #getPersonalAccessTokenWithHttpInfoAsync}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return CompletableFuture&lt;PersonalAccessTokenResponse&gt;
*/
public CompletableFuture<PersonalAccessTokenResponse> getPersonalAccessTokenAsync(
String patUuid) {
return getPersonalAccessTokenWithHttpInfoAsync(patUuid)
public CompletableFuture<PersonalAccessTokenResponse> getPersonalAccessTokenAsync(String patId) {
return getPersonalAccessTokenWithHttpInfoAsync(patId)
.thenApply(
response -> {
return response.getData();
Expand All @@ -1430,7 +1429,7 @@ public CompletableFuture<PersonalAccessTokenResponse> getPersonalAccessTokenAsyn
/**
* Get a specific personal access token by its UUID.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return ApiResponse&lt;PersonalAccessTokenResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
Expand All @@ -1443,19 +1442,19 @@ public CompletableFuture<PersonalAccessTokenResponse> getPersonalAccessTokenAsyn
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<PersonalAccessTokenResponse> getPersonalAccessTokenWithHttpInfo(String patUuid)
public ApiResponse<PersonalAccessTokenResponse> getPersonalAccessTokenWithHttpInfo(String patId)
throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'patUuid' is set
if (patUuid == null) {
// verify the required parameter 'patId' is set
if (patId == null) {
throw new ApiException(
400, "Missing the required parameter 'patUuid' when calling getPersonalAccessToken");
400, "Missing the required parameter 'patId' when calling getPersonalAccessToken");
}
// create path and map variables
String localVarPath =
"/api/v2/personal_access_tokens/{pat_uuid}"
.replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString()));
"/api/v2/personal_access_tokens/{pat_id}"
.replaceAll("\\{" + "pat_id" + "\\}", apiClient.escapeString(patId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down Expand Up @@ -1484,26 +1483,26 @@ public ApiResponse<PersonalAccessTokenResponse> getPersonalAccessTokenWithHttpIn
*
* <p>See {@link #getPersonalAccessTokenWithHttpInfo}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return CompletableFuture&lt;ApiResponse&lt;PersonalAccessTokenResponse&gt;&gt;
*/
public CompletableFuture<ApiResponse<PersonalAccessTokenResponse>>
getPersonalAccessTokenWithHttpInfoAsync(String patUuid) {
getPersonalAccessTokenWithHttpInfoAsync(String patId) {
Object localVarPostBody = null;

// verify the required parameter 'patUuid' is set
if (patUuid == null) {
// verify the required parameter 'patId' is set
if (patId == null) {
CompletableFuture<ApiResponse<PersonalAccessTokenResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'patUuid' when calling getPersonalAccessToken"));
400, "Missing the required parameter 'patId' when calling getPersonalAccessToken"));
return result;
}
// create path and map variables
String localVarPath =
"/api/v2/personal_access_tokens/{pat_uuid}"
.replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString()));
"/api/v2/personal_access_tokens/{pat_id}"
.replaceAll("\\{" + "pat_id" + "\\}", apiClient.escapeString(patId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down Expand Up @@ -2695,23 +2694,23 @@ public ApiResponse<ListPersonalAccessTokensResponse> listPersonalAccessTokensWit
*
* <p>See {@link #revokePersonalAccessTokenWithHttpInfo}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @throws ApiException if fails to make API call
*/
public void revokePersonalAccessToken(String patUuid) throws ApiException {
revokePersonalAccessTokenWithHttpInfo(patUuid);
public void revokePersonalAccessToken(String patId) throws ApiException {
revokePersonalAccessTokenWithHttpInfo(patId);
}

/**
* Revoke a personal access token.
*
* <p>See {@link #revokePersonalAccessTokenWithHttpInfoAsync}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return CompletableFuture
*/
public CompletableFuture<Void> revokePersonalAccessTokenAsync(String patUuid) {
return revokePersonalAccessTokenWithHttpInfoAsync(patUuid)
public CompletableFuture<Void> revokePersonalAccessTokenAsync(String patId) {
return revokePersonalAccessTokenWithHttpInfoAsync(patId)
.thenApply(
response -> {
return response.getData();
Expand All @@ -2721,7 +2720,7 @@ public CompletableFuture<Void> revokePersonalAccessTokenAsync(String patUuid) {
/**
* Revoke a specific personal access token.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
Expand All @@ -2734,19 +2733,18 @@ public CompletableFuture<Void> revokePersonalAccessTokenAsync(String patUuid) {
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<Void> revokePersonalAccessTokenWithHttpInfo(String patUuid)
throws ApiException {
public ApiResponse<Void> revokePersonalAccessTokenWithHttpInfo(String patId) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'patUuid' is set
if (patUuid == null) {
// verify the required parameter 'patId' is set
if (patId == null) {
throw new ApiException(
400, "Missing the required parameter 'patUuid' when calling revokePersonalAccessToken");
400, "Missing the required parameter 'patId' when calling revokePersonalAccessToken");
}
// create path and map variables
String localVarPath =
"/api/v2/personal_access_tokens/{pat_uuid}"
.replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString()));
"/api/v2/personal_access_tokens/{pat_id}"
.replaceAll("\\{" + "pat_id" + "\\}", apiClient.escapeString(patId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down Expand Up @@ -2775,26 +2773,26 @@ public ApiResponse<Void> revokePersonalAccessTokenWithHttpInfo(String patUuid)
*
* <p>See {@link #revokePersonalAccessTokenWithHttpInfo}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> revokePersonalAccessTokenWithHttpInfoAsync(
String patUuid) {
String patId) {
Object localVarPostBody = null;

// verify the required parameter 'patUuid' is set
if (patUuid == null) {
// verify the required parameter 'patId' is set
if (patId == null) {
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400,
"Missing the required parameter 'patUuid' when calling revokePersonalAccessToken"));
"Missing the required parameter 'patId' when calling revokePersonalAccessToken"));
return result;
}
// create path and map variables
String localVarPath =
"/api/v2/personal_access_tokens/{pat_uuid}"
.replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString()));
"/api/v2/personal_access_tokens/{pat_id}"
.replaceAll("\\{" + "pat_id" + "\\}", apiClient.escapeString(patId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down Expand Up @@ -3310,28 +3308,28 @@ public ApiResponse<ApplicationKeyResponse> updateCurrentUserApplicationKeyWithHt
*
* <p>See {@link #updatePersonalAccessTokenWithHttpInfo}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @param body (required)
* @return PersonalAccessTokenResponse
* @throws ApiException if fails to make API call
*/
public PersonalAccessTokenResponse updatePersonalAccessToken(
String patUuid, PersonalAccessTokenUpdateRequest body) throws ApiException {
return updatePersonalAccessTokenWithHttpInfo(patUuid, body).getData();
String patId, PersonalAccessTokenUpdateRequest body) throws ApiException {
return updatePersonalAccessTokenWithHttpInfo(patId, body).getData();
}

/**
* Update a personal access token.
*
* <p>See {@link #updatePersonalAccessTokenWithHttpInfoAsync}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @param body (required)
* @return CompletableFuture&lt;PersonalAccessTokenResponse&gt;
*/
public CompletableFuture<PersonalAccessTokenResponse> updatePersonalAccessTokenAsync(
String patUuid, PersonalAccessTokenUpdateRequest body) {
return updatePersonalAccessTokenWithHttpInfoAsync(patUuid, body)
String patId, PersonalAccessTokenUpdateRequest body) {
return updatePersonalAccessTokenWithHttpInfoAsync(patId, body)
.thenApply(
response -> {
return response.getData();
Expand All @@ -3341,7 +3339,7 @@ public CompletableFuture<PersonalAccessTokenResponse> updatePersonalAccessTokenA
/**
* Update a specific personal access token.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @param body (required)
* @return ApiResponse&lt;PersonalAccessTokenResponse&gt;
* @throws ApiException if fails to make API call
Expand All @@ -3357,13 +3355,13 @@ public CompletableFuture<PersonalAccessTokenResponse> updatePersonalAccessTokenA
* </table>
*/
public ApiResponse<PersonalAccessTokenResponse> updatePersonalAccessTokenWithHttpInfo(
String patUuid, PersonalAccessTokenUpdateRequest body) throws ApiException {
String patId, PersonalAccessTokenUpdateRequest body) throws ApiException {
Object localVarPostBody = body;

// verify the required parameter 'patUuid' is set
if (patUuid == null) {
// verify the required parameter 'patId' is set
if (patId == null) {
throw new ApiException(
400, "Missing the required parameter 'patUuid' when calling updatePersonalAccessToken");
400, "Missing the required parameter 'patId' when calling updatePersonalAccessToken");
}

// verify the required parameter 'body' is set
Expand All @@ -3373,8 +3371,8 @@ public ApiResponse<PersonalAccessTokenResponse> updatePersonalAccessTokenWithHtt
}
// create path and map variables
String localVarPath =
"/api/v2/personal_access_tokens/{pat_uuid}"
.replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString()));
"/api/v2/personal_access_tokens/{pat_id}"
.replaceAll("\\{" + "pat_id" + "\\}", apiClient.escapeString(patId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down Expand Up @@ -3403,23 +3401,23 @@ public ApiResponse<PersonalAccessTokenResponse> updatePersonalAccessTokenWithHtt
*
* <p>See {@link #updatePersonalAccessTokenWithHttpInfo}.
*
* @param patUuid The UUID of the personal access token. (required)
* @param patId The ID of the personal access token. (required)
* @param body (required)
* @return CompletableFuture&lt;ApiResponse&lt;PersonalAccessTokenResponse&gt;&gt;
*/
public CompletableFuture<ApiResponse<PersonalAccessTokenResponse>>
updatePersonalAccessTokenWithHttpInfoAsync(
String patUuid, PersonalAccessTokenUpdateRequest body) {
String patId, PersonalAccessTokenUpdateRequest body) {
Object localVarPostBody = body;

// verify the required parameter 'patUuid' is set
if (patUuid == null) {
// verify the required parameter 'patId' is set
if (patId == null) {
CompletableFuture<ApiResponse<PersonalAccessTokenResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400,
"Missing the required parameter 'patUuid' when calling updatePersonalAccessToken"));
"Missing the required parameter 'patId' when calling updatePersonalAccessToken"));
return result;
}

Expand All @@ -3434,8 +3432,8 @@ public ApiResponse<PersonalAccessTokenResponse> updatePersonalAccessTokenWithHtt
}
// create path and map variables
String localVarPath =
"/api/v2/personal_access_tokens/{pat_uuid}"
.replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString()));
"/api/v2/personal_access_tokens/{pat_id}"
.replaceAll("\\{" + "pat_id" + "\\}", apiClient.escapeString(patId.toString()));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down
Loading
Loading