Skip to content

Commit d0756bb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7cb577c of spec repo
1 parent cc77169 commit d0756bb

10 files changed

Lines changed: 91 additions & 107 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,9 @@ components:
11181118
schema:
11191119
type: string
11201120
PersonalAccessTokenID:
1121-
description: The UUID of the personal access token.
1121+
description: The ID of the personal access token.
11221122
in: path
1123-
name: pat_uuid
1123+
name: pat_id
11241124
required: true
11251125
schema:
11261126
example: "00000000-0000-1234-0000-000000000000"
@@ -28760,11 +28760,6 @@ components:
2876028760
FullPersonalAccessTokenAttributes:
2876128761
description: Attributes of a full personal access token, including the token key.
2876228762
properties:
28763-
alias:
28764-
description: The alias (short identifier) of the personal access token.
28765-
example: "2H9MCNMBM8FQjQ16YucXkX"
28766-
readOnly: true
28767-
type: string
2876828763
created_at:
2876928764
description: Creation date of the personal access token.
2877028765
example: "2024-01-01T00:00:00+00:00"
@@ -52460,11 +52455,6 @@ components:
5246052455
PersonalAccessTokenAttributes:
5246152456
description: Attributes of a personal access token.
5246252457
properties:
52463-
alias:
52464-
description: The alias (short identifier) of the personal access token.
52465-
example: "2H9MCNMBM8FQjQ16YucXkX"
52466-
readOnly: true
52467-
type: string
5246852458
created_at:
5246952459
description: Creation date of the personal access token.
5247052460
example: "2024-01-01T00:00:00+00:00"
@@ -76731,6 +76721,10 @@ components:
7673176721
description: Title of the user.
7673276722
nullable: true
7673376723
type: string
76724+
uuid:
76725+
description: UUID of the user.
76726+
readOnly: true
76727+
type: string
7673476728
verified:
7673576729
description: Whether the user is verified.
7673676730
type: boolean
@@ -104768,7 +104762,7 @@ paths:
104768104762
operator: OR
104769104763
permissions:
104770104764
- user_app_keys
104771-
/api/v2/personal_access_tokens/{pat_uuid}:
104765+
/api/v2/personal_access_tokens/{pat_id}:
104772104766
delete:
104773104767
description: Revoke a specific personal access token.
104774104768
operationId: RevokePersonalAccessToken
@@ -114323,7 +114317,7 @@ paths:
114323114317
operator: OR
114324114318
permissions:
114325114319
- service_account_write
114326-
/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}:
114320+
/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}:
114327114321
delete:
114328114322
description: Revoke a specific access token for a service account.
114329114323
operationId: RevokeServiceAccountAccessToken

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,13 +1097,13 @@
10971097
"body" => "PersonalAccessTokenCreateRequest",
10981098
},
10991099
"v2.RevokePersonalAccessToken" => {
1100-
"pat_uuid" => "String",
1100+
"pat_id" => "String",
11011101
},
11021102
"v2.GetPersonalAccessToken" => {
1103-
"pat_uuid" => "String",
1103+
"pat_id" => "String",
11041104
},
11051105
"v2.UpdatePersonalAccessToken" => {
1106-
"pat_uuid" => "String",
1106+
"pat_id" => "String",
11071107
"body" => "PersonalAccessTokenUpdateRequest",
11081108
},
11091109
"v2.ListAPIs" => {
@@ -3961,15 +3961,15 @@
39613961
},
39623962
"v2.RevokeServiceAccountAccessToken" => {
39633963
"service_account_id" => "String",
3964-
"pat_uuid" => "String",
3964+
"pat_id" => "String",
39653965
},
39663966
"v2.GetServiceAccountAccessToken" => {
39673967
"service_account_id" => "String",
3968-
"pat_uuid" => "String",
3968+
"pat_id" => "String",
39693969
},
39703970
"v2.UpdateServiceAccountAccessToken" => {
39713971
"service_account_id" => "String",
3972-
"pat_uuid" => "String",
3972+
"pat_id" => "String",
39733973
"body" => "PersonalAccessTokenUpdateRequest",
39743974
},
39753975
"v2.ListServiceAccountApplicationKeys" => {

features/v2/key_management.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@ Feature: Key Management
221221
@generated @skip @team:DataDog/credentials-management
222222
Scenario: Get a personal access token returns "Not Found" response
223223
Given new "GetPersonalAccessToken" request
224-
And request contains "pat_uuid" parameter from "REPLACE.ME"
224+
And request contains "pat_id" parameter from "REPLACE.ME"
225225
When the request is sent
226226
Then the response status is 404 Not Found
227227

228228
@team:DataDog/credentials-management
229229
Scenario: Get a personal access token returns "OK" response
230230
Given there is a valid "personal_access_token" in the system
231231
And new "GetPersonalAccessToken" request
232-
And request contains "pat_uuid" parameter from "personal_access_token.data.id"
232+
And request contains "pat_id" parameter from "personal_access_token.data.id"
233233
When the request is sent
234234
Then the response status is 200 OK
235235
And the response "data.type" is equal to "personal_access_tokens"
@@ -355,29 +355,29 @@ Feature: Key Management
355355
Scenario: Revoke a personal access token returns "No Content" response
356356
Given there is a valid "personal_access_token" in the system
357357
And new "RevokePersonalAccessToken" request
358-
And request contains "pat_uuid" parameter from "personal_access_token.data.id"
358+
And request contains "pat_id" parameter from "personal_access_token.data.id"
359359
When the request is sent
360360
Then the response status is 204 No Content
361361

362362
@generated @skip @team:DataDog/credentials-management
363363
Scenario: Revoke a personal access token returns "Not Found" response
364364
Given new "RevokePersonalAccessToken" request
365-
And request contains "pat_uuid" parameter from "REPLACE.ME"
365+
And request contains "pat_id" parameter from "REPLACE.ME"
366366
When the request is sent
367367
Then the response status is 404 Not Found
368368

369369
@generated @skip @team:DataDog/credentials-management
370370
Scenario: Update a personal access token returns "Bad Request" response
371371
Given new "UpdatePersonalAccessToken" request
372-
And request contains "pat_uuid" parameter from "REPLACE.ME"
372+
And request contains "pat_id" parameter from "REPLACE.ME"
373373
And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}}
374374
When the request is sent
375375
Then the response status is 400 Bad Request
376376

377377
@generated @skip @team:DataDog/credentials-management
378378
Scenario: Update a personal access token returns "Not Found" response
379379
Given new "UpdatePersonalAccessToken" request
380-
And request contains "pat_uuid" parameter from "REPLACE.ME"
380+
And request contains "pat_id" parameter from "REPLACE.ME"
381381
And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}}
382382
When the request is sent
383383
Then the response status is 404 Not Found
@@ -386,7 +386,7 @@ Feature: Key Management
386386
Scenario: Update a personal access token returns "OK" response
387387
Given there is a valid "personal_access_token" in the system
388388
And new "UpdatePersonalAccessToken" request
389-
And request contains "pat_uuid" parameter from "personal_access_token.data.id"
389+
And request contains "pat_id" parameter from "personal_access_token.data.id"
390390
And body with value {"data": {"type": "personal_access_tokens", "id": "{{ personal_access_token.data.id }}", "attributes": {"name": "{{ unique }}-updated"}}}
391391
When the request is sent
392392
Then the response status is 200 OK

features/v2/service_accounts.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Feature: Service Accounts
142142
Scenario: Get an access token for a service account returns "Not Found" response
143143
Given new "GetServiceAccountAccessToken" request
144144
And request contains "service_account_id" parameter from "REPLACE.ME"
145-
And request contains "pat_uuid" parameter from "REPLACE.ME"
145+
And request contains "pat_id" parameter from "REPLACE.ME"
146146
When the request is sent
147147
Then the response status is 404 Not Found
148148

@@ -152,7 +152,7 @@ Feature: Service Accounts
152152
And there is a valid "service_account_access_token" for "service_account_user"
153153
And new "GetServiceAccountAccessToken" request
154154
And request contains "service_account_id" parameter from "service_account_user.data.id"
155-
And request contains "pat_uuid" parameter from "service_account_access_token.data.id"
155+
And request contains "pat_id" parameter from "service_account_access_token.data.id"
156156
When the request is sent
157157
Then the response status is 200 OK
158158
And the response "data.attributes.name" has the same value as "service_account_access_token.data.attributes.name"
@@ -232,23 +232,23 @@ Feature: Service Accounts
232232
And there is a valid "service_account_access_token" for "service_account_user"
233233
And new "RevokeServiceAccountAccessToken" request
234234
And request contains "service_account_id" parameter from "service_account_user.data.id"
235-
And request contains "pat_uuid" parameter from "service_account_access_token.data.id"
235+
And request contains "pat_id" parameter from "service_account_access_token.data.id"
236236
When the request is sent
237237
Then the response status is 204 No Content
238238

239239
@generated @skip @team:DataDog/credentials-management
240240
Scenario: Revoke an access token for a service account returns "Not Found" response
241241
Given new "RevokeServiceAccountAccessToken" request
242242
And request contains "service_account_id" parameter from "REPLACE.ME"
243-
And request contains "pat_uuid" parameter from "REPLACE.ME"
243+
And request contains "pat_id" parameter from "REPLACE.ME"
244244
When the request is sent
245245
Then the response status is 404 Not Found
246246

247247
@generated @skip @team:DataDog/credentials-management
248248
Scenario: Update an access token for a service account returns "Bad Request" response
249249
Given new "UpdateServiceAccountAccessToken" request
250250
And request contains "service_account_id" parameter from "REPLACE.ME"
251-
And request contains "pat_uuid" parameter from "REPLACE.ME"
251+
And request contains "pat_id" parameter from "REPLACE.ME"
252252
And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}}
253253
When the request is sent
254254
Then the response status is 400 Bad Request
@@ -257,7 +257,7 @@ Feature: Service Accounts
257257
Scenario: Update an access token for a service account returns "Not Found" response
258258
Given new "UpdateServiceAccountAccessToken" request
259259
And request contains "service_account_id" parameter from "REPLACE.ME"
260-
And request contains "pat_uuid" parameter from "REPLACE.ME"
260+
And request contains "pat_id" parameter from "REPLACE.ME"
261261
And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}}
262262
When the request is sent
263263
Then the response status is 404 Not Found
@@ -268,7 +268,7 @@ Feature: Service Accounts
268268
And there is a valid "service_account_access_token" for "service_account_user"
269269
And new "UpdateServiceAccountAccessToken" request
270270
And request contains "service_account_id" parameter from "service_account_user.data.id"
271-
And request contains "pat_uuid" parameter from "service_account_access_token.data.id"
271+
And request contains "pat_id" parameter from "service_account_access_token.data.id"
272272
And body with value {"data": {"id": "{{ service_account_access_token.data.id }}", "type": "personal_access_tokens", "attributes": {"name": "{{ service_account_access_token.data.attributes.name }}-updated"}}}
273273
When the request is sent
274274
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4293,7 +4293,7 @@
42934293
"operationId": "RevokePersonalAccessToken",
42944294
"parameters": [
42954295
{
4296-
"name": "pat_uuid",
4296+
"name": "pat_id",
42974297
"source": "data.id"
42984298
}
42994299
],
@@ -5828,7 +5828,7 @@
58285828
"source": "data.relationships.owned_by.data.id"
58295829
},
58305830
{
5831-
"name": "pat_uuid",
5831+
"name": "pat_id",
58325832
"source": "data.id"
58335833
}
58345834
],

lib/datadog_api_client/v2/api/key_management_api.rb

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -622,29 +622,29 @@ def get_current_user_application_key_with_http_info(app_key_id, opts = {})
622622
# Get a personal access token.
623623
#
624624
# @see #get_personal_access_token_with_http_info
625-
def get_personal_access_token(pat_uuid, opts = {})
626-
data, _status_code, _headers = get_personal_access_token_with_http_info(pat_uuid, opts)
625+
def get_personal_access_token(pat_id, opts = {})
626+
data, _status_code, _headers = get_personal_access_token_with_http_info(pat_id, opts)
627627
data
628628
end
629629

630630
# Get a personal access token.
631631
#
632632
# Get a specific personal access token by its UUID.
633633
#
634-
# @param pat_uuid [String] The UUID of the personal access token.
634+
# @param pat_id [String] The ID of the personal access token.
635635
# @param opts [Hash] the optional parameters
636636
# @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers
637-
def get_personal_access_token_with_http_info(pat_uuid, opts = {})
637+
def get_personal_access_token_with_http_info(pat_id, opts = {})
638638

639639
if @api_client.config.debugging
640640
@api_client.config.logger.debug 'Calling API: KeyManagementAPI.get_personal_access_token ...'
641641
end
642-
# verify the required parameter 'pat_uuid' is set
643-
if @api_client.config.client_side_validation && pat_uuid.nil?
644-
fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.get_personal_access_token"
642+
# verify the required parameter 'pat_id' is set
643+
if @api_client.config.client_side_validation && pat_id.nil?
644+
fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.get_personal_access_token"
645645
end
646646
# resource path
647-
local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/'))
647+
local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/'))
648648

649649
# query parameters
650650
query_params = opts[:query_params] || {}
@@ -1004,29 +1004,29 @@ def list_personal_access_tokens_with_http_info(opts = {})
10041004
# Revoke a personal access token.
10051005
#
10061006
# @see #revoke_personal_access_token_with_http_info
1007-
def revoke_personal_access_token(pat_uuid, opts = {})
1008-
revoke_personal_access_token_with_http_info(pat_uuid, opts)
1007+
def revoke_personal_access_token(pat_id, opts = {})
1008+
revoke_personal_access_token_with_http_info(pat_id, opts)
10091009
nil
10101010
end
10111011

10121012
# Revoke a personal access token.
10131013
#
10141014
# Revoke a specific personal access token.
10151015
#
1016-
# @param pat_uuid [String] The UUID of the personal access token.
1016+
# @param pat_id [String] The ID of the personal access token.
10171017
# @param opts [Hash] the optional parameters
10181018
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1019-
def revoke_personal_access_token_with_http_info(pat_uuid, opts = {})
1019+
def revoke_personal_access_token_with_http_info(pat_id, opts = {})
10201020

10211021
if @api_client.config.debugging
10221022
@api_client.config.logger.debug 'Calling API: KeyManagementAPI.revoke_personal_access_token ...'
10231023
end
1024-
# verify the required parameter 'pat_uuid' is set
1025-
if @api_client.config.client_side_validation && pat_uuid.nil?
1026-
fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.revoke_personal_access_token"
1024+
# verify the required parameter 'pat_id' is set
1025+
if @api_client.config.client_side_validation && pat_id.nil?
1026+
fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.revoke_personal_access_token"
10271027
end
10281028
# resource path
1029-
local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/'))
1029+
local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/'))
10301030

10311031
# query parameters
10321032
query_params = opts[:query_params] || {}
@@ -1286,34 +1286,34 @@ def update_current_user_application_key_with_http_info(app_key_id, body, opts =
12861286
# Update a personal access token.
12871287
#
12881288
# @see #update_personal_access_token_with_http_info
1289-
def update_personal_access_token(pat_uuid, body, opts = {})
1290-
data, _status_code, _headers = update_personal_access_token_with_http_info(pat_uuid, body, opts)
1289+
def update_personal_access_token(pat_id, body, opts = {})
1290+
data, _status_code, _headers = update_personal_access_token_with_http_info(pat_id, body, opts)
12911291
data
12921292
end
12931293

12941294
# Update a personal access token.
12951295
#
12961296
# Update a specific personal access token.
12971297
#
1298-
# @param pat_uuid [String] The UUID of the personal access token.
1298+
# @param pat_id [String] The ID of the personal access token.
12991299
# @param body [PersonalAccessTokenUpdateRequest]
13001300
# @param opts [Hash] the optional parameters
13011301
# @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers
1302-
def update_personal_access_token_with_http_info(pat_uuid, body, opts = {})
1302+
def update_personal_access_token_with_http_info(pat_id, body, opts = {})
13031303

13041304
if @api_client.config.debugging
13051305
@api_client.config.logger.debug 'Calling API: KeyManagementAPI.update_personal_access_token ...'
13061306
end
1307-
# verify the required parameter 'pat_uuid' is set
1308-
if @api_client.config.client_side_validation && pat_uuid.nil?
1309-
fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.update_personal_access_token"
1307+
# verify the required parameter 'pat_id' is set
1308+
if @api_client.config.client_side_validation && pat_id.nil?
1309+
fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.update_personal_access_token"
13101310
end
13111311
# verify the required parameter 'body' is set
13121312
if @api_client.config.client_side_validation && body.nil?
13131313
fail ArgumentError, "Missing the required parameter 'body' when calling KeyManagementAPI.update_personal_access_token"
13141314
end
13151315
# resource path
1316-
local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/'))
1316+
local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/'))
13171317

13181318
# query parameters
13191319
query_params = opts[:query_params] || {}

0 commit comments

Comments
 (0)