diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 170293cea73..4857ca25ab3 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -929,6 +929,14 @@ components:
example: 10
format: int64
type: integer
+ PersonaMappingID:
+ description: The ID of the persona mapping
+ example: c5c758c6-18c2-4484-ae3f-46b84128404a
+ in: path
+ name: persona_mapping_id
+ required: true
+ schema:
+ type: string
ProductName:
description: Name of the product to be deleted, either `logs` or `rum`.
in: path
@@ -1910,6 +1918,41 @@ components:
- account_identifier
- account_uuid
type: object
+ AWSCloudAuthPersonaMappingCreateAttributes:
+ description: Attributes for creating an AWS cloud authentication persona mapping
+ properties:
+ account_identifier:
+ description: Datadog account identifier (email or handle) mapped to the
+ AWS principal
+ example: test@test.com
+ type: string
+ arn_pattern:
+ description: AWS IAM ARN pattern to match for authentication
+ example: arn:aws:iam::123456789012:user/testuser
+ type: string
+ required:
+ - arn_pattern
+ - account_identifier
+ type: object
+ AWSCloudAuthPersonaMappingCreateData:
+ description: Data for creating an AWS cloud authentication persona mapping
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingCreateAttributes'
+ type:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingType'
+ required:
+ - type
+ - attributes
+ type: object
+ AWSCloudAuthPersonaMappingCreateRequest:
+ description: Request used to create an AWS cloud authentication persona mapping
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingCreateData'
+ required:
+ - data
+ type: object
AWSCloudAuthPersonaMappingDataResponse:
description: Data for AWS cloud authentication persona mapping response
properties:
@@ -1926,6 +1969,14 @@ components:
- type
- attributes
type: object
+ AWSCloudAuthPersonaMappingResponse:
+ description: Response containing a single AWS cloud authentication persona mapping
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingDataResponse'
+ required:
+ - data
+ type: object
AWSCloudAuthPersonaMappingType:
description: Type identifier for AWS cloud authentication persona mapping
enum:
@@ -77100,6 +77151,114 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ post:
+ description: Create an AWS cloud authentication persona mapping. This endpoint
+ associates an AWS IAM principal with a Datadog user.
+ operationId: CreateAWSCloudAuthPersonaMapping
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingCreateRequest'
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingResponse'
+ description: Created
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Forbidden
+ '409':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Conflict
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Create an AWS cloud authentication persona mapping
+ tags:
+ - Cloud Authentication
+ x-codegen-request-body-name: body
+ x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/cloud_auth/aws/persona_mapping/{persona_mapping_id}:
+ delete:
+ description: Delete an AWS cloud authentication persona mapping by ID. This
+ removes the association between an AWS IAM principal and a Datadog user.
+ operationId: DeleteAWSCloudAuthPersonaMapping
+ parameters:
+ - $ref: '#/components/parameters/PersonaMappingID'
+ responses:
+ '204':
+ description: No Content
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete an AWS cloud authentication persona mapping
+ tags:
+ - Cloud Authentication
+ x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ get:
+ description: Get a specific AWS cloud authentication persona mapping by ID.
+ This endpoint retrieves a single configured persona mapping that associates
+ an AWS IAM principal with a Datadog user.
+ operationId: GetAWSCloudAuthPersonaMapping
+ parameters:
+ - $ref: '#/components/parameters/PersonaMappingID'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AWSCloudAuthPersonaMappingResponse'
+ description: OK
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get an AWS cloud authentication persona mapping
+ tags:
+ - Cloud Authentication
+ x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/cloud_security_management/custom_frameworks:
post:
description: Create a custom framework.
diff --git a/examples/v2/cloud-authentication/CreateAWSCloudAuthPersonaMapping.java b/examples/v2/cloud-authentication/CreateAWSCloudAuthPersonaMapping.java
new file mode 100644
index 00000000000..a3272dc08fa
--- /dev/null
+++ b/examples/v2/cloud-authentication/CreateAWSCloudAuthPersonaMapping.java
@@ -0,0 +1,41 @@
+// Create an AWS cloud authentication persona mapping returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CloudAuthenticationApi;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateAttributes;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateData;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateRequest;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingResponse;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createAWSCloudAuthPersonaMapping", true);
+ CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);
+
+ AWSCloudAuthPersonaMappingCreateRequest body =
+ new AWSCloudAuthPersonaMappingCreateRequest()
+ .data(
+ new AWSCloudAuthPersonaMappingCreateData()
+ .attributes(
+ new AWSCloudAuthPersonaMappingCreateAttributes()
+ .accountIdentifier("test@test.com")
+ .arnPattern("arn:aws:iam::123456789012:user/testuser"))
+ .type(AWSCloudAuthPersonaMappingType.AWS_CLOUD_AUTH_CONFIG));
+
+ try {
+ AWSCloudAuthPersonaMappingResponse result =
+ apiInstance.createAWSCloudAuthPersonaMapping(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling CloudAuthenticationApi#createAWSCloudAuthPersonaMapping");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/cloud-authentication/DeleteAWSCloudAuthPersonaMapping.java b/examples/v2/cloud-authentication/DeleteAWSCloudAuthPersonaMapping.java
new file mode 100644
index 00000000000..079220ceb07
--- /dev/null
+++ b/examples/v2/cloud-authentication/DeleteAWSCloudAuthPersonaMapping.java
@@ -0,0 +1,24 @@
+// Delete an AWS cloud authentication persona mapping returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CloudAuthenticationApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.deleteAWSCloudAuthPersonaMapping", true);
+ CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);
+
+ try {
+ apiInstance.deleteAWSCloudAuthPersonaMapping("c5c758c6-18c2-4484-ae3f-46b84128404a");
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling CloudAuthenticationApi#deleteAWSCloudAuthPersonaMapping");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/cloud-authentication/GetAWSCloudAuthPersonaMapping.java b/examples/v2/cloud-authentication/GetAWSCloudAuthPersonaMapping.java
new file mode 100644
index 00000000000..ca136e3e52a
--- /dev/null
+++ b/examples/v2/cloud-authentication/GetAWSCloudAuthPersonaMapping.java
@@ -0,0 +1,27 @@
+// Get an AWS cloud authentication persona mapping returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.CloudAuthenticationApi;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getAWSCloudAuthPersonaMapping", true);
+ CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);
+
+ try {
+ AWSCloudAuthPersonaMappingResponse result =
+ apiInstance.getAWSCloudAuthPersonaMapping("c5c758c6-18c2-4484-ae3f-46b84128404a");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println(
+ "Exception when calling CloudAuthenticationApi#getAWSCloudAuthPersonaMapping");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java
index 057f541855f..e5a488f9638 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -788,6 +788,9 @@ public class ApiClient {
put("v2.getChangeRequest", false);
put("v2.updateChangeRequest", false);
put("v2.updateChangeRequestDecision", false);
+ put("v2.createAWSCloudAuthPersonaMapping", false);
+ put("v2.deleteAWSCloudAuthPersonaMapping", false);
+ put("v2.getAWSCloudAuthPersonaMapping", false);
put("v2.listAWSCloudAuthPersonaMappings", false);
put("v2.activateContentPack", false);
put("v2.cancelThreatHuntingJob", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java
index 711493e41e5..9cbd779577a 100644
--- a/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java
+++ b/src/main/java/com/datadog/api/client/v2/api/CloudAuthenticationApi.java
@@ -4,6 +4,8 @@
import com.datadog.api.client.ApiException;
import com.datadog.api.client.ApiResponse;
import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateRequest;
+import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingResponse;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingsResponse;
import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.core.GenericType;
@@ -43,6 +45,492 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /**
+ * Create an AWS cloud authentication persona mapping.
+ *
+ *
See {@link #createAWSCloudAuthPersonaMappingWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return AWSCloudAuthPersonaMappingResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSCloudAuthPersonaMappingResponse createAWSCloudAuthPersonaMapping(
+ AWSCloudAuthPersonaMappingCreateRequest body) throws ApiException {
+ return createAWSCloudAuthPersonaMappingWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create an AWS cloud authentication persona mapping.
+ *
+ *
See {@link #createAWSCloudAuthPersonaMappingWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<AWSCloudAuthPersonaMappingResponse>
+ */
+ public CompletableFuture
+ createAWSCloudAuthPersonaMappingAsync(AWSCloudAuthPersonaMappingCreateRequest body) {
+ return createAWSCloudAuthPersonaMappingWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create an AWS cloud authentication persona mapping. This endpoint associates an AWS IAM
+ * principal with a Datadog user.
+ *
+ * @param body (required)
+ * @return ApiResponse<AWSCloudAuthPersonaMappingResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | Created | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Forbidden | - |
+ * | 409 | Conflict | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse
+ createAWSCloudAuthPersonaMappingWithHttpInfo(AWSCloudAuthPersonaMappingCreateRequest body)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createAWSCloudAuthPersonaMapping";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling createAWSCloudAuthPersonaMapping");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/cloud_auth/aws/persona_mapping";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CloudAuthenticationApi.createAWSCloudAuthPersonaMapping",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create an AWS cloud authentication persona mapping.
+ *
+ * See {@link #createAWSCloudAuthPersonaMappingWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingResponse>>
+ */
+ public CompletableFuture>
+ createAWSCloudAuthPersonaMappingWithHttpInfoAsync(
+ AWSCloudAuthPersonaMappingCreateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "createAWSCloudAuthPersonaMapping";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'body' when calling"
+ + " createAWSCloudAuthPersonaMapping"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/cloud_auth/aws/persona_mapping";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CloudAuthenticationApi.createAWSCloudAuthPersonaMapping",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete an AWS cloud authentication persona mapping.
+ *
+ * See {@link #deleteAWSCloudAuthPersonaMappingWithHttpInfo}.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteAWSCloudAuthPersonaMapping(String personaMappingId) throws ApiException {
+ deleteAWSCloudAuthPersonaMappingWithHttpInfo(personaMappingId);
+ }
+
+ /**
+ * Delete an AWS cloud authentication persona mapping.
+ *
+ *
See {@link #deleteAWSCloudAuthPersonaMappingWithHttpInfoAsync}.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteAWSCloudAuthPersonaMappingAsync(String personaMappingId) {
+ return deleteAWSCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete an AWS cloud authentication persona mapping by ID. This removes the association between
+ * an AWS IAM principal and a Datadog user.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteAWSCloudAuthPersonaMappingWithHttpInfo(String personaMappingId)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteAWSCloudAuthPersonaMapping";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'personaMappingId' is set
+ if (personaMappingId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'personaMappingId' when calling"
+ + " deleteAWSCloudAuthPersonaMapping");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/cloud_auth/aws/persona_mapping/{persona_mapping_id}"
+ .replaceAll(
+ "\\{" + "persona_mapping_id" + "\\}",
+ apiClient.escapeString(personaMappingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CloudAuthenticationApi.deleteAWSCloudAuthPersonaMapping",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete an AWS cloud authentication persona mapping.
+ *
+ * See {@link #deleteAWSCloudAuthPersonaMappingWithHttpInfo}.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteAWSCloudAuthPersonaMappingWithHttpInfoAsync(
+ String personaMappingId) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteAWSCloudAuthPersonaMapping";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'personaMappingId' is set
+ if (personaMappingId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'personaMappingId' when calling"
+ + " deleteAWSCloudAuthPersonaMapping"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/cloud_auth/aws/persona_mapping/{persona_mapping_id}"
+ .replaceAll(
+ "\\{" + "persona_mapping_id" + "\\}",
+ apiClient.escapeString(personaMappingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CloudAuthenticationApi.deleteAWSCloudAuthPersonaMapping",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Get an AWS cloud authentication persona mapping.
+ *
+ * See {@link #getAWSCloudAuthPersonaMappingWithHttpInfo}.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return AWSCloudAuthPersonaMappingResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSCloudAuthPersonaMappingResponse getAWSCloudAuthPersonaMapping(String personaMappingId)
+ throws ApiException {
+ return getAWSCloudAuthPersonaMappingWithHttpInfo(personaMappingId).getData();
+ }
+
+ /**
+ * Get an AWS cloud authentication persona mapping.
+ *
+ *
See {@link #getAWSCloudAuthPersonaMappingWithHttpInfoAsync}.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return CompletableFuture<AWSCloudAuthPersonaMappingResponse>
+ */
+ public CompletableFuture getAWSCloudAuthPersonaMappingAsync(
+ String personaMappingId) {
+ return getAWSCloudAuthPersonaMappingWithHttpInfoAsync(personaMappingId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a specific AWS cloud authentication persona mapping by ID. This endpoint retrieves a single
+ * configured persona mapping that associates an AWS IAM principal with a Datadog user.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return ApiResponse<AWSCloudAuthPersonaMappingResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 403 | Forbidden | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getAWSCloudAuthPersonaMappingWithHttpInfo(
+ String personaMappingId) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getAWSCloudAuthPersonaMapping";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'personaMappingId' is set
+ if (personaMappingId == null) {
+ throw new ApiException(
+ 400,
+ "Missing the required parameter 'personaMappingId' when calling"
+ + " getAWSCloudAuthPersonaMapping");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/cloud_auth/aws/persona_mapping/{persona_mapping_id}"
+ .replaceAll(
+ "\\{" + "persona_mapping_id" + "\\}",
+ apiClient.escapeString(personaMappingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.CloudAuthenticationApi.getAWSCloudAuthPersonaMapping",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get an AWS cloud authentication persona mapping.
+ *
+ * See {@link #getAWSCloudAuthPersonaMappingWithHttpInfo}.
+ *
+ * @param personaMappingId The ID of the persona mapping (required)
+ * @return CompletableFuture<ApiResponse<AWSCloudAuthPersonaMappingResponse>>
+ */
+ public CompletableFuture>
+ getAWSCloudAuthPersonaMappingWithHttpInfoAsync(String personaMappingId) {
+ // Check if unstable operation is enabled
+ String operationId = "getAWSCloudAuthPersonaMapping";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'personaMappingId' is set
+ if (personaMappingId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'personaMappingId' when calling"
+ + " getAWSCloudAuthPersonaMapping"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/cloud_auth/aws/persona_mapping/{persona_mapping_id}"
+ .replaceAll(
+ "\\{" + "persona_mapping_id" + "\\}",
+ apiClient.escapeString(personaMappingId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.CloudAuthenticationApi.getAWSCloudAuthPersonaMapping",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
/**
* List AWS cloud authentication persona mappings.
*
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateAttributes.java
new file mode 100644
index 00000000000..8db3857c50b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateAttributes.java
@@ -0,0 +1,179 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Attributes for creating an AWS cloud authentication persona mapping */
+@JsonPropertyOrder({
+ AWSCloudAuthPersonaMappingCreateAttributes.JSON_PROPERTY_ACCOUNT_IDENTIFIER,
+ AWSCloudAuthPersonaMappingCreateAttributes.JSON_PROPERTY_ARN_PATTERN
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSCloudAuthPersonaMappingCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACCOUNT_IDENTIFIER = "account_identifier";
+ private String accountIdentifier;
+
+ public static final String JSON_PROPERTY_ARN_PATTERN = "arn_pattern";
+ private String arnPattern;
+
+ public AWSCloudAuthPersonaMappingCreateAttributes() {}
+
+ @JsonCreator
+ public AWSCloudAuthPersonaMappingCreateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_IDENTIFIER)
+ String accountIdentifier,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ARN_PATTERN) String arnPattern) {
+ this.accountIdentifier = accountIdentifier;
+ this.arnPattern = arnPattern;
+ }
+
+ public AWSCloudAuthPersonaMappingCreateAttributes accountIdentifier(String accountIdentifier) {
+ this.accountIdentifier = accountIdentifier;
+ return this;
+ }
+
+ /**
+ * Datadog account identifier (email or handle) mapped to the AWS principal
+ *
+ * @return accountIdentifier
+ */
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_IDENTIFIER)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getAccountIdentifier() {
+ return accountIdentifier;
+ }
+
+ public void setAccountIdentifier(String accountIdentifier) {
+ this.accountIdentifier = accountIdentifier;
+ }
+
+ public AWSCloudAuthPersonaMappingCreateAttributes arnPattern(String arnPattern) {
+ this.arnPattern = arnPattern;
+ return this;
+ }
+
+ /**
+ * AWS IAM ARN pattern to match for authentication
+ *
+ * @return arnPattern
+ */
+ @JsonProperty(JSON_PROPERTY_ARN_PATTERN)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getArnPattern() {
+ return arnPattern;
+ }
+
+ public void setArnPattern(String arnPattern) {
+ this.arnPattern = arnPattern;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSCloudAuthPersonaMappingCreateAttributes
+ */
+ @JsonAnySetter
+ public AWSCloudAuthPersonaMappingCreateAttributes putAdditionalProperty(
+ String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSCloudAuthPersonaMappingCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSCloudAuthPersonaMappingCreateAttributes awsCloudAuthPersonaMappingCreateAttributes =
+ (AWSCloudAuthPersonaMappingCreateAttributes) o;
+ return Objects.equals(
+ this.accountIdentifier, awsCloudAuthPersonaMappingCreateAttributes.accountIdentifier)
+ && Objects.equals(this.arnPattern, awsCloudAuthPersonaMappingCreateAttributes.arnPattern)
+ && Objects.equals(
+ this.additionalProperties,
+ awsCloudAuthPersonaMappingCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(accountIdentifier, arnPattern, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSCloudAuthPersonaMappingCreateAttributes {\n");
+ sb.append(" accountIdentifier: ").append(toIndentedString(accountIdentifier)).append("\n");
+ sb.append(" arnPattern: ").append(toIndentedString(arnPattern)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateData.java b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateData.java
new file mode 100644
index 00000000000..079aafe833e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateData.java
@@ -0,0 +1,185 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data for creating an AWS cloud authentication persona mapping */
+@JsonPropertyOrder({
+ AWSCloudAuthPersonaMappingCreateData.JSON_PROPERTY_ATTRIBUTES,
+ AWSCloudAuthPersonaMappingCreateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSCloudAuthPersonaMappingCreateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private AWSCloudAuthPersonaMappingCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private AWSCloudAuthPersonaMappingType type;
+
+ public AWSCloudAuthPersonaMappingCreateData() {}
+
+ @JsonCreator
+ public AWSCloudAuthPersonaMappingCreateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ AWSCloudAuthPersonaMappingCreateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ AWSCloudAuthPersonaMappingType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public AWSCloudAuthPersonaMappingCreateData attributes(
+ AWSCloudAuthPersonaMappingCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for creating an AWS cloud authentication persona mapping
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSCloudAuthPersonaMappingCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(AWSCloudAuthPersonaMappingCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public AWSCloudAuthPersonaMappingCreateData type(AWSCloudAuthPersonaMappingType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * Type identifier for AWS cloud authentication persona mapping
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSCloudAuthPersonaMappingType getType() {
+ return type;
+ }
+
+ public void setType(AWSCloudAuthPersonaMappingType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSCloudAuthPersonaMappingCreateData
+ */
+ @JsonAnySetter
+ public AWSCloudAuthPersonaMappingCreateData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSCloudAuthPersonaMappingCreateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSCloudAuthPersonaMappingCreateData awsCloudAuthPersonaMappingCreateData =
+ (AWSCloudAuthPersonaMappingCreateData) o;
+ return Objects.equals(this.attributes, awsCloudAuthPersonaMappingCreateData.attributes)
+ && Objects.equals(this.type, awsCloudAuthPersonaMappingCreateData.type)
+ && Objects.equals(
+ this.additionalProperties, awsCloudAuthPersonaMappingCreateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSCloudAuthPersonaMappingCreateData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateRequest.java
new file mode 100644
index 00000000000..c49a40b8630
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingCreateRequest.java
@@ -0,0 +1,149 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request used to create an AWS cloud authentication persona mapping */
+@JsonPropertyOrder({AWSCloudAuthPersonaMappingCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSCloudAuthPersonaMappingCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AWSCloudAuthPersonaMappingCreateData data;
+
+ public AWSCloudAuthPersonaMappingCreateRequest() {}
+
+ @JsonCreator
+ public AWSCloudAuthPersonaMappingCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ AWSCloudAuthPersonaMappingCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public AWSCloudAuthPersonaMappingCreateRequest data(AWSCloudAuthPersonaMappingCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for creating an AWS cloud authentication persona mapping
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSCloudAuthPersonaMappingCreateData getData() {
+ return data;
+ }
+
+ public void setData(AWSCloudAuthPersonaMappingCreateData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSCloudAuthPersonaMappingCreateRequest
+ */
+ @JsonAnySetter
+ public AWSCloudAuthPersonaMappingCreateRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSCloudAuthPersonaMappingCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSCloudAuthPersonaMappingCreateRequest awsCloudAuthPersonaMappingCreateRequest =
+ (AWSCloudAuthPersonaMappingCreateRequest) o;
+ return Objects.equals(this.data, awsCloudAuthPersonaMappingCreateRequest.data)
+ && Objects.equals(
+ this.additionalProperties,
+ awsCloudAuthPersonaMappingCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSCloudAuthPersonaMappingCreateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingResponse.java
new file mode 100644
index 00000000000..9c494a984e9
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSCloudAuthPersonaMappingResponse.java
@@ -0,0 +1,148 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Response containing a single AWS cloud authentication persona mapping */
+@JsonPropertyOrder({AWSCloudAuthPersonaMappingResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSCloudAuthPersonaMappingResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AWSCloudAuthPersonaMappingDataResponse data;
+
+ public AWSCloudAuthPersonaMappingResponse() {}
+
+ @JsonCreator
+ public AWSCloudAuthPersonaMappingResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ AWSCloudAuthPersonaMappingDataResponse data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public AWSCloudAuthPersonaMappingResponse data(AWSCloudAuthPersonaMappingDataResponse data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data for AWS cloud authentication persona mapping response
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSCloudAuthPersonaMappingDataResponse getData() {
+ return data;
+ }
+
+ public void setData(AWSCloudAuthPersonaMappingDataResponse data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSCloudAuthPersonaMappingResponse
+ */
+ @JsonAnySetter
+ public AWSCloudAuthPersonaMappingResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSCloudAuthPersonaMappingResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSCloudAuthPersonaMappingResponse awsCloudAuthPersonaMappingResponse =
+ (AWSCloudAuthPersonaMappingResponse) o;
+ return Objects.equals(this.data, awsCloudAuthPersonaMappingResponse.data)
+ && Objects.equals(
+ this.additionalProperties, awsCloudAuthPersonaMappingResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSCloudAuthPersonaMappingResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature b/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature
index fe9eb594a73..c444f1469c2 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature
+++ b/src/test/resources/com/datadog/api/client/v2/api/cloud_authentication.feature
@@ -7,15 +7,73 @@ Feature: Cloud Authentication
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CloudAuthentication" API
- And operation "ListAWSCloudAuthPersonaMappings" enabled
- And new "ListAWSCloudAuthPersonaMappings" request
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Create an AWS cloud authentication persona mapping returns "Bad Request" response
+ Given operation "CreateAWSCloudAuthPersonaMapping" enabled
+ And new "CreateAWSCloudAuthPersonaMapping" request
+ And body with value {"data": {"attributes": {"account_identifier": "test@test.com", "arn_pattern": "arn:aws:iam::123456789012:user/testuser"}, "type": "aws_cloud_auth_config"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Create an AWS cloud authentication persona mapping returns "Conflict" response
+ Given operation "CreateAWSCloudAuthPersonaMapping" enabled
+ And new "CreateAWSCloudAuthPersonaMapping" request
+ And body with value {"data": {"attributes": {"account_identifier": "test@test.com", "arn_pattern": "arn:aws:iam::123456789012:user/testuser"}, "type": "aws_cloud_auth_config"}}
+ When the request is sent
+ Then the response status is 409 Conflict
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Create an AWS cloud authentication persona mapping returns "Created" response
+ Given operation "CreateAWSCloudAuthPersonaMapping" enabled
+ And new "CreateAWSCloudAuthPersonaMapping" request
+ And body with value {"data": {"attributes": {"account_identifier": "test@test.com", "arn_pattern": "arn:aws:iam::123456789012:user/testuser"}, "type": "aws_cloud_auth_config"}}
+ When the request is sent
+ Then the response status is 201 Created
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Delete an AWS cloud authentication persona mapping returns "No Content" response
+ Given operation "DeleteAWSCloudAuthPersonaMapping" enabled
+ And new "DeleteAWSCloudAuthPersonaMapping" request
+ And request contains "persona_mapping_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 204 No Content
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Delete an AWS cloud authentication persona mapping returns "Not Found" response
+ Given operation "DeleteAWSCloudAuthPersonaMapping" enabled
+ And new "DeleteAWSCloudAuthPersonaMapping" request
+ And request contains "persona_mapping_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Get an AWS cloud authentication persona mapping returns "Not Found" response
+ Given operation "GetAWSCloudAuthPersonaMapping" enabled
+ And new "GetAWSCloudAuthPersonaMapping" request
+ And request contains "persona_mapping_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/team-aaaauthn
+ Scenario: Get an AWS cloud authentication persona mapping returns "OK" response
+ Given operation "GetAWSCloudAuthPersonaMapping" enabled
+ And new "GetAWSCloudAuthPersonaMapping" request
+ And request contains "persona_mapping_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
@generated @skip @team:DataDog/team-aaaauthn
Scenario: List AWS cloud authentication persona mappings returns "Bad Request" response
+ Given operation "ListAWSCloudAuthPersonaMappings" enabled
+ And new "ListAWSCloudAuthPersonaMappings" request
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/team-aaaauthn
Scenario: List AWS cloud authentication persona mappings returns "OK" response
+ Given operation "ListAWSCloudAuthPersonaMappings" enabled
+ And new "ListAWSCloudAuthPersonaMappings" request
When the request is sent
Then the response status is 200 OK
diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json
index 6bcb5be0aec..3b052977c20 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/undo.json
+++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json
@@ -1060,6 +1060,31 @@
"type": "safe"
}
},
+ "CreateAWSCloudAuthPersonaMapping": {
+ "tag": "Cloud Authentication",
+ "undo": {
+ "operationId": "DeleteAWSCloudAuthPersonaMapping",
+ "parameters": [
+ {
+ "name": "persona_mapping_id",
+ "source": "data.id"
+ }
+ ],
+ "type": "unsafe"
+ }
+ },
+ "DeleteAWSCloudAuthPersonaMapping": {
+ "tag": "Cloud Authentication",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "GetAWSCloudAuthPersonaMapping": {
+ "tag": "Cloud Authentication",
+ "undo": {
+ "type": "safe"
+ }
+ },
"CreateCustomFramework": {
"tag": "Security Monitoring",
"undo": {