From 2f017e26f5f589a872eccd9cf90204dbdd7216ba Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 24 Jan 2025 18:36:23 +0000 Subject: [PATCH] Regenerate client from commit 9120bb44 of spec repo --- .apigentools-info | 8 +-- .generator/schemas/v2/openapi.yaml | 68 +++++++++++-------- .../CreateActionConnection.py | 12 ++-- .../CreateActionConnection_2600083647.py | 38 +++++++++++ .../action-connection/GetActionConnection.py | 4 +- .../GetActionConnection_2273648770.py | 15 ++++ .../UpdateActionConnection.py | 14 ++-- .../UpdateActionConnection_2280399724.py | 38 +++++++++++ .../v2/api/action_connection_api.py | 23 ++++--- .../v2/model/action_connection_attributes.py | 2 +- .../action_connection_attributes_update.py | 2 +- .../v2/model/action_connection_data.py | 2 +- .../v2/model/action_connection_integration.py | 2 +- .../action_connection_integration_update.py | 2 +- .../v2/model/aws_assume_role.py | 8 +-- .../v2/model/aws_assume_role_update.py | 2 +- .../v2/model/aws_credentials.py | 8 +-- .../v2/model/aws_credentials_update.py | 2 +- .../model/create_action_connection_request.py | 2 +- .../create_action_connection_response.py | 2 +- .../model/get_action_connection_response.py | 2 +- .../v2/model/http_integration.py | 2 +- .../v2/model/http_integration_update.py | 2 +- .../model/update_action_connection_request.py | 2 +- tests/v2/features/action_connection.feature | 63 +++++++++++------ 25 files changed, 229 insertions(+), 96 deletions(-) create mode 100644 examples/v2/action-connection/CreateActionConnection_2600083647.py create mode 100644 examples/v2/action-connection/GetActionConnection_2273648770.py create mode 100644 examples/v2/action-connection/UpdateActionConnection_2280399724.py diff --git a/.apigentools-info b/.apigentools-info index fb42f18ea8..743bd291bc 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:31.115985", - "spec_repo_commit": "6a31fa8c" + "regenerated": "2025-01-24 18:35:46.372072", + "spec_repo_commit": "9120bb44" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-23 22:24:31.131010", - "spec_repo_commit": "6a31fa8c" + "regenerated": "2025-01-24 18:35:46.386854", + "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 1f5214bdc2..cdf67d3b28 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.py b/examples/v2/action-connection/CreateActionConnection.py index d167f5b70b..0154225194 100644 --- a/examples/v2/action-connection/CreateActionConnection.py +++ b/examples/v2/action-connection/CreateActionConnection.py @@ -1,5 +1,5 @@ """ -Create a new Action Connection returns "Successfully created Action Connection" response +Create a new Action Connection returns "Successfully created an Action Connection." response """ from datadog_api_client import ApiClient, Configuration @@ -15,18 +15,18 @@ body = CreateActionConnectionRequest( data=ActionConnectionData( - type=ActionConnectionDataType.ACTION_CONNECTION, attributes=ActionConnectionAttributes( - name="Cassette Connection DELETE_ME", integration=AWSIntegration( - type=AWSIntegrationType.AWS, credentials=AWSAssumeRole( + account_id="111222333444", + role="my-role", type=AWSAssumeRoleType.AWSASSUMEROLE, - role="MyRoleUpdated", - account_id="123456789123", ), + type=AWSIntegrationType.AWS, ), + name="My AWS Connection", ), + type=ActionConnectionDataType.ACTION_CONNECTION, ), ) diff --git a/examples/v2/action-connection/CreateActionConnection_2600083647.py b/examples/v2/action-connection/CreateActionConnection_2600083647.py new file mode 100644 index 0000000000..d167f5b70b --- /dev/null +++ b/examples/v2/action-connection/CreateActionConnection_2600083647.py @@ -0,0 +1,38 @@ +""" +Create a new Action Connection returns "Successfully created Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi +from datadog_api_client.v2.model.action_connection_attributes import ActionConnectionAttributes +from datadog_api_client.v2.model.action_connection_data import ActionConnectionData +from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType +from datadog_api_client.v2.model.aws_assume_role import AWSAssumeRole +from datadog_api_client.v2.model.aws_assume_role_type import AWSAssumeRoleType +from datadog_api_client.v2.model.aws_integration import AWSIntegration +from datadog_api_client.v2.model.aws_integration_type import AWSIntegrationType +from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest + +body = CreateActionConnectionRequest( + data=ActionConnectionData( + type=ActionConnectionDataType.ACTION_CONNECTION, + attributes=ActionConnectionAttributes( + name="Cassette Connection DELETE_ME", + integration=AWSIntegration( + type=AWSIntegrationType.AWS, + credentials=AWSAssumeRole( + type=AWSAssumeRoleType.AWSASSUMEROLE, + role="MyRoleUpdated", + account_id="123456789123", + ), + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.create_action_connection(body=body) + + print(response) diff --git a/examples/v2/action-connection/GetActionConnection.py b/examples/v2/action-connection/GetActionConnection.py index 1d21aa7b15..e461b8e924 100644 --- a/examples/v2/action-connection/GetActionConnection.py +++ b/examples/v2/action-connection/GetActionConnection.py @@ -1,5 +1,5 @@ """ -Get an existing Action Connection returns "Successfully get Action Connection" response +Get an existing Action Connection returns "Successfully got an Action Connection." response """ from datadog_api_client import ApiClient, Configuration @@ -9,7 +9,7 @@ with ApiClient(configuration) as api_client: api_instance = ActionConnectionApi(api_client) response = api_instance.get_action_connection( - connection_id="cb460d51-3c88-4e87-adac-d47131d0423d", + connection_id="connection_id", ) print(response) diff --git a/examples/v2/action-connection/GetActionConnection_2273648770.py b/examples/v2/action-connection/GetActionConnection_2273648770.py new file mode 100644 index 0000000000..1d21aa7b15 --- /dev/null +++ b/examples/v2/action-connection/GetActionConnection_2273648770.py @@ -0,0 +1,15 @@ +""" +Get an existing Action Connection returns "Successfully get Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.get_action_connection( + connection_id="cb460d51-3c88-4e87-adac-d47131d0423d", + ) + + print(response) diff --git a/examples/v2/action-connection/UpdateActionConnection.py b/examples/v2/action-connection/UpdateActionConnection.py index c17f4ca40d..7be4898e71 100644 --- a/examples/v2/action-connection/UpdateActionConnection.py +++ b/examples/v2/action-connection/UpdateActionConnection.py @@ -1,5 +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 """ from datadog_api_client import ApiClient, Configuration @@ -15,24 +15,24 @@ body = UpdateActionConnectionRequest( data=ActionConnectionDataUpdate( - type=ActionConnectionDataType.ACTION_CONNECTION, attributes=ActionConnectionAttributesUpdate( - name="Cassette Connection", integration=AWSIntegrationUpdate( - type=AWSIntegrationType.AWS, credentials=AWSAssumeRoleUpdate( + account_id="111222333444", + role="my-role", type=AWSAssumeRoleType.AWSASSUMEROLE, - role="MyRoleUpdated", - account_id="123456789123", ), + type=AWSIntegrationType.AWS, ), + name="My AWS Connection", ), + type=ActionConnectionDataType.ACTION_CONNECTION, ), ) configuration = Configuration() with ApiClient(configuration) as api_client: api_instance = ActionConnectionApi(api_client) - response = api_instance.update_action_connection(connection_id="cb460d51-3c88-4e87-adac-d47131d0423d", body=body) + response = api_instance.update_action_connection(connection_id="connection_id", body=body) print(response) diff --git a/examples/v2/action-connection/UpdateActionConnection_2280399724.py b/examples/v2/action-connection/UpdateActionConnection_2280399724.py new file mode 100644 index 0000000000..c17f4ca40d --- /dev/null +++ b/examples/v2/action-connection/UpdateActionConnection_2280399724.py @@ -0,0 +1,38 @@ +""" +Update an existing Action Connection returns "Successfully updated Action Connection" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi +from datadog_api_client.v2.model.action_connection_attributes_update import ActionConnectionAttributesUpdate +from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType +from datadog_api_client.v2.model.action_connection_data_update import ActionConnectionDataUpdate +from datadog_api_client.v2.model.aws_assume_role_type import AWSAssumeRoleType +from datadog_api_client.v2.model.aws_assume_role_update import AWSAssumeRoleUpdate +from datadog_api_client.v2.model.aws_integration_type import AWSIntegrationType +from datadog_api_client.v2.model.aws_integration_update import AWSIntegrationUpdate +from datadog_api_client.v2.model.update_action_connection_request import UpdateActionConnectionRequest + +body = UpdateActionConnectionRequest( + data=ActionConnectionDataUpdate( + type=ActionConnectionDataType.ACTION_CONNECTION, + attributes=ActionConnectionAttributesUpdate( + name="Cassette Connection", + integration=AWSIntegrationUpdate( + type=AWSIntegrationType.AWS, + credentials=AWSAssumeRoleUpdate( + type=AWSAssumeRoleType.AWSASSUMEROLE, + role="MyRoleUpdated", + account_id="123456789123", + ), + ), + ), + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.update_action_connection(connection_id="cb460d51-3c88-4e87-adac-d47131d0423d", body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/action_connection_api.py b/src/datadog_api_client/v2/api/action_connection_api.py index 5069f60efa..e6c469513c 100644 --- a/src/datadog_api_client/v2/api/action_connection_api.py +++ b/src/datadog_api_client/v2/api/action_connection_api.py @@ -16,14 +16,17 @@ class ActionConnectionApi: """ - 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. + 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 `_ + 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 + 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. """ def __init__(self, api_client=None): @@ -129,7 +132,7 @@ def create_action_connection( ) -> CreateActionConnectionResponse: """Create a new Action Connection. - Create a new Action Connection + Create a new Action Connection. :type body: CreateActionConnectionRequest :rtype: CreateActionConnectionResponse @@ -145,9 +148,9 @@ def delete_action_connection( ) -> None: """Delete an existing Action Connection. - Delete an existing Action Connection + Delete an existing Action Connection. - :param connection_id: The ID of the action connection + :param connection_id: The ID of the Action Connection. :type connection_id: str :rtype: None """ @@ -162,9 +165,9 @@ def get_action_connection( ) -> GetActionConnectionResponse: """Get an existing Action Connection. - Get an existing Action Connection + Get an existing Action Connection. - :param connection_id: The ID of the action connection + :param connection_id: The ID of the Action Connection. :type connection_id: str :rtype: GetActionConnectionResponse """ @@ -182,9 +185,9 @@ def update_action_connection( Update an existing Action Connection - :param connection_id: The ID of the action connection + :param connection_id: The ID of the Action Connection. :type connection_id: str - :param body: Update an existing Action Connection request body + :param body: Update an existing Action Connection request body. :type body: UpdateActionConnectionRequest :rtype: UpdateActionConnectionResponse """ diff --git a/src/datadog_api_client/v2/model/action_connection_attributes.py b/src/datadog_api_client/v2/model/action_connection_attributes.py index 5d7ec6e05b..905b60464a 100644 --- a/src/datadog_api_client/v2/model/action_connection_attributes.py +++ b/src/datadog_api_client/v2/model/action_connection_attributes.py @@ -41,7 +41,7 @@ def __init__( :param integration: The definition of ``ActionConnectionIntegration`` object. :type integration: ActionConnectionIntegration - :param name: Name of the connection + :param name: Name of the connection. :type name: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/action_connection_attributes_update.py b/src/datadog_api_client/v2/model/action_connection_attributes_update.py index e30d087e72..0da356f114 100644 --- a/src/datadog_api_client/v2/model/action_connection_attributes_update.py +++ b/src/datadog_api_client/v2/model/action_connection_attributes_update.py @@ -48,7 +48,7 @@ def __init__( :param integration: The definition of ``ActionConnectionIntegrationUpdate`` object. :type integration: ActionConnectionIntegrationUpdate, optional - :param name: Name of the connection + :param name: Name of the connection. :type name: str, optional """ if integration is not unset: diff --git a/src/datadog_api_client/v2/model/action_connection_data.py b/src/datadog_api_client/v2/model/action_connection_data.py index dfe4812701..59cfb82cbe 100644 --- a/src/datadog_api_client/v2/model/action_connection_data.py +++ b/src/datadog_api_client/v2/model/action_connection_data.py @@ -52,7 +52,7 @@ def __init__( :param attributes: The definition of ``ActionConnectionAttributes`` object. :type attributes: ActionConnectionAttributes - :param id: The connection identifier + :param id: The connection identifier. :type id: str, optional :param type: The definition of ``ActionConnectionDataType`` object. diff --git a/src/datadog_api_client/v2/model/action_connection_integration.py b/src/datadog_api_client/v2/model/action_connection_integration.py index 23301ee351..b47a77a81d 100644 --- a/src/datadog_api_client/v2/model/action_connection_integration.py +++ b/src/datadog_api_client/v2/model/action_connection_integration.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param type: The definition of `AWSIntegrationType` object. :type type: AWSIntegrationType - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/action_connection_integration_update.py b/src/datadog_api_client/v2/model/action_connection_integration_update.py index 20760fbd0c..02a8c32039 100644 --- a/src/datadog_api_client/v2/model/action_connection_integration_update.py +++ b/src/datadog_api_client/v2/model/action_connection_integration_update.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param type: The definition of `AWSIntegrationType` object. :type type: AWSIntegrationType - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str, optional """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/aws_assume_role.py b/src/datadog_api_client/v2/model/aws_assume_role.py index 7b5aa9e80f..8713fec8fa 100644 --- a/src/datadog_api_client/v2/model/aws_assume_role.py +++ b/src/datadog_api_client/v2/model/aws_assume_role.py @@ -58,16 +58,16 @@ def __init__( """ The definition of ``AWSAssumeRole`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str - :param external_id: External ID used to scope which connection can be used to assume the role + :param external_id: External ID used to scope which connection can be used to assume the role. :type external_id: str, optional - :param principal_id: AWS account that will assume the role + :param principal_id: AWS account that will assume the role. :type principal_id: str, optional - :param role: Role to assume + :param role: Role to assume. :type role: str :param type: The definition of ``AWSAssumeRoleType`` object. diff --git a/src/datadog_api_client/v2/model/aws_assume_role_update.py b/src/datadog_api_client/v2/model/aws_assume_role_update.py index fa9fd395a5..ca4398de10 100644 --- a/src/datadog_api_client/v2/model/aws_assume_role_update.py +++ b/src/datadog_api_client/v2/model/aws_assume_role_update.py @@ -51,7 +51,7 @@ def __init__( """ The definition of ``AWSAssumeRoleUpdate`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str, optional :param generate_new_external_id: The ``AWSAssumeRoleUpdate`` ``generate_new_external_id``. diff --git a/src/datadog_api_client/v2/model/aws_credentials.py b/src/datadog_api_client/v2/model/aws_credentials.py index 533c46f0b1..43c389ea59 100644 --- a/src/datadog_api_client/v2/model/aws_credentials.py +++ b/src/datadog_api_client/v2/model/aws_credentials.py @@ -15,16 +15,16 @@ def __init__(self, **kwargs): """ The definition of ``AWSCredentials`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str - :param external_id: External ID used to scope which connection can be used to assume the role + :param external_id: External ID used to scope which connection can be used to assume the role. :type external_id: str, optional - :param principal_id: AWS account that will assume the role + :param principal_id: AWS account that will assume the role. :type principal_id: str, optional - :param role: Role to assume + :param role: Role to assume. :type role: str :param type: The definition of `AWSAssumeRoleType` object. diff --git a/src/datadog_api_client/v2/model/aws_credentials_update.py b/src/datadog_api_client/v2/model/aws_credentials_update.py index 1339823687..2943c72032 100644 --- a/src/datadog_api_client/v2/model/aws_credentials_update.py +++ b/src/datadog_api_client/v2/model/aws_credentials_update.py @@ -15,7 +15,7 @@ def __init__(self, **kwargs): """ The definition of ``AWSCredentialsUpdate`` object. - :param account_id: AWS account the connection is created for + :param account_id: AWS account the connection is created for. :type account_id: str, optional :param generate_new_external_id: The `AWSAssumeRoleUpdate` `generate_new_external_id`. diff --git a/src/datadog_api_client/v2/model/create_action_connection_request.py b/src/datadog_api_client/v2/model/create_action_connection_request.py index 084cb61758..a331f3e541 100644 --- a/src/datadog_api_client/v2/model/create_action_connection_request.py +++ b/src/datadog_api_client/v2/model/create_action_connection_request.py @@ -30,7 +30,7 @@ def openapi_types(_): def __init__(self_, data: ActionConnectionData, **kwargs): """ - Request used to create an action connection. + Request used to create an Action Connection. :param data: Data related to the connection. :type data: ActionConnectionData diff --git a/src/datadog_api_client/v2/model/create_action_connection_response.py b/src/datadog_api_client/v2/model/create_action_connection_response.py index 1f062437da..09c1bf6243 100644 --- a/src/datadog_api_client/v2/model/create_action_connection_response.py +++ b/src/datadog_api_client/v2/model/create_action_connection_response.py @@ -32,7 +32,7 @@ def openapi_types(_): def __init__(self_, data: Union[ActionConnectionData, UnsetType] = unset, **kwargs): """ - The response for a created connection + The response for a created connection. :param data: Data related to the connection. :type data: ActionConnectionData, optional diff --git a/src/datadog_api_client/v2/model/get_action_connection_response.py b/src/datadog_api_client/v2/model/get_action_connection_response.py index 84f906ee83..8bb7b2bb4e 100644 --- a/src/datadog_api_client/v2/model/get_action_connection_response.py +++ b/src/datadog_api_client/v2/model/get_action_connection_response.py @@ -32,7 +32,7 @@ def openapi_types(_): def __init__(self_, data: Union[ActionConnectionData, UnsetType] = unset, **kwargs): """ - The response for found connection + The response for found connection. :param data: Data related to the connection. :type data: ActionConnectionData, optional diff --git a/src/datadog_api_client/v2/model/http_integration.py b/src/datadog_api_client/v2/model/http_integration.py index c74c849571..4147fcf18e 100644 --- a/src/datadog_api_client/v2/model/http_integration.py +++ b/src/datadog_api_client/v2/model/http_integration.py @@ -45,7 +45,7 @@ def __init__( """ The definition of ``HTTPIntegration`` object. - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str :param credentials: The definition of ``HTTPCredentials`` object. diff --git a/src/datadog_api_client/v2/model/http_integration_update.py b/src/datadog_api_client/v2/model/http_integration_update.py index 0cb70dd7e4..3c8fcd70e6 100644 --- a/src/datadog_api_client/v2/model/http_integration_update.py +++ b/src/datadog_api_client/v2/model/http_integration_update.py @@ -51,7 +51,7 @@ def __init__( """ The definition of ``HTTPIntegrationUpdate`` object. - :param base_url: Base HTTP url for the integration + :param base_url: Base HTTP url for the integration. :type base_url: str, optional :param credentials: The definition of ``HTTPCredentialsUpdate`` object. diff --git a/src/datadog_api_client/v2/model/update_action_connection_request.py b/src/datadog_api_client/v2/model/update_action_connection_request.py index e9d931ed6d..9396efa14a 100644 --- a/src/datadog_api_client/v2/model/update_action_connection_request.py +++ b/src/datadog_api_client/v2/model/update_action_connection_request.py @@ -30,7 +30,7 @@ def openapi_types(_): def __init__(self_, data: ActionConnectionDataUpdate, **kwargs): """ - Request used to update an action connection. + Request used to update an Action Connection. :param data: Data related to the connection update. :type data: ActionConnectionDataUpdate diff --git a/tests/v2/features/action_connection.feature b/tests/v2/features/action_connection.feature index f379fc1a00..dc8dab1fbd 100644 --- a/tests/v2/features/action_connection.feature +++ b/tests/v2/features/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.