Skip to content
Merged
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 @@ -1140,9 +1140,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 @@ -29288,11 +29288,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 @@ -53523,11 +53518,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 @@ -78073,6 +78063,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 @@ -109765,7 +109759,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 @@ -121344,7 +121338,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
2 changes: 1 addition & 1 deletion examples/v2/key-management/GetPersonalAccessToken.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
with ApiClient(configuration) as api_client:
api_instance = KeyManagementApi(api_client)
response = api_instance.get_personal_access_token(
pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID,
pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID,
)

print(response)
2 changes: 1 addition & 1 deletion examples/v2/key-management/RevokePersonalAccessToken.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
with ApiClient(configuration) as api_client:
api_instance = KeyManagementApi(api_client)
api_instance.revoke_personal_access_token(
pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID,
pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID,
)
2 changes: 1 addition & 1 deletion examples/v2/key-management/UpdatePersonalAccessToken.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = KeyManagementApi(api_client)
response = api_instance.update_personal_access_token(pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, body=body)
response = api_instance.update_personal_access_token(pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, body=body)

print(response)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
api_instance = ServiceAccountsApi(api_client)
response = api_instance.get_service_account_access_token(
service_account_id=SERVICE_ACCOUNT_USER_DATA_ID,
pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID,
pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID,
)

print(response)
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
api_instance = ServiceAccountsApi(api_client)
api_instance.revoke_service_account_access_token(
service_account_id=SERVICE_ACCOUNT_USER_DATA_ID,
pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID,
pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID,
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
with ApiClient(configuration) as api_client:
api_instance = ServiceAccountsApi(api_client)
response = api_instance.update_service_account_access_token(
service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, body=body
service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, body=body
)

print(response)
42 changes: 21 additions & 21 deletions src/datadog_api_client/v2/api/key_management_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,16 @@ def __init__(self, api_client=None):
settings={
"response_type": (PersonalAccessTokenResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}",
"endpoint_path": "/api/v2/personal_access_tokens/{pat_id}",
"operation_id": "get_personal_access_token",
"http_method": "GET",
"version": "v2",
},
params_map={
"pat_uuid": {
"pat_id": {
"required": True,
"openapi_types": (str,),
"attribute": "pat_uuid",
"attribute": "pat_id",
"location": "path",
},
},
Expand Down Expand Up @@ -499,16 +499,16 @@ def __init__(self, api_client=None):
settings={
"response_type": None,
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}",
"endpoint_path": "/api/v2/personal_access_tokens/{pat_id}",
"operation_id": "revoke_personal_access_token",
"http_method": "DELETE",
"version": "v2",
},
params_map={
"pat_uuid": {
"pat_id": {
"required": True,
"openapi_types": (str,),
"attribute": "pat_uuid",
"attribute": "pat_id",
"location": "path",
},
},
Expand Down Expand Up @@ -600,16 +600,16 @@ def __init__(self, api_client=None):
settings={
"response_type": (PersonalAccessTokenResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}",
"endpoint_path": "/api/v2/personal_access_tokens/{pat_id}",
"operation_id": "update_personal_access_token",
"http_method": "PATCH",
"version": "v2",
},
params_map={
"pat_uuid": {
"pat_id": {
"required": True,
"openapi_types": (str,),
"attribute": "pat_uuid",
"attribute": "pat_id",
"location": "path",
},
"body": {
Expand Down Expand Up @@ -789,18 +789,18 @@ def get_current_user_application_key(

def get_personal_access_token(
self,
pat_uuid: str,
pat_id: str,
) -> PersonalAccessTokenResponse:
"""Get a personal access token.

Get a specific personal access token by its UUID.

:param pat_uuid: The UUID of the personal access token.
:type pat_uuid: str
:param pat_id: The ID of the personal access token.
:type pat_id: str
:rtype: PersonalAccessTokenResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["pat_uuid"] = pat_uuid
kwargs["pat_id"] = pat_id

return self._get_personal_access_token_endpoint.call_with_http_info(**kwargs)

Expand Down Expand Up @@ -1046,18 +1046,18 @@ def list_personal_access_tokens(

def revoke_personal_access_token(
self,
pat_uuid: str,
pat_id: str,
) -> None:
"""Revoke a personal access token.

Revoke a specific personal access token.

:param pat_uuid: The UUID of the personal access token.
:type pat_uuid: str
:param pat_id: The ID of the personal access token.
:type pat_id: str
:rtype: None
"""
kwargs: Dict[str, Any] = {}
kwargs["pat_uuid"] = pat_uuid
kwargs["pat_id"] = pat_id

return self._revoke_personal_access_token_endpoint.call_with_http_info(**kwargs)

Expand Down Expand Up @@ -1127,20 +1127,20 @@ def update_current_user_application_key(

def update_personal_access_token(
self,
pat_uuid: str,
pat_id: str,
body: PersonalAccessTokenUpdateRequest,
) -> PersonalAccessTokenResponse:
"""Update a personal access token.

Update a specific personal access token.

:param pat_uuid: The UUID of the personal access token.
:type pat_uuid: str
:param pat_id: The ID of the personal access token.
:type pat_id: str
:type body: PersonalAccessTokenUpdateRequest
:rtype: PersonalAccessTokenResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["pat_uuid"] = pat_uuid
kwargs["pat_id"] = pat_id

kwargs["body"] = body

Expand Down
42 changes: 21 additions & 21 deletions src/datadog_api_client/v2/api/service_accounts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, api_client=None):
settings={
"response_type": (PersonalAccessTokenResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}",
"endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}",
"operation_id": "get_service_account_access_token",
"http_method": "GET",
"version": "v2",
Expand All @@ -156,10 +156,10 @@ def __init__(self, api_client=None):
"attribute": "service_account_id",
"location": "path",
},
"pat_uuid": {
"pat_id": {
"required": True,
"openapi_types": (str,),
"attribute": "pat_uuid",
"attribute": "pat_id",
"location": "path",
},
},
Expand Down Expand Up @@ -298,7 +298,7 @@ def __init__(self, api_client=None):
settings={
"response_type": None,
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}",
"endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}",
"operation_id": "revoke_service_account_access_token",
"http_method": "DELETE",
"version": "v2",
Expand All @@ -310,10 +310,10 @@ def __init__(self, api_client=None):
"attribute": "service_account_id",
"location": "path",
},
"pat_uuid": {
"pat_id": {
"required": True,
"openapi_types": (str,),
"attribute": "pat_uuid",
"attribute": "pat_id",
"location": "path",
},
},
Expand All @@ -327,7 +327,7 @@ def __init__(self, api_client=None):
settings={
"response_type": (PersonalAccessTokenResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}",
"endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}",
"operation_id": "update_service_account_access_token",
"http_method": "PATCH",
"version": "v2",
Expand All @@ -339,10 +339,10 @@ def __init__(self, api_client=None):
"attribute": "service_account_id",
"location": "path",
},
"pat_uuid": {
"pat_id": {
"required": True,
"openapi_types": (str,),
"attribute": "pat_uuid",
"attribute": "pat_id",
"location": "path",
},
"body": {
Expand Down Expand Up @@ -470,22 +470,22 @@ def delete_service_account_application_key(
def get_service_account_access_token(
self,
service_account_id: str,
pat_uuid: str,
pat_id: str,
) -> PersonalAccessTokenResponse:
"""Get an access token for a service account.

Get a specific access token for a service account by its UUID.

:param service_account_id: The ID of the service account.
:type service_account_id: str
:param pat_uuid: The UUID of the personal access token.
:type pat_uuid: str
:param pat_id: The ID of the personal access token.
:type pat_id: str
:rtype: PersonalAccessTokenResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["service_account_id"] = service_account_id

kwargs["pat_uuid"] = pat_uuid
kwargs["pat_id"] = pat_id

return self._get_service_account_access_token_endpoint.call_with_http_info(**kwargs)

Expand Down Expand Up @@ -614,29 +614,29 @@ def list_service_account_application_keys(
def revoke_service_account_access_token(
self,
service_account_id: str,
pat_uuid: str,
pat_id: str,
) -> None:
"""Revoke an access token for a service account.

Revoke a specific access token for a service account.

:param service_account_id: The ID of the service account.
:type service_account_id: str
:param pat_uuid: The UUID of the personal access token.
:type pat_uuid: str
:param pat_id: The ID of the personal access token.
:type pat_id: str
:rtype: None
"""
kwargs: Dict[str, Any] = {}
kwargs["service_account_id"] = service_account_id

kwargs["pat_uuid"] = pat_uuid
kwargs["pat_id"] = pat_id

return self._revoke_service_account_access_token_endpoint.call_with_http_info(**kwargs)

def update_service_account_access_token(
self,
service_account_id: str,
pat_uuid: str,
pat_id: str,
body: PersonalAccessTokenUpdateRequest,
) -> PersonalAccessTokenResponse:
"""Update an access token for a service account.
Expand All @@ -645,15 +645,15 @@ def update_service_account_access_token(

:param service_account_id: The ID of the service account.
:type service_account_id: str
:param pat_uuid: The UUID of the personal access token.
:type pat_uuid: str
:param pat_id: The ID of the personal access token.
:type pat_id: str
:type body: PersonalAccessTokenUpdateRequest
:rtype: PersonalAccessTokenResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["service_account_id"] = service_account_id

kwargs["pat_uuid"] = pat_uuid
kwargs["pat_id"] = pat_id

kwargs["body"] = body

Expand Down
Loading
Loading