diff --git a/.apigentools-info b/.apigentools-info index 85728367775..61c79f9fc7e 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-23 22:24:35.497855", - "spec_repo_commit": "6a31fa8c" + "regenerated": "2025-01-24 18:35:46.518297", + "spec_repo_commit": "9120bb44" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-23 22:24:35.514105", - "spec_repo_commit": "6a31fa8c" + "regenerated": "2025-01-24 18:35:46.534203", + "spec_repo_commit": "9120bb44" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1f5214bdc2a..cdf67d3b28e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -207,7 +207,7 @@ components: schema: type: string ConnectionId: - description: The ID of the action connection + description: The ID of the Action Connection. in: path name: connection_id required: true @@ -1221,23 +1221,23 @@ components: description: The definition of `AWSAssumeRole` object. properties: account_id: - description: AWS account the connection is created for + description: AWS account the connection is created for. example: '111222333444' pattern: ^\d{12}$ type: string external_id: description: External ID used to scope which connection can be used to assume - the role + the role. example: 33a1011635c44b38a064cf14e82e1d8f readOnly: true type: string principal_id: - description: AWS account that will assume the role + description: AWS account that will assume the role. example: '123456789012' readOnly: true type: string role: - description: Role to assume + description: Role to assume. example: my-role type: string type: @@ -1259,7 +1259,7 @@ components: description: The definition of `AWSAssumeRoleUpdate` object. properties: account_id: - description: AWS account the connection is created for + description: AWS account the connection is created for. example: '111222333444' pattern: ^\d{12}$ type: string @@ -1669,7 +1669,7 @@ components: integration: $ref: '#/components/schemas/ActionConnectionIntegration' name: - description: Name of the connection + description: Name of the connection. example: My AWS Connection type: string required: @@ -1682,7 +1682,7 @@ components: integration: $ref: '#/components/schemas/ActionConnectionIntegrationUpdate' name: - description: Name of the connection + description: Name of the connection. example: My AWS Connection type: string type: object @@ -1692,7 +1692,7 @@ components: attributes: $ref: '#/components/schemas/ActionConnectionAttributes' id: - description: The connection identifier + description: The connection identifier. readOnly: true type: string type: @@ -7193,7 +7193,7 @@ components: x-enum-varnames: - COST_BY_ORG CreateActionConnectionRequest: - description: Request used to create an action connection. + description: Request used to create an Action Connection. properties: data: $ref: '#/components/schemas/ActionConnectionData' @@ -7201,7 +7201,7 @@ components: - data type: object CreateActionConnectionResponse: - description: The response for a created connection + description: The response for a created connection. properties: data: $ref: '#/components/schemas/ActionConnectionData' @@ -12428,7 +12428,7 @@ components: x-enum-varnames: - GCP_SERVICE_ACCOUNT GetActionConnectionResponse: - description: The response for found connection + description: The response for found connection. properties: data: $ref: '#/components/schemas/ActionConnectionData' @@ -12818,7 +12818,7 @@ components: description: The definition of `HTTPIntegration` object. properties: base_url: - description: Base HTTP url for the integration + description: Base HTTP url for the integration. example: http://datadoghq.com pattern: url type: string @@ -12843,7 +12843,7 @@ components: description: The definition of `HTTPIntegrationUpdate` object. properties: base_url: - description: Base HTTP url for the integration + description: Base HTTP url for the integration. example: http://datadoghq.com pattern: url type: string @@ -29362,7 +29362,7 @@ components: type: string type: object UpdateActionConnectionRequest: - description: Request used to update an action connection. + description: Request used to update an Action Connection. properties: data: $ref: '#/components/schemas/ActionConnectionDataUpdate' @@ -30918,7 +30918,7 @@ openapi: 3.0.0 paths: /api/v2/actions/connections: post: - description: Create a new Action Connection + description: Create a new Action Connection. operationId: CreateActionConnection requestBody: content: @@ -30932,7 +30932,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateActionConnectionResponse' - description: Successfully created Action Connection + description: Successfully created an Action Connection. '400': content: application/json: @@ -30954,9 +30954,13 @@ paths: summary: Create a new Action Connection tags: - Action Connection + x-permission: + operator: OR + permissions: + - connection_read /api/v2/actions/connections/{connection_id}: delete: - description: Delete an existing Action Connection + description: Delete an existing Action Connection. operationId: DeleteActionConnection parameters: - $ref: '#/components/parameters/ConnectionId' @@ -30989,7 +30993,7 @@ paths: permissions: - connection_write get: - description: Get an existing Action Connection + description: Get an existing Action Connection. operationId: GetActionConnection parameters: - $ref: '#/components/parameters/ConnectionId' @@ -30999,7 +31003,7 @@ paths: application/json: schema: $ref: '#/components/schemas/GetActionConnectionResponse' - description: Successfully get Action Connection + description: Successfully got an Action Connection. '400': content: application/json: @@ -31027,6 +31031,10 @@ paths: summary: Get an existing Action Connection tags: - Action Connection + x-permission: + operator: OR + permissions: + - connection_read patch: description: Update an existing Action Connection operationId: UpdateActionConnection @@ -31037,7 +31045,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UpdateActionConnectionRequest' - description: Update an existing Action Connection request body + description: Update an existing Action Connection request body. required: true responses: '200': @@ -31045,7 +31053,7 @@ paths: application/json: schema: $ref: '#/components/schemas/UpdateActionConnectionResponse' - description: Successfully updated Action Connection + description: Successfully updated an Action Connection. '400': content: application/json: @@ -31073,6 +31081,10 @@ paths: summary: Update an existing Action Connection tags: - Action Connection + x-permission: + operator: OR + permissions: + - connection_write /api/v2/agentless_scanning/accounts/aws: get: description: Fetches the scan options configured for AWS accounts. @@ -49080,13 +49092,15 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration -- description: "Action connections extend your installed integrations and allow you - to take action in your third-party systems\n(e.g. AWS, GitLab, and Statuspage) - with Datadog\u2019s Workflow Automation and App Builder products.\n\nDatadog\u2019s +- description: "Action Connections extend your installed integrations and allow you + to take action in your third-party systems\n(e.g. AWS, GitLab, and OpenAI) with + Datadog\u2019s [Workflow Automation](https://docs.datadoghq.com/service_management/workflows/)\nand + [App Builder](https://docs.datadoghq.com/service_management/app_builder/) products.\n\nDatadog\u2019s Integrations automatically provide authentication for Slack, Microsoft Teams, - PagerDuty, Opsgenie,\nJIRA, GitHub, and Statuspage. You do not need additional + PagerDuty, Opsgenie,\nJira, GitHub, and Statuspage. You do not need additional connections in order to access these tools within\nWorkflow Automation and App - Builder.\n\nWe offer granular access control for editing and resolving connections." + Builder.\n\nWe offer granular access control for editing and resolving connections.\n\n**Note:** + The Action Connection API currently supports AWS and HTTP integrations." externalDocs: description: Find out more at url: https://docs.datadoghq.com/service_management/workflows/connections/ diff --git a/examples/v2/action-connection/CreateActionConnection.java b/examples/v2/action-connection/CreateActionConnection.java index ba3ebb320f5..2ce53b75a62 100644 --- a/examples/v2/action-connection/CreateActionConnection.java +++ b/examples/v2/action-connection/CreateActionConnection.java @@ -1,4 +1,4 @@ -// Create a new Action Connection returns "Successfully created Action Connection" response +// Create a new Action Connection returns "Successfully created an Action Connection." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -24,20 +24,20 @@ public static void main(String[] args) { new CreateActionConnectionRequest() .data( new ActionConnectionData() - .type(ActionConnectionDataType.ACTION_CONNECTION) .attributes( new ActionConnectionAttributes() - .name("Cassette Connection DELETE_ME") .integration( new ActionConnectionIntegration( new AWSIntegration() - .type(AWSIntegrationType.AWS) .credentials( new AWSCredentials( new AWSAssumeRole() - .type(AWSAssumeRoleType.AWSASSUMEROLE) - .role("MyRoleUpdated") - .accountId("123456789123"))))))); + .accountId("111222333444") + .role("my-role") + .type(AWSAssumeRoleType.AWSASSUMEROLE))) + .type(AWSIntegrationType.AWS))) + .name("My AWS Connection")) + .type(ActionConnectionDataType.ACTION_CONNECTION)); try { CreateActionConnectionResponse result = apiInstance.createActionConnection(body); diff --git a/examples/v2/action-connection/CreateActionConnection_2600083647.java b/examples/v2/action-connection/CreateActionConnection_2600083647.java new file mode 100644 index 00000000000..ba3ebb320f5 --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_2600083647.java @@ -0,0 +1,53 @@ +// Create a new Action Connection returns "Successfully created Action Connection" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ActionConnectionApi; +import com.datadog.api.client.v2.model.AWSAssumeRole; +import com.datadog.api.client.v2.model.AWSAssumeRoleType; +import com.datadog.api.client.v2.model.AWSCredentials; +import com.datadog.api.client.v2.model.AWSIntegration; +import com.datadog.api.client.v2.model.AWSIntegrationType; +import com.datadog.api.client.v2.model.ActionConnectionAttributes; +import com.datadog.api.client.v2.model.ActionConnectionData; +import com.datadog.api.client.v2.model.ActionConnectionDataType; +import com.datadog.api.client.v2.model.ActionConnectionIntegration; +import com.datadog.api.client.v2.model.CreateActionConnectionRequest; +import com.datadog.api.client.v2.model.CreateActionConnectionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); + + CreateActionConnectionRequest body = + new CreateActionConnectionRequest() + .data( + new ActionConnectionData() + .type(ActionConnectionDataType.ACTION_CONNECTION) + .attributes( + new ActionConnectionAttributes() + .name("Cassette Connection DELETE_ME") + .integration( + new ActionConnectionIntegration( + new AWSIntegration() + .type(AWSIntegrationType.AWS) + .credentials( + new AWSCredentials( + new AWSAssumeRole() + .type(AWSAssumeRoleType.AWSASSUMEROLE) + .role("MyRoleUpdated") + .accountId("123456789123"))))))); + + try { + CreateActionConnectionResponse result = apiInstance.createActionConnection(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ActionConnectionApi#createActionConnection"); + 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/action-connection/GetActionConnection.java b/examples/v2/action-connection/GetActionConnection.java index 8435f61c17e..a10791eb3e8 100644 --- a/examples/v2/action-connection/GetActionConnection.java +++ b/examples/v2/action-connection/GetActionConnection.java @@ -1,4 +1,4 @@ -// Get an existing Action Connection returns "Successfully get Action Connection" response +// Get an existing Action Connection returns "Successfully got an Action Connection." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,8 +11,7 @@ public static void main(String[] args) { ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); try { - GetActionConnectionResponse result = - apiInstance.getActionConnection("cb460d51-3c88-4e87-adac-d47131d0423d"); + GetActionConnectionResponse result = apiInstance.getActionConnection("connection_id"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ActionConnectionApi#getActionConnection"); diff --git a/examples/v2/action-connection/GetActionConnection_2273648770.java b/examples/v2/action-connection/GetActionConnection_2273648770.java new file mode 100644 index 00000000000..8435f61c17e --- /dev/null +++ b/examples/v2/action-connection/GetActionConnection_2273648770.java @@ -0,0 +1,25 @@ +// Get an existing Action Connection returns "Successfully get Action Connection" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ActionConnectionApi; +import com.datadog.api.client.v2.model.GetActionConnectionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); + + try { + GetActionConnectionResponse result = + apiInstance.getActionConnection("cb460d51-3c88-4e87-adac-d47131d0423d"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ActionConnectionApi#getActionConnection"); + 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/action-connection/UpdateActionConnection.java b/examples/v2/action-connection/UpdateActionConnection.java index 7e76b9c6a09..1ed4b5b5d32 100644 --- a/examples/v2/action-connection/UpdateActionConnection.java +++ b/examples/v2/action-connection/UpdateActionConnection.java @@ -1,4 +1,5 @@ -// Update an existing Action Connection returns "Successfully updated Action Connection" response +// Update an existing Action Connection returns "Successfully updated an Action Connection." +// response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -24,24 +25,24 @@ public static void main(String[] args) { new UpdateActionConnectionRequest() .data( new ActionConnectionDataUpdate() - .type(ActionConnectionDataType.ACTION_CONNECTION) .attributes( new ActionConnectionAttributesUpdate() - .name("Cassette Connection") .integration( new ActionConnectionIntegrationUpdate( new AWSIntegrationUpdate() - .type(AWSIntegrationType.AWS) .credentials( new AWSCredentialsUpdate( new AWSAssumeRoleUpdate() - .type(AWSAssumeRoleType.AWSASSUMEROLE) - .role("MyRoleUpdated") - .accountId("123456789123"))))))); + .accountId("111222333444") + .role("my-role") + .type(AWSAssumeRoleType.AWSASSUMEROLE))) + .type(AWSIntegrationType.AWS))) + .name("My AWS Connection")) + .type(ActionConnectionDataType.ACTION_CONNECTION)); try { UpdateActionConnectionResponse result = - apiInstance.updateActionConnection("cb460d51-3c88-4e87-adac-d47131d0423d", body); + apiInstance.updateActionConnection("connection_id", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ActionConnectionApi#updateActionConnection"); diff --git a/examples/v2/action-connection/UpdateActionConnection_2280399724.java b/examples/v2/action-connection/UpdateActionConnection_2280399724.java new file mode 100644 index 00000000000..7e76b9c6a09 --- /dev/null +++ b/examples/v2/action-connection/UpdateActionConnection_2280399724.java @@ -0,0 +1,54 @@ +// Update an existing Action Connection returns "Successfully updated Action Connection" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ActionConnectionApi; +import com.datadog.api.client.v2.model.AWSAssumeRoleType; +import com.datadog.api.client.v2.model.AWSAssumeRoleUpdate; +import com.datadog.api.client.v2.model.AWSCredentialsUpdate; +import com.datadog.api.client.v2.model.AWSIntegrationType; +import com.datadog.api.client.v2.model.AWSIntegrationUpdate; +import com.datadog.api.client.v2.model.ActionConnectionAttributesUpdate; +import com.datadog.api.client.v2.model.ActionConnectionDataType; +import com.datadog.api.client.v2.model.ActionConnectionDataUpdate; +import com.datadog.api.client.v2.model.ActionConnectionIntegrationUpdate; +import com.datadog.api.client.v2.model.UpdateActionConnectionRequest; +import com.datadog.api.client.v2.model.UpdateActionConnectionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient); + + UpdateActionConnectionRequest body = + new UpdateActionConnectionRequest() + .data( + new ActionConnectionDataUpdate() + .type(ActionConnectionDataType.ACTION_CONNECTION) + .attributes( + new ActionConnectionAttributesUpdate() + .name("Cassette Connection") + .integration( + new ActionConnectionIntegrationUpdate( + new AWSIntegrationUpdate() + .type(AWSIntegrationType.AWS) + .credentials( + new AWSCredentialsUpdate( + new AWSAssumeRoleUpdate() + .type(AWSAssumeRoleType.AWSASSUMEROLE) + .role("MyRoleUpdated") + .accountId("123456789123"))))))); + + try { + UpdateActionConnectionResponse result = + apiInstance.updateActionConnection("cb460d51-3c88-4e87-adac-d47131d0423d", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ActionConnectionApi#updateActionConnection"); + 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/v2/api/ActionConnectionApi.java b/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java index cfecde0eace..fdbe0144a94 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ActionConnectionApi.java @@ -79,7 +79,7 @@ public CompletableFuture createActionConnectionA } /** - * Create a new Action Connection + * Create a new Action Connection. * * @param body (required) * @return ApiResponse<CreateActionConnectionResponse> @@ -88,7 +88,7 @@ public CompletableFuture createActionConnectionA * * * - * + * * * * @@ -187,7 +187,7 @@ public ApiResponse createActionConnectionWithHtt * *

See {@link #deleteActionConnectionWithHttpInfo}. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @throws ApiException if fails to make API call */ public void deleteActionConnection(String connectionId) throws ApiException { @@ -199,7 +199,7 @@ public void deleteActionConnection(String connectionId) throws ApiException { * *

See {@link #deleteActionConnectionWithHttpInfoAsync}. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return CompletableFuture */ public CompletableFuture deleteActionConnectionAsync(String connectionId) { @@ -211,9 +211,9 @@ public CompletableFuture deleteActionConnectionAsync(String connectionId) } /** - * Delete an existing Action Connection + * Delete an existing Action Connection. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -268,7 +268,7 @@ public ApiResponse deleteActionConnectionWithHttpInfo(String connectionId) * *

See {@link #deleteActionConnectionWithHttpInfo}. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteActionConnectionWithHttpInfoAsync( @@ -324,7 +324,7 @@ public CompletableFuture> deleteActionConnectionWithHttpInfoAs * *

See {@link #getActionConnectionWithHttpInfo}. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return GetActionConnectionResponse * @throws ApiException if fails to make API call */ @@ -337,7 +337,7 @@ public GetActionConnectionResponse getActionConnection(String connectionId) thro * *

See {@link #getActionConnectionWithHttpInfoAsync}. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return CompletableFuture<GetActionConnectionResponse> */ public CompletableFuture getActionConnectionAsync( @@ -350,16 +350,16 @@ public CompletableFuture getActionConnectionAsync( } /** - * Get an existing Action Connection + * Get an existing Action Connection. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return ApiResponse<GetActionConnectionResponse> * @throws ApiException if fails to make API call * @http.response.details *

Response details
Status Code Description Response Headers
201 Successfully created Action Connection -
201 Successfully created an Action Connection. -
400 Bad Request -
403 Forbidden -
429 Too Many Request -
* * - * + * * * * @@ -408,7 +408,7 @@ public ApiResponse getActionConnectionWithHttpInfo( * *

See {@link #getActionConnectionWithHttpInfo}. * - * @param connectionId The ID of the action connection (required) + * @param connectionId The ID of the Action Connection. (required) * @return CompletableFuture<ApiResponse<GetActionConnectionResponse>> */ public CompletableFuture> @@ -466,8 +466,8 @@ public ApiResponse getActionConnectionWithHttpInfo( * *

See {@link #updateActionConnectionWithHttpInfo}. * - * @param connectionId The ID of the action connection (required) - * @param body Update an existing Action Connection request body (required) + * @param connectionId The ID of the Action Connection. (required) + * @param body Update an existing Action Connection request body. (required) * @return UpdateActionConnectionResponse * @throws ApiException if fails to make API call */ @@ -481,8 +481,8 @@ public UpdateActionConnectionResponse updateActionConnection( * *

See {@link #updateActionConnectionWithHttpInfoAsync}. * - * @param connectionId The ID of the action connection (required) - * @param body Update an existing Action Connection request body (required) + * @param connectionId The ID of the Action Connection. (required) + * @param body Update an existing Action Connection request body. (required) * @return CompletableFuture<UpdateActionConnectionResponse> */ public CompletableFuture updateActionConnectionAsync( @@ -497,15 +497,15 @@ public CompletableFuture updateActionConnectionA /** * Update an existing Action Connection * - * @param connectionId The ID of the action connection (required) - * @param body Update an existing Action Connection request body (required) + * @param connectionId The ID of the Action Connection. (required) + * @param body Update an existing Action Connection request body. (required) * @return ApiResponse<UpdateActionConnectionResponse> * @throws ApiException if fails to make API call * @http.response.details *

Response details
Status Code Description Response Headers
200 Successfully get Action Connection -
200 Successfully got an Action Connection. -
400 Bad Request -
403 Forbidden -
404 Not Found -
* * - * + * * * * @@ -560,8 +560,8 @@ public ApiResponse updateActionConnectionWithHtt * *

See {@link #updateActionConnectionWithHttpInfo}. * - * @param connectionId The ID of the action connection (required) - * @param body Update an existing Action Connection request body (required) + * @param connectionId The ID of the Action Connection. (required) + * @param body Update an existing Action Connection request body. (required) * @return CompletableFuture<ApiResponse<UpdateActionConnectionResponse>> */ public CompletableFuture> diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRole.java b/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRole.java index 0affa49aef1..4b7ea12361d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRole.java +++ b/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRole.java @@ -63,7 +63,7 @@ public AWSAssumeRole accountId(String accountId) { } /** - * AWS account the connection is created for + * AWS account the connection is created for. * * @return accountId */ @@ -78,7 +78,7 @@ public void setAccountId(String accountId) { } /** - * External ID used to scope which connection can be used to assume the role + * External ID used to scope which connection can be used to assume the role. * * @return externalId */ @@ -90,7 +90,7 @@ public String getExternalId() { } /** - * AWS account that will assume the role + * AWS account that will assume the role. * * @return principalId */ @@ -107,7 +107,7 @@ public AWSAssumeRole role(String role) { } /** - * Role to assume + * Role to assume. * * @return role */ diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRoleUpdate.java b/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRoleUpdate.java index 0ac0c1b46c1..23bd46c63ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRoleUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/AWSAssumeRoleUpdate.java @@ -55,7 +55,7 @@ public AWSAssumeRoleUpdate accountId(String accountId) { } /** - * AWS account the connection is created for + * AWS account the connection is created for. * * @return accountId */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributes.java index fb899554c13..302ae3f0a23 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributes.java @@ -71,7 +71,7 @@ public ActionConnectionAttributes name(String name) { } /** - * Name of the connection + * Name of the connection. * * @return name */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributesUpdate.java b/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributesUpdate.java index 6d8c3e5187a..792dae5a1bc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributesUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/ActionConnectionAttributesUpdate.java @@ -60,7 +60,7 @@ public ActionConnectionAttributesUpdate name(String name) { } /** - * Name of the connection + * Name of the connection. * * @return name */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ActionConnectionData.java b/src/main/java/com/datadog/api/client/v2/model/ActionConnectionData.java index d4cc0664b0e..c2a6d1db3a3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ActionConnectionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ActionConnectionData.java @@ -71,7 +71,7 @@ public void setAttributes(ActionConnectionAttributes attributes) { } /** - * The connection identifier + * The connection identifier. * * @return id */ diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionRequest.java index 832895ae399..b62f6993114 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionRequest.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** Request used to create an action connection. */ +/** Request used to create an Action Connection. */ @JsonPropertyOrder({CreateActionConnectionRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionResponse.java b/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionResponse.java index 1de4b62dd3a..715f7bb7304 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateActionConnectionResponse.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** The response for a created connection */ +/** The response for a created connection. */ @JsonPropertyOrder({CreateActionConnectionResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/GetActionConnectionResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetActionConnectionResponse.java index 6b3345f2fed..a378ec5fdd8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GetActionConnectionResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/GetActionConnectionResponse.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** The response for found connection */ +/** The response for found connection. */ @JsonPropertyOrder({GetActionConnectionResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/HTTPIntegration.java b/src/main/java/com/datadog/api/client/v2/model/HTTPIntegration.java index a3a025047c1..58e72af48da 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HTTPIntegration.java +++ b/src/main/java/com/datadog/api/client/v2/model/HTTPIntegration.java @@ -56,7 +56,7 @@ public HTTPIntegration baseUrl(String baseUrl) { } /** - * Base HTTP url for the integration + * Base HTTP url for the integration. * * @return baseUrl */ diff --git a/src/main/java/com/datadog/api/client/v2/model/HTTPIntegrationUpdate.java b/src/main/java/com/datadog/api/client/v2/model/HTTPIntegrationUpdate.java index 90af6a9fe01..0f0c44a7963 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HTTPIntegrationUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/HTTPIntegrationUpdate.java @@ -51,7 +51,7 @@ public HTTPIntegrationUpdate baseUrl(String baseUrl) { } /** - * Base HTTP url for the integration + * Base HTTP url for the integration. * * @return baseUrl */ diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateActionConnectionRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpdateActionConnectionRequest.java index 7a4c6b2ff89..10eacc3c9c8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/UpdateActionConnectionRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateActionConnectionRequest.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** Request used to update an action connection. */ +/** Request used to update an Action Connection. */ @JsonPropertyOrder({UpdateActionConnectionRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature b/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature index f379fc1a003..dc8dab1fbd2 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/action_connection.feature @@ -1,41 +1,51 @@ @endpoint(action-connection) @endpoint(action-connection-v2) Feature: Action Connection - Action connections extend your installed integrations and allow you to - take action in your third-party systems (e.g. AWS, GitLab, and Statuspage) - with Datadog’s Workflow Automation and App Builder products. Datadog’s - Integrations automatically provide authentication for Slack, Microsoft - Teams, PagerDuty, Opsgenie, JIRA, GitHub, and Statuspage. You do not need - additional connections in order to access these tools within Workflow - Automation and App Builder. We offer granular access control for editing - and resolving connections. + Action Connections extend your installed integrations and allow you to + take action in your third-party systems (e.g. AWS, GitLab, and OpenAI) + with Datadog’s [Workflow + Automation](https://docs.datadoghq.com/service_management/workflows/) and + [App Builder](https://docs.datadoghq.com/service_management/app_builder/) + products. Datadog’s Integrations automatically provide authentication for + Slack, Microsoft Teams, PagerDuty, Opsgenie, Jira, GitHub, and Statuspage. + You do not need additional connections in order to access these tools + within Workflow Automation and App Builder. We offer granular access + control for editing and resolving connections. **Note:** The Action + Connection API currently supports AWS and HTTP integrations. Background: Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system And an instance of "ActionConnection" API - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Create a new Action Connection returns "Bad Request" response Given new "CreateActionConnection" request And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"1"}}}}} When the request is sent Then the response status is 400 Bad Request - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Create a new Action Connection returns "Successfully created Action Connection" response Given new "CreateActionConnection" request And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection DELETE_ME","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} When the request is sent Then the response status is 201 Successfully created Action Connection - @team:DataDog/workflow-automation-dev + @generated @skip @team:Datadog/action-platform + Scenario: Create a new Action Connection returns "Successfully created an Action Connection." response + Given new "CreateActionConnection" request + And body with value {"data": {"attributes": {"integration": {"credentials": {"account_id": "111222333444", "role": "my-role", "type": "AWSAssumeRole"}, "type": "AWS"}, "name": "My AWS Connection"}, "type": "action_connection"}} + When the request is sent + Then the response status is 201 Successfully created an Action Connection. + + @team:Datadog/action-platform Scenario: Delete an existing Action Connection returns "Not Found" response Given new "DeleteActionConnection" request And request contains "connection_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" When the request is sent Then the response status is 404 Not Found - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Delete an existing Action Connection returns "Successfully deleted Action Connection" response Given there is a valid "action_connection" in the system And new "DeleteActionConnection" request @@ -43,35 +53,42 @@ Feature: Action Connection When the request is sent Then the response status is 204 The resource was deleted successfully. - @generated @skip @team:DataDog/workflow-automation-dev + @generated @skip @team:Datadog/action-platform Scenario: Delete an existing Action Connection returns "The resource was deleted successfully." response Given new "DeleteActionConnection" request And request contains "connection_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 The resource was deleted successfully. - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Get an existing Action Connection returns "Bad Request" response Given new "GetActionConnection" request And request contains "connection_id" parameter with value "bad-format" When the request is sent Then the response status is 400 Bad Request - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Get an existing Action Connection returns "Not Found" response Given new "GetActionConnection" request And request contains "connection_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" When the request is sent Then the response status is 404 Not Found - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Get an existing Action Connection returns "Successfully get Action Connection" response Given new "GetActionConnection" request And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" When the request is sent Then the response status is 200 Successfully get Action Connection - @team:DataDog/workflow-automation-dev + @generated @skip @team:Datadog/action-platform + Scenario: Get an existing Action Connection returns "Successfully got an Action Connection." response + Given new "GetActionConnection" request + And request contains "connection_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 Successfully got an Action Connection. + + @team:Datadog/action-platform Scenario: Update an existing Action Connection returns "Bad Request" response Given new "UpdateActionConnection" request And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" @@ -79,7 +96,7 @@ Feature: Action Connection When the request is sent Then the response status is 400 Bad Request - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Update an existing Action Connection returns "Not Found" response Given new "UpdateActionConnection" request And request contains "connection_id" parameter with value "aaa11111-aa11-aa11-aaaa-aaaaaa111111" @@ -87,10 +104,18 @@ Feature: Action Connection When the request is sent Then the response status is 404 Not Found - @team:DataDog/workflow-automation-dev + @team:Datadog/action-platform Scenario: Update an existing Action Connection returns "Successfully updated Action Connection" response Given new "UpdateActionConnection" request And request contains "connection_id" parameter with value "cb460d51-3c88-4e87-adac-d47131d0423d" And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}} When the request is sent Then the response status is 200 Successfully updated Action Connection + + @generated @skip @team:Datadog/action-platform + Scenario: Update an existing Action Connection returns "Successfully updated an Action Connection." response + Given new "UpdateActionConnection" request + And request contains "connection_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"integration": {"credentials": {"account_id": "111222333444", "role": "my-role", "type": "AWSAssumeRole"}, "type": "AWS"}, "name": "My AWS Connection"}, "type": "action_connection"}} + When the request is sent + Then the response status is 200 Successfully updated an Action Connection.

Response details
Status Code Description Response Headers
200 Successfully updated Action Connection -
200 Successfully updated an Action Connection. -
400 Bad Request -
403 Forbidden -
404 Not Found -