Skip to content

Commit 3bfe2e1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2cef817 of spec repo
1 parent cf7c9a6 commit 3bfe2e1

14 files changed

+423
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,65 @@ components:
17691769
required:
17701770
- role_name
17711771
type: object
1772+
AWSCloudAuthPersonaMappingAttributesResponse:
1773+
description: Attributes for AWS cloud authentication persona mapping response
1774+
properties:
1775+
account_identifier:
1776+
description: Datadog account identifier (email or handle) mapped to the
1777+
AWS principal
1778+
example: test@test.com
1779+
type: string
1780+
account_uuid:
1781+
description: Datadog account UUID
1782+
example: 12bbdc5c-5966-47e0-8733-285f9e44bcf4
1783+
type: string
1784+
arn_pattern:
1785+
description: AWS IAM ARN pattern to match for authentication
1786+
example: arn:aws:iam::123456789012:user/testuser
1787+
type: string
1788+
required:
1789+
- arn_pattern
1790+
- account_identifier
1791+
- account_uuid
1792+
type: object
1793+
AWSCloudAuthPersonaMappingDataResponse:
1794+
description: Data for AWS cloud authentication persona mapping response
1795+
properties:
1796+
attributes:
1797+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingAttributesResponse'
1798+
id:
1799+
description: Unique identifier for the persona mapping
1800+
example: c5c758c6-18c2-4484-ae3f-46b84128404a
1801+
type: string
1802+
type:
1803+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingType'
1804+
required:
1805+
- id
1806+
- type
1807+
- attributes
1808+
type: object
1809+
AWSCloudAuthPersonaMappingType:
1810+
description: Type identifier for AWS cloud authentication persona mapping
1811+
enum:
1812+
- aws_cloud_auth_config
1813+
example: aws_cloud_auth_config
1814+
type: string
1815+
x-enum-varnames:
1816+
- AWS_CLOUD_AUTH_CONFIG
1817+
AWSCloudAuthPersonaMappingsData:
1818+
description: List of AWS cloud authentication persona mappings
1819+
items:
1820+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingDataResponse'
1821+
type: array
1822+
AWSCloudAuthPersonaMappingsResponse:
1823+
description: Response containing a list of AWS cloud authentication persona
1824+
mappings
1825+
properties:
1826+
data:
1827+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingsData'
1828+
required:
1829+
- data
1830+
type: object
17721831
AWSCredentials:
17731832
description: The definition of `AWSCredentials` object.
17741833
oneOf:
@@ -70916,6 +70975,39 @@ paths:
7091670975
permissions:
7091770976
- ci_visibility_read
7091870977
- test_optimization_read
70978+
/api/v2/cloud_auth/aws/persona_mapping:
70979+
get:
70980+
description: List all AWS cloud authentication persona mappings. This endpoint
70981+
retrieves all configured persona mappings that associate AWS IAM principals
70982+
with Datadog users.
70983+
operationId: ListAWSCloudAuthPersonaMappings
70984+
responses:
70985+
'200':
70986+
content:
70987+
application/json:
70988+
schema:
70989+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingsResponse'
70990+
description: OK
70991+
'400':
70992+
content:
70993+
application/json:
70994+
schema:
70995+
$ref: '#/components/schemas/APIErrorResponse'
70996+
description: Bad Request
70997+
'403':
70998+
content:
70999+
application/json:
71000+
schema:
71001+
$ref: '#/components/schemas/APIErrorResponse'
71002+
description: Forbidden
71003+
'429':
71004+
$ref: '#/components/responses/TooManyRequestsResponse'
71005+
summary: List AWS cloud authentication persona mappings
71006+
tags:
71007+
- Cloud Authentication
71008+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
71009+
71010+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7091971011
/api/v2/cloud_security_management/custom_frameworks:
7092071012
post:
7092171013
description: Create a custom framework.
@@ -99156,6 +99248,9 @@ tags:
9915699248
Management page](https://docs.datadoghq.com/service_management/case_management/)
9915799249
for more information.
9915899250
name: Case Management Type
99251+
- description: Configure AWS cloud authentication mappings for persona and intake
99252+
authentication through the Datadog API.
99253+
name: Cloud Authentication
9915999254
- description: The Cloud Cost Management API allows you to set up, edit, and delete
9916099255
Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query
9916199256
your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products)

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ datadog\_api\_client.v2.api.ci\_visibility\_tests\_api module
123123
:members:
124124
:show-inheritance:
125125

126+
datadog\_api\_client.v2.api.cloud\_authentication\_api module
127+
-------------------------------------------------------------
128+
129+
.. automodule:: datadog_api_client.v2.api.cloud_authentication_api
130+
:members:
131+
:show-inheritance:
132+
126133
datadog\_api\_client.v2.api.cloud\_cost\_management\_api module
127134
---------------------------------------------------------------
128135

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,34 @@ datadog\_api\_client.v2.model.aws\_auth\_config\_role module
17051705
:members:
17061706
:show-inheritance:
17071707

1708+
datadog\_api\_client.v2.model.aws\_cloud\_auth\_persona\_mapping\_attributes\_response module
1709+
---------------------------------------------------------------------------------------------
1710+
1711+
.. automodule:: datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_attributes_response
1712+
:members:
1713+
:show-inheritance:
1714+
1715+
datadog\_api\_client.v2.model.aws\_cloud\_auth\_persona\_mapping\_data\_response module
1716+
---------------------------------------------------------------------------------------
1717+
1718+
.. automodule:: datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_data_response
1719+
:members:
1720+
:show-inheritance:
1721+
1722+
datadog\_api\_client.v2.model.aws\_cloud\_auth\_persona\_mapping\_type module
1723+
-----------------------------------------------------------------------------
1724+
1725+
.. automodule:: datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_type
1726+
:members:
1727+
:show-inheritance:
1728+
1729+
datadog\_api\_client.v2.model.aws\_cloud\_auth\_persona\_mappings\_response module
1730+
----------------------------------------------------------------------------------
1731+
1732+
.. automodule:: datadog_api_client.v2.model.aws_cloud_auth_persona_mappings_response
1733+
:members:
1734+
:show-inheritance:
1735+
17081736
datadog\_api\_client.v2.model.aws\_credentials module
17091737
-----------------------------------------------------
17101738

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
List AWS cloud authentication persona mappings returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_aws_cloud_auth_persona_mappings"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CloudAuthenticationApi(api_client)
12+
response = api_instance.list_aws_cloud_auth_persona_mappings()
13+
14+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ def __init__(
266266
"v2.get_open_api": False,
267267
"v2.list_apis": False,
268268
"v2.update_open_api": False,
269+
"v2.list_aws_cloud_auth_persona_mappings": False,
269270
"v2.cancel_threat_hunting_job": False,
270271
"v2.convert_job_result_to_signal": False,
271272
"v2.delete_threat_hunting_job": False,
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Any, Dict
7+
8+
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
9+
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.v2.model.aws_cloud_auth_persona_mappings_response import AWSCloudAuthPersonaMappingsResponse
11+
12+
13+
class CloudAuthenticationApi:
14+
"""
15+
Configure AWS cloud authentication mappings for persona and intake authentication through the Datadog API.
16+
"""
17+
18+
def __init__(self, api_client=None):
19+
if api_client is None:
20+
api_client = ApiClient(Configuration())
21+
self.api_client = api_client
22+
23+
self._list_aws_cloud_auth_persona_mappings_endpoint = _Endpoint(
24+
settings={
25+
"response_type": (AWSCloudAuthPersonaMappingsResponse,),
26+
"auth": ["apiKeyAuth", "appKeyAuth"],
27+
"endpoint_path": "/api/v2/cloud_auth/aws/persona_mapping",
28+
"operation_id": "list_aws_cloud_auth_persona_mappings",
29+
"http_method": "GET",
30+
"version": "v2",
31+
},
32+
params_map={},
33+
headers_map={
34+
"accept": ["application/json"],
35+
},
36+
api_client=api_client,
37+
)
38+
39+
def list_aws_cloud_auth_persona_mappings(
40+
self,
41+
) -> AWSCloudAuthPersonaMappingsResponse:
42+
"""List AWS cloud authentication persona mappings.
43+
44+
List all AWS cloud authentication persona mappings. This endpoint retrieves all configured persona mappings that associate AWS IAM principals with Datadog users.
45+
46+
:rtype: AWSCloudAuthPersonaMappingsResponse
47+
"""
48+
kwargs: Dict[str, Any] = {}
49+
return self._list_aws_cloud_auth_persona_mappings_endpoint.call_with_http_info(**kwargs)

src/datadog_api_client/v2/apis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
1919
from datadog_api_client.v2.api.case_management_attribute_api import CaseManagementAttributeApi
2020
from datadog_api_client.v2.api.case_management_type_api import CaseManagementTypeApi
21+
from datadog_api_client.v2.api.cloud_authentication_api import CloudAuthenticationApi
2122
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
2223
from datadog_api_client.v2.api.cloud_network_monitoring_api import CloudNetworkMonitoringApi
2324
from datadog_api_client.v2.api.cloudflare_integration_api import CloudflareIntegrationApi
@@ -112,6 +113,7 @@
112113
"CaseManagementApi",
113114
"CaseManagementAttributeApi",
114115
"CaseManagementTypeApi",
116+
"CloudAuthenticationApi",
115117
"CloudCostManagementApi",
116118
"CloudNetworkMonitoringApi",
117119
"CloudflareIntegrationApi",
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
cached_property,
10+
)
11+
12+
13+
class AWSCloudAuthPersonaMappingAttributesResponse(ModelNormal):
14+
@cached_property
15+
def openapi_types(_):
16+
return {
17+
"account_identifier": (str,),
18+
"account_uuid": (str,),
19+
"arn_pattern": (str,),
20+
}
21+
22+
attribute_map = {
23+
"account_identifier": "account_identifier",
24+
"account_uuid": "account_uuid",
25+
"arn_pattern": "arn_pattern",
26+
}
27+
28+
def __init__(self_, account_identifier: str, account_uuid: str, arn_pattern: str, **kwargs):
29+
"""
30+
Attributes for AWS cloud authentication persona mapping response
31+
32+
:param account_identifier: Datadog account identifier (email or handle) mapped to the AWS principal
33+
:type account_identifier: str
34+
35+
:param account_uuid: Datadog account UUID
36+
:type account_uuid: str
37+
38+
:param arn_pattern: AWS IAM ARN pattern to match for authentication
39+
:type arn_pattern: str
40+
"""
41+
super().__init__(kwargs)
42+
43+
self_.account_identifier = account_identifier
44+
self_.account_uuid = account_uuid
45+
self_.arn_pattern = arn_pattern
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_attributes_response import (
16+
AWSCloudAuthPersonaMappingAttributesResponse,
17+
)
18+
from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_type import AWSCloudAuthPersonaMappingType
19+
20+
21+
class AWSCloudAuthPersonaMappingDataResponse(ModelNormal):
22+
@cached_property
23+
def openapi_types(_):
24+
from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_attributes_response import (
25+
AWSCloudAuthPersonaMappingAttributesResponse,
26+
)
27+
from datadog_api_client.v2.model.aws_cloud_auth_persona_mapping_type import AWSCloudAuthPersonaMappingType
28+
29+
return {
30+
"attributes": (AWSCloudAuthPersonaMappingAttributesResponse,),
31+
"id": (str,),
32+
"type": (AWSCloudAuthPersonaMappingType,),
33+
}
34+
35+
attribute_map = {
36+
"attributes": "attributes",
37+
"id": "id",
38+
"type": "type",
39+
}
40+
41+
def __init__(
42+
self_,
43+
attributes: AWSCloudAuthPersonaMappingAttributesResponse,
44+
id: str,
45+
type: AWSCloudAuthPersonaMappingType,
46+
**kwargs,
47+
):
48+
"""
49+
Data for AWS cloud authentication persona mapping response
50+
51+
:param attributes: Attributes for AWS cloud authentication persona mapping response
52+
:type attributes: AWSCloudAuthPersonaMappingAttributesResponse
53+
54+
:param id: Unique identifier for the persona mapping
55+
:type id: str
56+
57+
:param type: Type identifier for AWS cloud authentication persona mapping
58+
:type type: AWSCloudAuthPersonaMappingType
59+
"""
60+
super().__init__(kwargs)
61+
62+
self_.attributes = attributes
63+
self_.id = id
64+
self_.type = type

0 commit comments

Comments
 (0)