Skip to content

Commit 5cae65b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit defc5f5 of spec repo
1 parent 992fab4 commit 5cae65b

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
@@ -1834,6 +1834,65 @@ components:
18341834
required:
18351835
- role_name
18361836
type: object
1837+
AWSCloudAuthPersonaMappingAttributesResponse:
1838+
description: Attributes for AWS cloud authentication persona mapping response
1839+
properties:
1840+
account_identifier:
1841+
description: Datadog account identifier (email or handle) mapped to the
1842+
AWS principal
1843+
example: test@test.com
1844+
type: string
1845+
account_uuid:
1846+
description: Datadog account UUID
1847+
example: 12bbdc5c-5966-47e0-8733-285f9e44bcf4
1848+
type: string
1849+
arn_pattern:
1850+
description: AWS IAM ARN pattern to match for authentication
1851+
example: arn:aws:iam::123456789012:user/testuser
1852+
type: string
1853+
required:
1854+
- arn_pattern
1855+
- account_identifier
1856+
- account_uuid
1857+
type: object
1858+
AWSCloudAuthPersonaMappingDataResponse:
1859+
description: Data for AWS cloud authentication persona mapping response
1860+
properties:
1861+
attributes:
1862+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingAttributesResponse'
1863+
id:
1864+
description: Unique identifier for the persona mapping
1865+
example: c5c758c6-18c2-4484-ae3f-46b84128404a
1866+
type: string
1867+
type:
1868+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingType'
1869+
required:
1870+
- id
1871+
- type
1872+
- attributes
1873+
type: object
1874+
AWSCloudAuthPersonaMappingType:
1875+
description: Type identifier for AWS cloud authentication persona mapping
1876+
enum:
1877+
- aws_cloud_auth_config
1878+
example: aws_cloud_auth_config
1879+
type: string
1880+
x-enum-varnames:
1881+
- AWS_CLOUD_AUTH_CONFIG
1882+
AWSCloudAuthPersonaMappingsData:
1883+
description: List of AWS cloud authentication persona mappings
1884+
items:
1885+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingDataResponse'
1886+
type: array
1887+
AWSCloudAuthPersonaMappingsResponse:
1888+
description: Response containing a list of AWS cloud authentication persona
1889+
mappings
1890+
properties:
1891+
data:
1892+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingsData'
1893+
required:
1894+
- data
1895+
type: object
18371896
AWSCredentials:
18381897
description: The definition of `AWSCredentials` object.
18391898
oneOf:
@@ -74551,6 +74610,39 @@ paths:
7455174610
permissions:
7455274611
- ci_visibility_read
7455374612
- test_optimization_read
74613+
/api/v2/cloud_auth/aws/persona_mapping:
74614+
get:
74615+
description: List all AWS cloud authentication persona mappings. This endpoint
74616+
retrieves all configured persona mappings that associate AWS IAM principals
74617+
with Datadog users.
74618+
operationId: ListAWSCloudAuthPersonaMappings
74619+
responses:
74620+
'200':
74621+
content:
74622+
application/json:
74623+
schema:
74624+
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingsResponse'
74625+
description: OK
74626+
'400':
74627+
content:
74628+
application/json:
74629+
schema:
74630+
$ref: '#/components/schemas/JSONAPIErrorResponse'
74631+
description: Bad Request
74632+
'403':
74633+
content:
74634+
application/json:
74635+
schema:
74636+
$ref: '#/components/schemas/JSONAPIErrorResponse'
74637+
description: Forbidden
74638+
'429':
74639+
$ref: '#/components/responses/TooManyRequestsResponse'
74640+
summary: List AWS cloud authentication persona mappings
74641+
tags:
74642+
- Cloud Authentication
74643+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
74644+
74645+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7455474646
/api/v2/cloud_security_management/custom_frameworks:
7455574647
post:
7455674648
description: Create a custom framework.
@@ -104331,6 +104423,9 @@ tags:
104331104423
Management page](https://docs.datadoghq.com/service_management/case_management/)
104332104424
for more information.
104333104425
name: Case Management Type
104426+
- description: Configure AWS cloud authentication mappings for persona and intake
104427+
authentication through the Datadog API.
104428+
name: Cloud Authentication
104334104429
- description: The Cloud Cost Management API allows you to set up, edit, and delete
104335104430
Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query
104336104431
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
@@ -782,6 +782,7 @@ public class ApiClient {
782782
put("v2.linkJiraIssueToCase", false);
783783
put("v2.moveCaseToProject", false);
784784
put("v2.unlinkJiraIssue", false);
785+
put("v2.listAWSCloudAuthPersonaMappings", false);
785786
put("v2.activateContentPack", false);
786787
put("v2.cancelThreatHuntingJob", false);
787788
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)