Skip to content

Commit 891d4a5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ab0788b of spec repo
1 parent efebef5 commit 891d4a5

File tree

10 files changed

+965
-0
lines changed

10 files changed

+965
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,6 +1813,65 @@ components:
18131813
required:
18141814
- role_name
18151815
type: object
1816+
AWSCloudAuthPersonaMappingAttributesResponse:
1817+
description: Attributes for AWS cloud authentication persona mapping response
1818+
properties:
1819+
account_identifier:
1820+
description: Datadog account identifier (email or handle) mapped to the
1821+
AWS principal
1822+
example: test@test.com
1823+
type: string
1824+
account_uuid:
1825+
description: Datadog account UUID
1826+
example: 12bbdc5c-5966-47e0-8733-285f9e44bcf4
1827+
type: string
1828+
arn_pattern:
1829+
description: AWS IAM ARN pattern to match for authentication
1830+
example: arn:aws:iam::123456789012:user/testuser
1831+
type: string
1832+
required:
1833+
- arn_pattern
1834+
- account_identifier
1835+
- account_uuid
1836+
type: object
1837+
AWSCloudAuthPersonaMappingDataResponse:
1838+
description: Data for AWS cloud authentication persona mapping response
1839+
properties:
1840+
attributes:
1841+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingAttributesResponse'
1842+
id:
1843+
description: Unique identifier for the persona mapping
1844+
example: c5c758c6-18c2-4484-ae3f-46b84128404a
1845+
type: string
1846+
type:
1847+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingType'
1848+
required:
1849+
- id
1850+
- type
1851+
- attributes
1852+
type: object
1853+
AWSCloudAuthPersonaMappingType:
1854+
description: Type identifier for AWS cloud authentication persona mapping
1855+
enum:
1856+
- aws_cloud_auth_config
1857+
example: aws_cloud_auth_config
1858+
type: string
1859+
x-enum-varnames:
1860+
- AWS_CLOUD_AUTH_CONFIG
1861+
AWSCloudAuthPersonaMappingsData:
1862+
description: List of AWS cloud authentication persona mappings
1863+
items:
1864+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingDataResponse'
1865+
type: array
1866+
AWSCloudAuthPersonaMappingsResponse:
1867+
description: Response containing a list of AWS cloud authentication persona
1868+
mappings
1869+
properties:
1870+
data:
1871+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingsData'
1872+
required:
1873+
- data
1874+
type: object
18161875
AWSCredentials:
18171876
description: The definition of `AWSCredentials` object.
18181877
oneOf:
@@ -73128,6 +73187,39 @@ paths:
7312873187
permissions:
7312973188
- ci_visibility_read
7313073189
- test_optimization_read
73190+
/api/v2/cloud_auth/aws/persona_mapping:
73191+
get:
73192+
description: List all AWS cloud authentication persona mappings. This endpoint
73193+
retrieves all configured persona mappings that associate AWS IAM principals
73194+
with Datadog users.
73195+
operationId: ListAWSCloudAuthPersonaMappings
73196+
responses:
73197+
'200':
73198+
content:
73199+
application/json:
73200+
schema:
73201+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingsResponse'
73202+
description: OK
73203+
'400':
73204+
content:
73205+
application/json:
73206+
schema:
73207+
$ref: '#/components/schemas/APIErrorResponse'
73208+
description: Bad Request
73209+
'403':
73210+
content:
73211+
application/json:
73212+
schema:
73213+
$ref: '#/components/schemas/APIErrorResponse'
73214+
description: Forbidden
73215+
'429':
73216+
$ref: '#/components/responses/TooManyRequestsResponse'
73217+
summary: List AWS cloud authentication persona mappings
73218+
tags:
73219+
- Cloud Authentication
73220+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
73221+
73222+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7313173223
/api/v2/cloud_security_management/custom_frameworks:
7313273224
post:
7313373225
description: Create a custom framework.
@@ -102402,6 +102494,9 @@ tags:
102402102494
Management page](https://docs.datadoghq.com/service_management/case_management/)
102403102495
for more information.
102404102496
name: Case Management Type
102497+
- description: Configure AWS cloud authentication mappings for persona and intake
102498+
authentication through the Datadog API.
102499+
name: Cloud Authentication
102405102500
- description: The Cloud Cost Management API allows you to set up, edit, and delete
102406102501
Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query
102407102502
your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// List AWS cloud authentication persona mappings returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CloudAuthenticationApi;
6+
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listAWSCloudAuthPersonaMappings", true);
12+
CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);
13+
14+
try {
15+
AWSCloudAuthPersonaMappingsResponse result = apiInstance.listAWSCloudAuthPersonaMappings();
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println(
19+
"Exception when calling CloudAuthenticationApi#listAWSCloudAuthPersonaMappings");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ public class ApiClient {
775775
put("v2.getOpenAPI", false);
776776
put("v2.listAPIs", false);
777777
put("v2.updateOpenAPI", false);
778+
put("v2.listAWSCloudAuthPersonaMappings", false);
778779
put("v2.activateContentPack", false);
779780
put("v2.cancelThreatHuntingJob", false);
780781
put("v2.convertJobResultToSignal", false);
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
package com.datadog.api.client.v2.api;
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.ApiResponse;
6+
import com.datadog.api.client.Pair;
7+
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingsResponse;
8+
import jakarta.ws.rs.client.Invocation;
9+
import jakarta.ws.rs.core.GenericType;
10+
import java.util.ArrayList;
11+
import java.util.HashMap;
12+
import java.util.Map;
13+
import java.util.concurrent.CompletableFuture;
14+
15+
@jakarta.annotation.Generated(
16+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
17+
public class CloudAuthenticationApi {
18+
private ApiClient apiClient;
19+
20+
public CloudAuthenticationApi() {
21+
this(ApiClient.getDefaultApiClient());
22+
}
23+
24+
public CloudAuthenticationApi(ApiClient apiClient) {
25+
this.apiClient = apiClient;
26+
}
27+
28+
/**
29+
* Get the API client.
30+
*
31+
* @return API client
32+
*/
33+
public ApiClient getApiClient() {
34+
return apiClient;
35+
}
36+
37+
/**
38+
* Set the API client.
39+
*
40+
* @param apiClient an instance of API client
41+
*/
42+
public void setApiClient(ApiClient apiClient) {
43+
this.apiClient = apiClient;
44+
}
45+
46+
/**
47+
* List AWS cloud authentication persona mappings.
48+
*
49+
* <p>See {@link #listAWSCloudAuthPersonaMappingsWithHttpInfo}.
50+
*
51+
* @return AWSCloudAuthPersonaMappingsResponse
52+
* @throws ApiException if fails to make API call
53+
*/
54+
public AWSCloudAuthPersonaMappingsResponse listAWSCloudAuthPersonaMappings() throws ApiException {
55+
return listAWSCloudAuthPersonaMappingsWithHttpInfo().getData();
56+
}
57+
58+
/**
59+
* List AWS cloud authentication persona mappings.
60+
*
61+
* <p>See {@link #listAWSCloudAuthPersonaMappingsWithHttpInfoAsync}.
62+
*
63+
* @return CompletableFuture&lt;AWSCloudAuthPersonaMappingsResponse&gt;
64+
*/
65+
public CompletableFuture<AWSCloudAuthPersonaMappingsResponse>
66+
listAWSCloudAuthPersonaMappingsAsync() {
67+
return listAWSCloudAuthPersonaMappingsWithHttpInfoAsync()
68+
.thenApply(
69+
response -> {
70+
return response.getData();
71+
});
72+
}
73+
74+
/**
75+
* List all AWS cloud authentication persona mappings. This endpoint retrieves all configured
76+
* persona mappings that associate AWS IAM principals with Datadog users.
77+
*
78+
* @return ApiResponse&lt;AWSCloudAuthPersonaMappingsResponse&gt;
79+
* @throws ApiException if fails to make API call
80+
* @http.response.details
81+
* <table border="1">
82+
* <caption>Response details</caption>
83+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
84+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
85+
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
86+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
87+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
88+
* </table>
89+
*/
90+
public ApiResponse<AWSCloudAuthPersonaMappingsResponse>
91+
listAWSCloudAuthPersonaMappingsWithHttpInfo() throws ApiException {
92+
// Check if unstable operation is enabled
93+
String operationId = "listAWSCloudAuthPersonaMappings";
94+
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
95+
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
96+
} else {
97+
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
98+
}
99+
Object localVarPostBody = null;
100+
// create path and map variables
101+
String localVarPath = "/api/v2/cloud_auth/aws/persona_mapping";
102+
103+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
104+
105+
Invocation.Builder builder =
106+
apiClient.createBuilder(
107+
"v2.CloudAuthenticationApi.listAWSCloudAuthPersonaMappings",
108+
localVarPath,
109+
new ArrayList<Pair>(),
110+
localVarHeaderParams,
111+
new HashMap<String, String>(),
112+
new String[] {"application/json"},
113+
new String[] {"apiKeyAuth", "appKeyAuth"});
114+
return apiClient.invokeAPI(
115+
"GET",
116+
builder,
117+
localVarHeaderParams,
118+
new String[] {},
119+
localVarPostBody,
120+
new HashMap<String, Object>(),
121+
false,
122+
new GenericType<AWSCloudAuthPersonaMappingsResponse>() {});
123+
}
124+
125+
/**
126+
* List AWS cloud authentication persona mappings.
127+
*
128+
* <p>See {@link #listAWSCloudAuthPersonaMappingsWithHttpInfo}.
129+
*
130+
* @return CompletableFuture&lt;ApiResponse&lt;AWSCloudAuthPersonaMappingsResponse&gt;&gt;
131+
*/
132+
public CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingsResponse>>
133+
listAWSCloudAuthPersonaMappingsWithHttpInfoAsync() {
134+
// Check if unstable operation is enabled
135+
String operationId = "listAWSCloudAuthPersonaMappings";
136+
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
137+
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
138+
} else {
139+
CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingsResponse>> result =
140+
new CompletableFuture<>();
141+
result.completeExceptionally(
142+
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
143+
return result;
144+
}
145+
Object localVarPostBody = null;
146+
// create path and map variables
147+
String localVarPath = "/api/v2/cloud_auth/aws/persona_mapping";
148+
149+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
150+
151+
Invocation.Builder builder;
152+
try {
153+
builder =
154+
apiClient.createBuilder(
155+
"v2.CloudAuthenticationApi.listAWSCloudAuthPersonaMappings",
156+
localVarPath,
157+
new ArrayList<Pair>(),
158+
localVarHeaderParams,
159+
new HashMap<String, String>(),
160+
new String[] {"application/json"},
161+
new String[] {"apiKeyAuth", "appKeyAuth"});
162+
} catch (ApiException ex) {
163+
CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingsResponse>> result =
164+
new CompletableFuture<>();
165+
result.completeExceptionally(ex);
166+
return result;
167+
}
168+
return apiClient.invokeAPIAsync(
169+
"GET",
170+
builder,
171+
localVarHeaderParams,
172+
new String[] {},
173+
localVarPostBody,
174+
new HashMap<String, Object>(),
175+
false,
176+
new GenericType<AWSCloudAuthPersonaMappingsResponse>() {});
177+
}
178+
}

0 commit comments

Comments
 (0)