diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a8908359f4..10caa0cc4a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -310,6 +310,13 @@ components: required: true schema: type: string + ConnectionGroupId: + description: The ID of the connection group. + in: path + name: connection_group_id + required: true + schema: + type: string ConnectionId: description: The ID of the action connection in: path @@ -12460,6 +12467,83 @@ components: - connectionId - label type: object + ConnectionDataAttributesResponse: + description: Attributes of an action connection. + properties: + acting_user_can_resolve: + description: Indicates if the acting user can resolve the connection. + example: true + type: boolean + created_at: + description: The creation timestamp of the connection. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + created_by: + $ref: '#/components/schemas/CreatedBy' + description: + description: The description of the connection. + example: A test connection for AWS integrations + type: string + external_secrets_manager: + description: External secrets manager configuration. + nullable: true + type: object + integration: + description: Integration configuration details. + example: + credentials: + account_id: '123456789012' + role: role + type: AWSAssumeRole + type: AWS + type: object + is_favorite: + description: Indicates if the connection is marked as favorite. + example: false + type: boolean + last_updated: + description: The last updated timestamp of the connection. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + name: + description: The name of the connection. + example: My Connection + type: string + private_actions_runner: + $ref: '#/components/schemas/PrivateActionsRunner' + runner_id: + description: The ID of the runner associated with the connection. + type: string + tags: + description: Tags associated with the connection. + items: + type: string + type: array + required: + - acting_user_can_resolve + - integration + - external_secrets_manager + - is_favorite + - name + type: object + ConnectionDataResponse: + description: Data object for an action connection. + properties: + attributes: + $ref: '#/components/schemas/ConnectionDataAttributesResponse' + id: + description: The unique identifier of the connection. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + type: string + type: + $ref: '#/components/schemas/ActionConnectionDataType' + required: + - id + - type + - attributes + type: object ConnectionEnv: description: A list of connections or connection groups used in the workflow. properties: @@ -12509,6 +12593,129 @@ components: - label - tags type: object + ConnectionGroupDataAttributesRequest: + description: Attributes for updating a connection group. + properties: + connections: + description: List of connection IDs associated with the connection group. + items: + type: string + type: array + description: + description: The description of the connection group. + example: An updated test connection group for AWS integrations + type: string + integration_type: + description: The integration type of the connection group. + type: string + name: + description: The name of the connection group. + example: My Connection Group Updated + type: string + policy_attributes: + description: Policy attributes for the connection group. + type: string + tag_keys: + description: Tag keys associated with the connection group. + items: + type: string + type: array + type: object + ConnectionGroupDataAttributesResponse: + description: Attributes of a connection group. + properties: + connections: + description: List of connection IDs associated with the connection group. + example: + - connection1 + - connection2 + items: + type: string + type: array + created_at: + description: The creation timestamp of the connection group. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + description: + description: The description of the connection group. + example: A test connection group for AWS integrations + type: string + integration_type: + description: The integration type of the connection group. + example: AWS + type: string + is_favorite: + description: Indicates if the connection group is marked as favorite. + example: false + type: boolean + last_updated_at: + description: The last updated timestamp of the connection group. + example: '1970-01-01T00:02:03.000000456Z' + format: date-time + type: string + name: + description: The name of the connection group. + example: My Connection Group + type: string + tag_keys: + description: Tag keys associated with the connection group. + example: + - env + - service + items: + type: string + type: array + required: + - name + - tag_keys + - integration_type + - created_at + - last_updated_at + - is_favorite + type: object + ConnectionGroupDataRequest: + description: Data object for updating a connection group. + properties: + attributes: + $ref: '#/components/schemas/ConnectionGroupDataAttributesRequest' + type: + $ref: '#/components/schemas/ConnectionGroupType' + required: + - type + type: object + ConnectionGroupDataResponse: + description: Data object for a connection group. + properties: + attributes: + $ref: '#/components/schemas/ConnectionGroupDataAttributesResponse' + id: + description: The unique identifier of the connection group. + example: afda2727-c55e-4258-b4c6-e170c32be1dd + type: string + relationships: + $ref: '#/components/schemas/ConnectionGroupRelationships' + type: + $ref: '#/components/schemas/ConnectionGroupType' + required: + - id + - type + - attributes + type: object + ConnectionGroupRelationships: + description: Relationships for a connection group. + properties: + created_by: + $ref: '#/components/schemas/CreatedByRelationship' + type: object + ConnectionGroupType: + description: The definition of `ConnectionGroupType` object. + enum: + - connection_group + example: connection_group + type: string + x-enum-varnames: + - CONNECTION_GROUP ConnectionsPagePagination: description: Page-based pagination metadata. properties: @@ -15376,6 +15583,37 @@ components: required: - data type: object + CreatedBy: + description: Information about the user who created the resource. + properties: + id: + description: The unique identifier of the user. + example: '' + type: string + required: + - id + type: object + CreatedByRelationship: + description: Relationship to the user who created the resource. + properties: + data: + $ref: '#/components/schemas/CreatedByRelationshipData' + type: object + CreatedByRelationshipData: + description: Data for the created_by relationship. + properties: + id: + description: The unique identifier of the user. + example: 2a10fb69-5ee6-47c8-96f5-d30e18bf883d + type: string + type: + description: The type of the relationship. + example: created_by + type: string + required: + - id + - type + type: object Creator: description: Creator of the object. properties: @@ -31020,6 +31258,21 @@ components: type: string type: array type: object + IntegrationCounts: + description: Count of integrations by type. + properties: + filtered_count: + description: The filtered count of integrations. + format: int64 + type: integer + integration_type: + description: The integration type. + type: string + total_count: + description: The total count of integrations. + format: int64 + type: integer + type: object IntegrationIncident: description: Incident integration settings properties: @@ -33137,6 +33390,42 @@ components: format: int64 type: integer type: object + ListActionConnectionsResponse: + description: Response for listing action connections. + properties: + data: + description: An array of action connections. + items: + $ref: '#/components/schemas/ConnectionDataResponse' + type: array + meta: + $ref: '#/components/schemas/ListActionConnectionsResponseMeta' + required: + - data + type: object + ListActionConnectionsResponseMeta: + description: Metadata for the list connections response. + properties: + integration_counts: + description: Count of integrations by type. + items: + $ref: '#/components/schemas/IntegrationCounts' + nullable: true + type: array + total: + description: The total number of connections. + example: 1 + format: int64 + type: integer + total_filtered: + description: The total number of connections that match the specified filters. + example: 1 + format: int64 + type: integer + required: + - total + - total_filtered + type: object ListAppKeyRegistrationsResponse: description: A paginated list of app key registrations. properties: @@ -33284,6 +33573,43 @@ components: required: - data type: object + ListConnectionGroupsResponse: + description: Response for listing connection groups. + properties: + data: + description: An array of connection groups. + items: + $ref: '#/components/schemas/ConnectionGroupDataResponse' + type: array + meta: + $ref: '#/components/schemas/ListConnectionGroupsResponseMeta' + required: + - data + type: object + ListConnectionGroupsResponseMeta: + description: Metadata for the list connection groups response. + properties: + integration_counts: + description: Count of integrations by type. + items: + $ref: '#/components/schemas/IntegrationCounts' + nullable: true + type: array + total: + description: The total number of connection groups. + example: 1 + format: int64 + type: integer + total_filtered: + description: The total number of connection groups that match the specified + filters. + example: 1 + format: int64 + type: integer + required: + - total + - total_filtered + type: object ListConnectionsResponse: example: data: @@ -45468,6 +45794,16 @@ components: required: - type type: object + PrivateActionsRunner: + description: Information about the private actions runner. + properties: + id: + description: The unique identifier of the runner. + example: '' + type: string + required: + - id + type: object ProcessSummariesMeta: description: Response metadata object. properties: @@ -64252,6 +64588,22 @@ components: description: The display name of the datastore. type: string type: object + UpdateConnectionGroupRequest: + description: Request for updating a connection group. + properties: + data: + $ref: '#/components/schemas/ConnectionGroupDataRequest' + required: + - data + type: object + UpdateConnectionGroupResponse: + description: Response for updating a connection group. + properties: + data: + $ref: '#/components/schemas/ConnectionGroupDataResponse' + required: + - data + type: object UpdateConnectionRequest: example: data: @@ -68864,6 +69216,125 @@ paths: - user_app_keys - service_account_write /api/v2/actions/connections: + get: + description: List all action connections for the organization. This endpoint + supports filtering by integration type, tags, environment, and search strings. + Pagination is supported using page size and page number parameters. + operationId: ListActionConnections + parameters: + - description: The number of connections to return per page. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 1 + format: int64 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 10 + format: int64 + type: integer + - description: Filter by integration type. + explode: true + in: query + name: filter[integration] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by tags. + explode: true + in: query + name: filter[tags] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by environment. + in: query + name: filter[environment] + required: false + schema: + type: string + - description: Filter by connection IDs. + explode: true + in: query + name: filter[connection_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by creator IDs. + explode: true + in: query + name: filter[creator_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Search string to filter connections. + in: query + name: filter[search] + required: false + schema: + type: string + - description: Sort parameters. + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListActionConnectionsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: List action connections + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Create a new Action Connection. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). @@ -68902,6 +69373,176 @@ paths: summary: Create a new Action Connection tags: - Action Connection + /api/v2/actions/connections/groups: + get: + description: List all connection groups for the organization. This endpoint + supports filtering by integration type, environment, connection group IDs, + and search strings. Pagination is supported using page size and page number + parameters. + operationId: ListConnectionGroups + parameters: + - description: The number of connection groups to return per page. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 1 + format: int64 + type: integer + - description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 10 + format: int64 + type: integer + - description: Filter by integration type. + explode: true + in: query + name: filter[integration] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by environment. + in: query + name: filter[environment] + required: false + schema: + type: string + - description: Filter by connection group IDs. + explode: true + in: query + name: filter[connection_group_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Filter by creator ID. + in: query + name: filter[creator_id] + required: false + schema: + type: string + - description: Filter by creator IDs. + explode: true + in: query + name: filter[creator_ids] + required: false + schema: + items: + type: string + type: array + style: form + - description: Search string to filter connection groups. + in: query + name: filter[search] + required: false + schema: + type: string + - description: Sort parameters. + explode: true + in: query + name: sort + required: false + schema: + items: + type: string + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListConnectionGroupsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: List connection groups + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/actions/connections/groups/{connection_group_id}: + patch: + description: Update an existing connection group by ID. This endpoint allows + updating the name, description, tag keys, integration type, connections, and + policy attributes of a connection group. + operationId: UpdateConnectionGroup + parameters: + - $ref: '#/components/parameters/ConnectionGroupId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionGroupRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionGroupResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Update a connection group + tags: + - Action Connection + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/actions/connections/{connection_id}: delete: description: Delete an existing Action Connection. This API requires a [registered diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index fe0c2aa3ef..1454d46770 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -4953,6 +4953,20 @@ datadog\_api\_client.v2.model.connection module :members: :show-inheritance: +datadog\_api\_client.v2.model.connection\_data\_attributes\_response module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_data_attributes_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.connection\_data\_response module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_data_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.connection\_env module ---------------------------------------------------- @@ -4974,6 +4988,48 @@ datadog\_api\_client.v2.model.connection\_group module :members: :show-inheritance: +datadog\_api\_client.v2.model.connection\_group\_data\_attributes\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_group_data_attributes_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.connection\_group\_data\_attributes\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_group_data_attributes_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.connection\_group\_data\_request module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_group_data_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.connection\_group\_data\_response module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_group_data_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.connection\_group\_relationships module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.connection_group_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.connection\_group\_type module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.connection_group_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.connections\_page\_pagination module ------------------------------------------------------------------ @@ -6213,6 +6269,27 @@ datadog\_api\_client.v2.model.create\_workflow\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.created\_by module +------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.created_by + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.created\_by\_relationship module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.created_by_relationship + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.created\_by\_relationship\_data module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.created_by_relationship_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.creator module -------------------------------------------- @@ -13122,6 +13199,13 @@ datadog\_api\_client.v2.model.intake\_payload\_accepted module :members: :show-inheritance: +datadog\_api\_client.v2.model.integration\_counts module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.integration_counts + :members: + :show-inheritance: + datadog\_api\_client.v2.model.integration\_incident module ---------------------------------------------------------- @@ -14165,6 +14249,20 @@ datadog\_api\_client.v2.model.links module :members: :show-inheritance: +datadog\_api\_client.v2.model.list\_action\_connections\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.list_action_connections_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.list\_action\_connections\_response\_meta module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.list_action_connections_response_meta + :members: + :show-inheritance: + datadog\_api\_client.v2.model.list\_apis\_response module --------------------------------------------------------- @@ -14270,6 +14368,20 @@ datadog\_api\_client.v2.model.list\_assets\_sbo\_ms\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.list\_connection\_groups\_response module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.list_connection_groups_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.list\_connection\_groups\_response\_meta module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.list_connection_groups_response_meta + :members: + :show-inheritance: + datadog\_api\_client.v2.model.list\_connections\_response module ---------------------------------------------------------------- @@ -19751,6 +19863,13 @@ datadog\_api\_client.v2.model.preview\_entity\_response\_data module :members: :show-inheritance: +datadog\_api\_client.v2.model.private\_actions\_runner module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.private_actions_runner + :members: + :show-inheritance: + datadog\_api\_client.v2.model.process\_summaries\_meta module ------------------------------------------------------------- @@ -28284,6 +28403,20 @@ datadog\_api\_client.v2.model.update\_apps\_datastore\_request\_data\_attributes :members: :show-inheritance: +datadog\_api\_client.v2.model.update\_connection\_group\_request module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.update_connection_group_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.update\_connection\_group\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.update_connection_group_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.update\_connection\_request module ---------------------------------------------------------------- diff --git a/examples/v2/action-connection/ListActionConnections.py b/examples/v2/action-connection/ListActionConnections.py new file mode 100644 index 0000000000..3782fa03ef --- /dev/null +++ b/examples/v2/action-connection/ListActionConnections.py @@ -0,0 +1,14 @@ +""" +List action connections returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi + +configuration = Configuration() +configuration.unstable_operations["list_action_connections"] = True +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.list_action_connections() + + print(response) diff --git a/examples/v2/action-connection/ListConnectionGroups.py b/examples/v2/action-connection/ListConnectionGroups.py new file mode 100644 index 0000000000..1659c2b30d --- /dev/null +++ b/examples/v2/action-connection/ListConnectionGroups.py @@ -0,0 +1,14 @@ +""" +List connection groups returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi + +configuration = Configuration() +configuration.unstable_operations["list_connection_groups"] = True +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.list_connection_groups() + + print(response) diff --git a/examples/v2/action-connection/UpdateConnectionGroup.py b/examples/v2/action-connection/UpdateConnectionGroup.py new file mode 100644 index 0000000000..aadedbf2b6 --- /dev/null +++ b/examples/v2/action-connection/UpdateConnectionGroup.py @@ -0,0 +1,30 @@ +""" +Update a connection group returns "OK" 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.connection_group_data_attributes_request import ConnectionGroupDataAttributesRequest +from datadog_api_client.v2.model.connection_group_data_request import ConnectionGroupDataRequest +from datadog_api_client.v2.model.connection_group_type import ConnectionGroupType +from datadog_api_client.v2.model.update_connection_group_request import UpdateConnectionGroupRequest + +body = UpdateConnectionGroupRequest( + data=ConnectionGroupDataRequest( + attributes=ConnectionGroupDataAttributesRequest( + connections=[], + description="An updated test connection group for AWS integrations", + name="My Connection Group Updated", + tag_keys=[], + ), + type=ConnectionGroupType.CONNECTION_GROUP, + ), +) + +configuration = Configuration() +configuration.unstable_operations["update_connection_group"] = True +with ApiClient(configuration) as api_client: + api_instance = ActionConnectionApi(api_client) + response = api_instance.update_connection_group(connection_group_id="connection_group_id", body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index f4ec0cd2a5..cf8ccab929 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -261,6 +261,9 @@ def __init__( "v2.list_fleet_schedules": False, "v2.trigger_fleet_schedule": False, "v2.update_fleet_schedule": False, + "v2.list_action_connections": False, + "v2.list_connection_groups": False, + "v2.update_connection_group": False, "v2.create_open_api": False, "v2.delete_open_api": False, "v2.get_open_api": False, 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 74582c0f75..43622d7d28 100644 --- a/src/datadog_api_client/v2/api/action_connection_api.py +++ b/src/datadog_api_client/v2/api/action_connection_api.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict, Union +from typing import Any, Dict, List, Union from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration @@ -14,8 +14,12 @@ from datadog_api_client.v2.model.list_app_key_registrations_response import ListAppKeyRegistrationsResponse from datadog_api_client.v2.model.get_app_key_registration_response import GetAppKeyRegistrationResponse from datadog_api_client.v2.model.register_app_key_response import RegisterAppKeyResponse +from datadog_api_client.v2.model.list_action_connections_response import ListActionConnectionsResponse from datadog_api_client.v2.model.create_action_connection_response import CreateActionConnectionResponse from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest +from datadog_api_client.v2.model.list_connection_groups_response import ListConnectionGroupsResponse +from datadog_api_client.v2.model.update_connection_group_response import UpdateConnectionGroupResponse +from datadog_api_client.v2.model.update_connection_group_request import UpdateConnectionGroupRequest from datadog_api_client.v2.model.get_action_connection_response import GetActionConnectionResponse from datadog_api_client.v2.model.update_action_connection_response import UpdateActionConnectionResponse from datadog_api_client.v2.model.update_action_connection_request import UpdateActionConnectionRequest @@ -127,6 +131,73 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_action_connections_endpoint = _Endpoint( + settings={ + "response_type": (ListActionConnectionsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/actions/connections", + "operation_id": "list_action_connections", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page_size": { + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + "page_number": { + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + "filter_integration": { + "openapi_types": ([str],), + "attribute": "filter[integration]", + "location": "query", + "collection_format": "multi", + }, + "filter_tags": { + "openapi_types": ([str],), + "attribute": "filter[tags]", + "location": "query", + "collection_format": "multi", + }, + "filter_environment": { + "openapi_types": (str,), + "attribute": "filter[environment]", + "location": "query", + }, + "filter_connection_ids": { + "openapi_types": ([str],), + "attribute": "filter[connection_ids]", + "location": "query", + "collection_format": "multi", + }, + "filter_creator_ids": { + "openapi_types": ([str],), + "attribute": "filter[creator_ids]", + "location": "query", + "collection_format": "multi", + }, + "filter_search": { + "openapi_types": (str,), + "attribute": "filter[search]", + "location": "query", + }, + "sort": { + "openapi_types": ([str],), + "attribute": "sort", + "location": "query", + "collection_format": "multi", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_app_key_registrations_endpoint = _Endpoint( settings={ "response_type": (ListAppKeyRegistrationsResponse,), @@ -154,6 +225,72 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_connection_groups_endpoint = _Endpoint( + settings={ + "response_type": (ListConnectionGroupsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/actions/connections/groups", + "operation_id": "list_connection_groups", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page_size": { + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + "page_number": { + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + "filter_integration": { + "openapi_types": ([str],), + "attribute": "filter[integration]", + "location": "query", + "collection_format": "multi", + }, + "filter_environment": { + "openapi_types": (str,), + "attribute": "filter[environment]", + "location": "query", + }, + "filter_connection_group_ids": { + "openapi_types": ([str],), + "attribute": "filter[connection_group_ids]", + "location": "query", + "collection_format": "multi", + }, + "filter_creator_id": { + "openapi_types": (str,), + "attribute": "filter[creator_id]", + "location": "query", + }, + "filter_creator_ids": { + "openapi_types": ([str],), + "attribute": "filter[creator_ids]", + "location": "query", + "collection_format": "multi", + }, + "filter_search": { + "openapi_types": (str,), + "attribute": "filter[search]", + "location": "query", + }, + "sort": { + "openapi_types": ([str],), + "attribute": "sort", + "location": "query", + "collection_format": "multi", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._register_app_key_endpoint = _Endpoint( settings={ "response_type": (RegisterAppKeyResponse,), @@ -226,6 +363,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_connection_group_endpoint = _Endpoint( + settings={ + "response_type": (UpdateConnectionGroupResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/actions/connections/groups/{connection_group_id}", + "operation_id": "update_connection_group", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "connection_group_id": { + "required": True, + "openapi_types": (str,), + "attribute": "connection_group_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (UpdateConnectionGroupRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + def create_action_connection( self, body: CreateActionConnectionRequest, @@ -293,6 +456,73 @@ def get_app_key_registration( return self._get_app_key_registration_endpoint.call_with_http_info(**kwargs) + def list_action_connections( + self, + *, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + filter_integration: Union[List[str], UnsetType] = unset, + filter_tags: Union[List[str], UnsetType] = unset, + filter_environment: Union[str, UnsetType] = unset, + filter_connection_ids: Union[List[str], UnsetType] = unset, + filter_creator_ids: Union[List[str], UnsetType] = unset, + filter_search: Union[str, UnsetType] = unset, + sort: Union[List[str], UnsetType] = unset, + ) -> ListActionConnectionsResponse: + """List action connections. + + List all action connections for the organization. This endpoint supports filtering by integration type, tags, environment, and search strings. Pagination is supported using page size and page number parameters. + + :param page_size: The number of connections to return per page. + :type page_size: int, optional + :param page_number: The page number to return. + :type page_number: int, optional + :param filter_integration: Filter by integration type. + :type filter_integration: [str], optional + :param filter_tags: Filter by tags. + :type filter_tags: [str], optional + :param filter_environment: Filter by environment. + :type filter_environment: str, optional + :param filter_connection_ids: Filter by connection IDs. + :type filter_connection_ids: [str], optional + :param filter_creator_ids: Filter by creator IDs. + :type filter_creator_ids: [str], optional + :param filter_search: Search string to filter connections. + :type filter_search: str, optional + :param sort: Sort parameters. + :type sort: [str], optional + :rtype: ListActionConnectionsResponse + """ + kwargs: Dict[str, Any] = {} + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + + if filter_integration is not unset: + kwargs["filter_integration"] = filter_integration + + if filter_tags is not unset: + kwargs["filter_tags"] = filter_tags + + if filter_environment is not unset: + kwargs["filter_environment"] = filter_environment + + if filter_connection_ids is not unset: + kwargs["filter_connection_ids"] = filter_connection_ids + + if filter_creator_ids is not unset: + kwargs["filter_creator_ids"] = filter_creator_ids + + if filter_search is not unset: + kwargs["filter_search"] = filter_search + + if sort is not unset: + kwargs["sort"] = sort + + return self._list_action_connections_endpoint.call_with_http_info(**kwargs) + def list_app_key_registrations( self, *, @@ -318,6 +548,73 @@ def list_app_key_registrations( return self._list_app_key_registrations_endpoint.call_with_http_info(**kwargs) + def list_connection_groups( + self, + *, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + filter_integration: Union[List[str], UnsetType] = unset, + filter_environment: Union[str, UnsetType] = unset, + filter_connection_group_ids: Union[List[str], UnsetType] = unset, + filter_creator_id: Union[str, UnsetType] = unset, + filter_creator_ids: Union[List[str], UnsetType] = unset, + filter_search: Union[str, UnsetType] = unset, + sort: Union[List[str], UnsetType] = unset, + ) -> ListConnectionGroupsResponse: + """List connection groups. + + List all connection groups for the organization. This endpoint supports filtering by integration type, environment, connection group IDs, and search strings. Pagination is supported using page size and page number parameters. + + :param page_size: The number of connection groups to return per page. + :type page_size: int, optional + :param page_number: The page number to return. + :type page_number: int, optional + :param filter_integration: Filter by integration type. + :type filter_integration: [str], optional + :param filter_environment: Filter by environment. + :type filter_environment: str, optional + :param filter_connection_group_ids: Filter by connection group IDs. + :type filter_connection_group_ids: [str], optional + :param filter_creator_id: Filter by creator ID. + :type filter_creator_id: str, optional + :param filter_creator_ids: Filter by creator IDs. + :type filter_creator_ids: [str], optional + :param filter_search: Search string to filter connection groups. + :type filter_search: str, optional + :param sort: Sort parameters. + :type sort: [str], optional + :rtype: ListConnectionGroupsResponse + """ + kwargs: Dict[str, Any] = {} + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + + if filter_integration is not unset: + kwargs["filter_integration"] = filter_integration + + if filter_environment is not unset: + kwargs["filter_environment"] = filter_environment + + if filter_connection_group_ids is not unset: + kwargs["filter_connection_group_ids"] = filter_connection_group_ids + + if filter_creator_id is not unset: + kwargs["filter_creator_id"] = filter_creator_id + + if filter_creator_ids is not unset: + kwargs["filter_creator_ids"] = filter_creator_ids + + if filter_search is not unset: + kwargs["filter_search"] = filter_search + + if sort is not unset: + kwargs["sort"] = sort + + return self._list_connection_groups_endpoint.call_with_http_info(**kwargs) + def register_app_key( self, app_key_id: str, @@ -373,3 +670,24 @@ def update_action_connection( kwargs["body"] = body return self._update_action_connection_endpoint.call_with_http_info(**kwargs) + + def update_connection_group( + self, + connection_group_id: str, + body: UpdateConnectionGroupRequest, + ) -> UpdateConnectionGroupResponse: + """Update a connection group. + + Update an existing connection group by ID. This endpoint allows updating the name, description, tag keys, integration type, connections, and policy attributes of a connection group. + + :param connection_group_id: The ID of the connection group. + :type connection_group_id: str + :type body: UpdateConnectionGroupRequest + :rtype: UpdateConnectionGroupResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["connection_group_id"] = connection_group_id + + kwargs["body"] = body + + return self._update_connection_group_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/model/connection_data_attributes_response.py b/src/datadog_api_client/v2/model/connection_data_attributes_response.py new file mode 100644 index 0000000000..cd2b34d82a --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_data_attributes_response.py @@ -0,0 +1,134 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.created_by import CreatedBy + from datadog_api_client.v2.model.private_actions_runner import PrivateActionsRunner + + +class ConnectionDataAttributesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.created_by import CreatedBy + from datadog_api_client.v2.model.private_actions_runner import PrivateActionsRunner + + return { + "acting_user_can_resolve": (bool,), + "created_at": (datetime,), + "created_by": (CreatedBy,), + "description": (str,), + "external_secrets_manager": (dict, none_type), + "integration": (dict,), + "is_favorite": (bool,), + "last_updated": (datetime,), + "name": (str,), + "private_actions_runner": (PrivateActionsRunner,), + "runner_id": (str,), + "tags": ([str],), + } + + attribute_map = { + "acting_user_can_resolve": "acting_user_can_resolve", + "created_at": "created_at", + "created_by": "created_by", + "description": "description", + "external_secrets_manager": "external_secrets_manager", + "integration": "integration", + "is_favorite": "is_favorite", + "last_updated": "last_updated", + "name": "name", + "private_actions_runner": "private_actions_runner", + "runner_id": "runner_id", + "tags": "tags", + } + + def __init__( + self_, + acting_user_can_resolve: bool, + external_secrets_manager: Union[dict, none_type], + integration: dict, + is_favorite: bool, + name: str, + created_at: Union[datetime, UnsetType] = unset, + created_by: Union[CreatedBy, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + last_updated: Union[datetime, UnsetType] = unset, + private_actions_runner: Union[PrivateActionsRunner, UnsetType] = unset, + runner_id: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an action connection. + + :param acting_user_can_resolve: Indicates if the acting user can resolve the connection. + :type acting_user_can_resolve: bool + + :param created_at: The creation timestamp of the connection. + :type created_at: datetime, optional + + :param created_by: Information about the user who created the resource. + :type created_by: CreatedBy, optional + + :param description: The description of the connection. + :type description: str, optional + + :param external_secrets_manager: External secrets manager configuration. + :type external_secrets_manager: dict, none_type + + :param integration: Integration configuration details. + :type integration: dict + + :param is_favorite: Indicates if the connection is marked as favorite. + :type is_favorite: bool + + :param last_updated: The last updated timestamp of the connection. + :type last_updated: datetime, optional + + :param name: The name of the connection. + :type name: str + + :param private_actions_runner: Information about the private actions runner. + :type private_actions_runner: PrivateActionsRunner, optional + + :param runner_id: The ID of the runner associated with the connection. + :type runner_id: str, optional + + :param tags: Tags associated with the connection. + :type tags: [str], optional + """ + if created_at is not unset: + kwargs["created_at"] = created_at + if created_by is not unset: + kwargs["created_by"] = created_by + if description is not unset: + kwargs["description"] = description + if last_updated is not unset: + kwargs["last_updated"] = last_updated + if private_actions_runner is not unset: + kwargs["private_actions_runner"] = private_actions_runner + if runner_id is not unset: + kwargs["runner_id"] = runner_id + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.acting_user_can_resolve = acting_user_can_resolve + self_.external_secrets_manager = external_secrets_manager + self_.integration = integration + self_.is_favorite = is_favorite + self_.name = name diff --git a/src/datadog_api_client/v2/model/connection_data_response.py b/src/datadog_api_client/v2/model/connection_data_response.py new file mode 100644 index 0000000000..d841922cca --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_data_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_data_attributes_response import ConnectionDataAttributesResponse + from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType + + +class ConnectionDataResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_data_attributes_response import ConnectionDataAttributesResponse + from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType + + return { + "attributes": (ConnectionDataAttributesResponse,), + "id": (str,), + "type": (ActionConnectionDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, attributes: ConnectionDataAttributesResponse, id: str, type: ActionConnectionDataType, **kwargs + ): + """ + Data object for an action connection. + + :param attributes: Attributes of an action connection. + :type attributes: ConnectionDataAttributesResponse + + :param id: The unique identifier of the connection. + :type id: str + + :param type: The definition of ``ActionConnectionDataType`` object. + :type type: ActionConnectionDataType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/connection_group_data_attributes_request.py b/src/datadog_api_client/v2/model/connection_group_data_attributes_request.py new file mode 100644 index 0000000000..65ff1fe646 --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_group_data_attributes_request.py @@ -0,0 +1,80 @@ +# 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. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ConnectionGroupDataAttributesRequest(ModelNormal): + @cached_property + def openapi_types(_): + return { + "connections": ([str],), + "description": (str,), + "integration_type": (str,), + "name": (str,), + "policy_attributes": (str,), + "tag_keys": ([str],), + } + + attribute_map = { + "connections": "connections", + "description": "description", + "integration_type": "integration_type", + "name": "name", + "policy_attributes": "policy_attributes", + "tag_keys": "tag_keys", + } + + def __init__( + self_, + connections: Union[List[str], UnsetType] = unset, + description: Union[str, UnsetType] = unset, + integration_type: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + policy_attributes: Union[str, UnsetType] = unset, + tag_keys: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Attributes for updating a connection group. + + :param connections: List of connection IDs associated with the connection group. + :type connections: [str], optional + + :param description: The description of the connection group. + :type description: str, optional + + :param integration_type: The integration type of the connection group. + :type integration_type: str, optional + + :param name: The name of the connection group. + :type name: str, optional + + :param policy_attributes: Policy attributes for the connection group. + :type policy_attributes: str, optional + + :param tag_keys: Tag keys associated with the connection group. + :type tag_keys: [str], optional + """ + if connections is not unset: + kwargs["connections"] = connections + if description is not unset: + kwargs["description"] = description + if integration_type is not unset: + kwargs["integration_type"] = integration_type + if name is not unset: + kwargs["name"] = name + if policy_attributes is not unset: + kwargs["policy_attributes"] = policy_attributes + if tag_keys is not unset: + kwargs["tag_keys"] = tag_keys + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/connection_group_data_attributes_response.py b/src/datadog_api_client/v2/model/connection_group_data_attributes_response.py new file mode 100644 index 0000000000..a1248b8759 --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_group_data_attributes_response.py @@ -0,0 +1,92 @@ +# 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. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +class ConnectionGroupDataAttributesResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "connections": ([str],), + "created_at": (datetime,), + "description": (str,), + "integration_type": (str,), + "is_favorite": (bool,), + "last_updated_at": (datetime,), + "name": (str,), + "tag_keys": ([str],), + } + + attribute_map = { + "connections": "connections", + "created_at": "created_at", + "description": "description", + "integration_type": "integration_type", + "is_favorite": "is_favorite", + "last_updated_at": "last_updated_at", + "name": "name", + "tag_keys": "tag_keys", + } + + def __init__( + self_, + created_at: datetime, + integration_type: str, + is_favorite: bool, + last_updated_at: datetime, + name: str, + tag_keys: List[str], + connections: Union[List[str], UnsetType] = unset, + description: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a connection group. + + :param connections: List of connection IDs associated with the connection group. + :type connections: [str], optional + + :param created_at: The creation timestamp of the connection group. + :type created_at: datetime + + :param description: The description of the connection group. + :type description: str, optional + + :param integration_type: The integration type of the connection group. + :type integration_type: str + + :param is_favorite: Indicates if the connection group is marked as favorite. + :type is_favorite: bool + + :param last_updated_at: The last updated timestamp of the connection group. + :type last_updated_at: datetime + + :param name: The name of the connection group. + :type name: str + + :param tag_keys: Tag keys associated with the connection group. + :type tag_keys: [str] + """ + if connections is not unset: + kwargs["connections"] = connections + if description is not unset: + kwargs["description"] = description + super().__init__(kwargs) + + self_.created_at = created_at + self_.integration_type = integration_type + self_.is_favorite = is_favorite + self_.last_updated_at = last_updated_at + self_.name = name + self_.tag_keys = tag_keys diff --git a/src/datadog_api_client/v2/model/connection_group_data_request.py b/src/datadog_api_client/v2/model/connection_group_data_request.py new file mode 100644 index 0000000000..1c2313a35c --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_group_data_request.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_group_data_attributes_request import ( + ConnectionGroupDataAttributesRequest, + ) + from datadog_api_client.v2.model.connection_group_type import ConnectionGroupType + + +class ConnectionGroupDataRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_group_data_attributes_request import ( + ConnectionGroupDataAttributesRequest, + ) + from datadog_api_client.v2.model.connection_group_type import ConnectionGroupType + + return { + "attributes": (ConnectionGroupDataAttributesRequest,), + "type": (ConnectionGroupType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + type: ConnectionGroupType, + attributes: Union[ConnectionGroupDataAttributesRequest, UnsetType] = unset, + **kwargs, + ): + """ + Data object for updating a connection group. + + :param attributes: Attributes for updating a connection group. + :type attributes: ConnectionGroupDataAttributesRequest, optional + + :param type: The definition of ``ConnectionGroupType`` object. + :type type: ConnectionGroupType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/connection_group_data_response.py b/src/datadog_api_client/v2/model/connection_group_data_response.py new file mode 100644 index 0000000000..279d08e146 --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_group_data_response.py @@ -0,0 +1,76 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_group_data_attributes_response import ( + ConnectionGroupDataAttributesResponse, + ) + from datadog_api_client.v2.model.connection_group_relationships import ConnectionGroupRelationships + from datadog_api_client.v2.model.connection_group_type import ConnectionGroupType + + +class ConnectionGroupDataResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_group_data_attributes_response import ( + ConnectionGroupDataAttributesResponse, + ) + from datadog_api_client.v2.model.connection_group_relationships import ConnectionGroupRelationships + from datadog_api_client.v2.model.connection_group_type import ConnectionGroupType + + return { + "attributes": (ConnectionGroupDataAttributesResponse,), + "id": (str,), + "relationships": (ConnectionGroupRelationships,), + "type": (ConnectionGroupType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: ConnectionGroupDataAttributesResponse, + id: str, + type: ConnectionGroupType, + relationships: Union[ConnectionGroupRelationships, UnsetType] = unset, + **kwargs, + ): + """ + Data object for a connection group. + + :param attributes: Attributes of a connection group. + :type attributes: ConnectionGroupDataAttributesResponse + + :param id: The unique identifier of the connection group. + :type id: str + + :param relationships: Relationships for a connection group. + :type relationships: ConnectionGroupRelationships, optional + + :param type: The definition of ``ConnectionGroupType`` object. + :type type: ConnectionGroupType + """ + if relationships is not unset: + kwargs["relationships"] = relationships + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/connection_group_relationships.py b/src/datadog_api_client/v2/model/connection_group_relationships.py new file mode 100644 index 0000000000..22dcbad13e --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_group_relationships.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.created_by_relationship import CreatedByRelationship + + +class ConnectionGroupRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.created_by_relationship import CreatedByRelationship + + return { + "created_by": (CreatedByRelationship,), + } + + attribute_map = { + "created_by": "created_by", + } + + def __init__(self_, created_by: Union[CreatedByRelationship, UnsetType] = unset, **kwargs): + """ + Relationships for a connection group. + + :param created_by: Relationship to the user who created the resource. + :type created_by: CreatedByRelationship, optional + """ + if created_by is not unset: + kwargs["created_by"] = created_by + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/connection_group_type.py b/src/datadog_api_client/v2/model/connection_group_type.py new file mode 100644 index 0000000000..8c71aed9f9 --- /dev/null +++ b/src/datadog_api_client/v2/model/connection_group_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ConnectionGroupType(ModelSimple): + """ + The definition of `ConnectionGroupType` object. + + :param value: If omitted defaults to "connection_group". Must be one of ["connection_group"]. + :type value: str + """ + + allowed_values = { + "connection_group", + } + CONNECTION_GROUP: ClassVar["ConnectionGroupType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ConnectionGroupType.CONNECTION_GROUP = ConnectionGroupType("connection_group") diff --git a/src/datadog_api_client/v2/model/created_by.py b/src/datadog_api_client/v2/model/created_by.py new file mode 100644 index 0000000000..a38f791566 --- /dev/null +++ b/src/datadog_api_client/v2/model/created_by.py @@ -0,0 +1,33 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreatedBy(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + } + + attribute_map = { + "id": "id", + } + + def __init__(self_, id: str, **kwargs): + """ + Information about the user who created the resource. + + :param id: The unique identifier of the user. + :type id: str + """ + super().__init__(kwargs) + + self_.id = id diff --git a/src/datadog_api_client/v2/model/created_by_relationship.py b/src/datadog_api_client/v2/model/created_by_relationship.py new file mode 100644 index 0000000000..9bc8987db6 --- /dev/null +++ b/src/datadog_api_client/v2/model/created_by_relationship.py @@ -0,0 +1,42 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.created_by_relationship_data import CreatedByRelationshipData + + +class CreatedByRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.created_by_relationship_data import CreatedByRelationshipData + + return { + "data": (CreatedByRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreatedByRelationshipData, UnsetType] = unset, **kwargs): + """ + Relationship to the user who created the resource. + + :param data: Data for the created_by relationship. + :type data: CreatedByRelationshipData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/created_by_relationship_data.py b/src/datadog_api_client/v2/model/created_by_relationship_data.py new file mode 100644 index 0000000000..731ea3a341 --- /dev/null +++ b/src/datadog_api_client/v2/model/created_by_relationship_data.py @@ -0,0 +1,39 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreatedByRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: str, **kwargs): + """ + Data for the created_by relationship. + + :param id: The unique identifier of the user. + :type id: str + + :param type: The type of the relationship. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/integration_counts.py b/src/datadog_api_client/v2/model/integration_counts.py new file mode 100644 index 0000000000..59a880426a --- /dev/null +++ b/src/datadog_api_client/v2/model/integration_counts.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class IntegrationCounts(ModelNormal): + @cached_property + def openapi_types(_): + return { + "filtered_count": (int,), + "integration_type": (str,), + "total_count": (int,), + } + + attribute_map = { + "filtered_count": "filtered_count", + "integration_type": "integration_type", + "total_count": "total_count", + } + + def __init__( + self_, + filtered_count: Union[int, UnsetType] = unset, + integration_type: Union[str, UnsetType] = unset, + total_count: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Count of integrations by type. + + :param filtered_count: The filtered count of integrations. + :type filtered_count: int, optional + + :param integration_type: The integration type. + :type integration_type: str, optional + + :param total_count: The total count of integrations. + :type total_count: int, optional + """ + if filtered_count is not unset: + kwargs["filtered_count"] = filtered_count + if integration_type is not unset: + kwargs["integration_type"] = integration_type + if total_count is not unset: + kwargs["total_count"] = total_count + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_action_connections_response.py b/src/datadog_api_client/v2/model/list_action_connections_response.py new file mode 100644 index 0000000000..e03b52a2b1 --- /dev/null +++ b/src/datadog_api_client/v2/model/list_action_connections_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_data_response import ConnectionDataResponse + from datadog_api_client.v2.model.list_action_connections_response_meta import ListActionConnectionsResponseMeta + + +class ListActionConnectionsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_data_response import ConnectionDataResponse + from datadog_api_client.v2.model.list_action_connections_response_meta import ListActionConnectionsResponseMeta + + return { + "data": ([ConnectionDataResponse],), + "meta": (ListActionConnectionsResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, + data: List[ConnectionDataResponse], + meta: Union[ListActionConnectionsResponseMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response for listing action connections. + + :param data: An array of action connections. + :type data: [ConnectionDataResponse] + + :param meta: Metadata for the list connections response. + :type meta: ListActionConnectionsResponseMeta, optional + """ + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/list_action_connections_response_meta.py b/src/datadog_api_client/v2/model/list_action_connections_response_meta.py new file mode 100644 index 0000000000..2f2af6094c --- /dev/null +++ b/src/datadog_api_client/v2/model/list_action_connections_response_meta.py @@ -0,0 +1,62 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.integration_counts import IntegrationCounts + + +class ListActionConnectionsResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.integration_counts import IntegrationCounts + + return { + "integration_counts": ([IntegrationCounts], none_type), + "total": (int,), + "total_filtered": (int,), + } + + attribute_map = { + "integration_counts": "integration_counts", + "total": "total", + "total_filtered": "total_filtered", + } + + def __init__( + self_, + total: int, + total_filtered: int, + integration_counts: Union[List[IntegrationCounts], none_type, UnsetType] = unset, + **kwargs, + ): + """ + Metadata for the list connections response. + + :param integration_counts: Count of integrations by type. + :type integration_counts: [IntegrationCounts], none_type, optional + + :param total: The total number of connections. + :type total: int + + :param total_filtered: The total number of connections that match the specified filters. + :type total_filtered: int + """ + if integration_counts is not unset: + kwargs["integration_counts"] = integration_counts + super().__init__(kwargs) + + self_.total = total + self_.total_filtered = total_filtered diff --git a/src/datadog_api_client/v2/model/list_connection_groups_response.py b/src/datadog_api_client/v2/model/list_connection_groups_response.py new file mode 100644 index 0000000000..34da531404 --- /dev/null +++ b/src/datadog_api_client/v2/model/list_connection_groups_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_group_data_response import ConnectionGroupDataResponse + from datadog_api_client.v2.model.list_connection_groups_response_meta import ListConnectionGroupsResponseMeta + + +class ListConnectionGroupsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_group_data_response import ConnectionGroupDataResponse + from datadog_api_client.v2.model.list_connection_groups_response_meta import ListConnectionGroupsResponseMeta + + return { + "data": ([ConnectionGroupDataResponse],), + "meta": (ListConnectionGroupsResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, + data: List[ConnectionGroupDataResponse], + meta: Union[ListConnectionGroupsResponseMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response for listing connection groups. + + :param data: An array of connection groups. + :type data: [ConnectionGroupDataResponse] + + :param meta: Metadata for the list connection groups response. + :type meta: ListConnectionGroupsResponseMeta, optional + """ + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/list_connection_groups_response_meta.py b/src/datadog_api_client/v2/model/list_connection_groups_response_meta.py new file mode 100644 index 0000000000..ab2fc44d03 --- /dev/null +++ b/src/datadog_api_client/v2/model/list_connection_groups_response_meta.py @@ -0,0 +1,62 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.integration_counts import IntegrationCounts + + +class ListConnectionGroupsResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.integration_counts import IntegrationCounts + + return { + "integration_counts": ([IntegrationCounts], none_type), + "total": (int,), + "total_filtered": (int,), + } + + attribute_map = { + "integration_counts": "integration_counts", + "total": "total", + "total_filtered": "total_filtered", + } + + def __init__( + self_, + total: int, + total_filtered: int, + integration_counts: Union[List[IntegrationCounts], none_type, UnsetType] = unset, + **kwargs, + ): + """ + Metadata for the list connection groups response. + + :param integration_counts: Count of integrations by type. + :type integration_counts: [IntegrationCounts], none_type, optional + + :param total: The total number of connection groups. + :type total: int + + :param total_filtered: The total number of connection groups that match the specified filters. + :type total_filtered: int + """ + if integration_counts is not unset: + kwargs["integration_counts"] = integration_counts + super().__init__(kwargs) + + self_.total = total + self_.total_filtered = total_filtered diff --git a/src/datadog_api_client/v2/model/private_actions_runner.py b/src/datadog_api_client/v2/model/private_actions_runner.py new file mode 100644 index 0000000000..639c8692ee --- /dev/null +++ b/src/datadog_api_client/v2/model/private_actions_runner.py @@ -0,0 +1,33 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class PrivateActionsRunner(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + } + + attribute_map = { + "id": "id", + } + + def __init__(self_, id: str, **kwargs): + """ + Information about the private actions runner. + + :param id: The unique identifier of the runner. + :type id: str + """ + super().__init__(kwargs) + + self_.id = id diff --git a/src/datadog_api_client/v2/model/update_connection_group_request.py b/src/datadog_api_client/v2/model/update_connection_group_request.py new file mode 100644 index 0000000000..9328e26e05 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_connection_group_request.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_group_data_request import ConnectionGroupDataRequest + + +class UpdateConnectionGroupRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_group_data_request import ConnectionGroupDataRequest + + return { + "data": (ConnectionGroupDataRequest,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ConnectionGroupDataRequest, **kwargs): + """ + Request for updating a connection group. + + :param data: Data object for updating a connection group. + :type data: ConnectionGroupDataRequest + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/update_connection_group_response.py b/src/datadog_api_client/v2/model/update_connection_group_response.py new file mode 100644 index 0000000000..1362e6f741 --- /dev/null +++ b/src/datadog_api_client/v2/model/update_connection_group_response.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.connection_group_data_response import ConnectionGroupDataResponse + + +class UpdateConnectionGroupResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.connection_group_data_response import ConnectionGroupDataResponse + + return { + "data": (ConnectionGroupDataResponse,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ConnectionGroupDataResponse, **kwargs): + """ + Response for updating a connection group. + + :param data: Data object for a connection group. + :type data: ConnectionGroupDataResponse + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 400d568fb4..14207ed12c 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -952,9 +952,17 @@ from datadog_api_client.v2.model.connected_team_ref_data import ConnectedTeamRefData from datadog_api_client.v2.model.connected_team_ref_data_type import ConnectedTeamRefDataType from datadog_api_client.v2.model.connection import Connection +from datadog_api_client.v2.model.connection_data_attributes_response import ConnectionDataAttributesResponse +from datadog_api_client.v2.model.connection_data_response import ConnectionDataResponse from datadog_api_client.v2.model.connection_env import ConnectionEnv from datadog_api_client.v2.model.connection_env_env import ConnectionEnvEnv from datadog_api_client.v2.model.connection_group import ConnectionGroup +from datadog_api_client.v2.model.connection_group_data_attributes_request import ConnectionGroupDataAttributesRequest +from datadog_api_client.v2.model.connection_group_data_attributes_response import ConnectionGroupDataAttributesResponse +from datadog_api_client.v2.model.connection_group_data_request import ConnectionGroupDataRequest +from datadog_api_client.v2.model.connection_group_data_response import ConnectionGroupDataResponse +from datadog_api_client.v2.model.connection_group_relationships import ConnectionGroupRelationships +from datadog_api_client.v2.model.connection_group_type import ConnectionGroupType from datadog_api_client.v2.model.connections_page_pagination import ConnectionsPagePagination from datadog_api_client.v2.model.connections_response_meta import ConnectionsResponseMeta from datadog_api_client.v2.model.container import Container @@ -1220,6 +1228,9 @@ from datadog_api_client.v2.model.create_user_notification_channel_request import CreateUserNotificationChannelRequest from datadog_api_client.v2.model.create_workflow_request import CreateWorkflowRequest from datadog_api_client.v2.model.create_workflow_response import CreateWorkflowResponse +from datadog_api_client.v2.model.created_by import CreatedBy +from datadog_api_client.v2.model.created_by_relationship import CreatedByRelationship +from datadog_api_client.v2.model.created_by_relationship_data import CreatedByRelationshipData from datadog_api_client.v2.model.creator import Creator from datadog_api_client.v2.model.csm_agent_data import CsmAgentData from datadog_api_client.v2.model.csm_agents_attributes import CsmAgentsAttributes @@ -2512,6 +2523,7 @@ from datadog_api_client.v2.model.input_schema_parameters import InputSchemaParameters from datadog_api_client.v2.model.input_schema_parameters_type import InputSchemaParametersType from datadog_api_client.v2.model.intake_payload_accepted import IntakePayloadAccepted +from datadog_api_client.v2.model.integration_counts import IntegrationCounts from datadog_api_client.v2.model.integration_incident import IntegrationIncident from datadog_api_client.v2.model.integration_incident_field_mappings_items import IntegrationIncidentFieldMappingsItems from datadog_api_client.v2.model.integration_incident_severity_config import IntegrationIncidentSeverityConfig @@ -2681,6 +2693,8 @@ from datadog_api_client.v2.model.list_apis_response_data_attributes import ListAPIsResponseDataAttributes from datadog_api_client.v2.model.list_apis_response_meta import ListAPIsResponseMeta from datadog_api_client.v2.model.list_apis_response_meta_pagination import ListAPIsResponseMetaPagination +from datadog_api_client.v2.model.list_action_connections_response import ListActionConnectionsResponse +from datadog_api_client.v2.model.list_action_connections_response_meta import ListActionConnectionsResponseMeta from datadog_api_client.v2.model.list_app_key_registrations_response import ListAppKeyRegistrationsResponse from datadog_api_client.v2.model.list_app_key_registrations_response_meta import ListAppKeyRegistrationsResponseMeta from datadog_api_client.v2.model.list_application_keys_response import ListApplicationKeysResponse @@ -2693,6 +2707,8 @@ from datadog_api_client.v2.model.list_apps_response_meta import ListAppsResponseMeta from datadog_api_client.v2.model.list_apps_response_meta_page import ListAppsResponseMetaPage from datadog_api_client.v2.model.list_assets_sbo_ms_response import ListAssetsSBOMsResponse +from datadog_api_client.v2.model.list_connection_groups_response import ListConnectionGroupsResponse +from datadog_api_client.v2.model.list_connection_groups_response_meta import ListConnectionGroupsResponseMeta from datadog_api_client.v2.model.list_connections_response import ListConnectionsResponse from datadog_api_client.v2.model.list_connections_response_data import ListConnectionsResponseData from datadog_api_client.v2.model.list_connections_response_data_attributes import ListConnectionsResponseDataAttributes @@ -4035,6 +4051,7 @@ from datadog_api_client.v2.model.powerpacks_response_meta import PowerpacksResponseMeta from datadog_api_client.v2.model.powerpacks_response_meta_pagination import PowerpacksResponseMetaPagination from datadog_api_client.v2.model.preview_entity_response_data import PreviewEntityResponseData +from datadog_api_client.v2.model.private_actions_runner import PrivateActionsRunner from datadog_api_client.v2.model.process_summaries_meta import ProcessSummariesMeta from datadog_api_client.v2.model.process_summaries_meta_page import ProcessSummariesMetaPage from datadog_api_client.v2.model.process_summaries_response import ProcessSummariesResponse @@ -5719,6 +5736,8 @@ from datadog_api_client.v2.model.update_apps_datastore_request_data_attributes import ( UpdateAppsDatastoreRequestDataAttributes, ) +from datadog_api_client.v2.model.update_connection_group_request import UpdateConnectionGroupRequest +from datadog_api_client.v2.model.update_connection_group_response import UpdateConnectionGroupResponse from datadog_api_client.v2.model.update_connection_request import UpdateConnectionRequest from datadog_api_client.v2.model.update_connection_request_data import UpdateConnectionRequestData from datadog_api_client.v2.model.update_connection_request_data_attributes import UpdateConnectionRequestDataAttributes @@ -6676,9 +6695,17 @@ "ConnectedTeamRefData", "ConnectedTeamRefDataType", "Connection", + "ConnectionDataAttributesResponse", + "ConnectionDataResponse", "ConnectionEnv", "ConnectionEnvEnv", "ConnectionGroup", + "ConnectionGroupDataAttributesRequest", + "ConnectionGroupDataAttributesResponse", + "ConnectionGroupDataRequest", + "ConnectionGroupDataResponse", + "ConnectionGroupRelationships", + "ConnectionGroupType", "ConnectionsPagePagination", "ConnectionsResponseMeta", "Container", @@ -6856,6 +6883,9 @@ "CreateUserNotificationChannelRequest", "CreateWorkflowRequest", "CreateWorkflowResponse", + "CreatedBy", + "CreatedByRelationship", + "CreatedByRelationshipData", "Creator", "CsmAgentData", "CsmAgentsAttributes", @@ -7852,6 +7882,7 @@ "InputSchemaParameters", "InputSchemaParametersType", "IntakePayloadAccepted", + "IntegrationCounts", "IntegrationIncident", "IntegrationIncidentFieldMappingsItems", "IntegrationIncidentSeverityConfig", @@ -7997,6 +8028,8 @@ "ListAPIsResponseDataAttributes", "ListAPIsResponseMeta", "ListAPIsResponseMetaPagination", + "ListActionConnectionsResponse", + "ListActionConnectionsResponseMeta", "ListAppKeyRegistrationsResponse", "ListAppKeyRegistrationsResponseMeta", "ListApplicationKeysResponse", @@ -8007,6 +8040,8 @@ "ListAppsResponseMeta", "ListAppsResponseMetaPage", "ListAssetsSBOMsResponse", + "ListConnectionGroupsResponse", + "ListConnectionGroupsResponseMeta", "ListConnectionsResponse", "ListConnectionsResponseData", "ListConnectionsResponseDataAttributes", @@ -8791,6 +8826,7 @@ "PowerpacksResponseMeta", "PowerpacksResponseMetaPagination", "PreviewEntityResponseData", + "PrivateActionsRunner", "ProcessSummariesMeta", "ProcessSummariesMetaPage", "ProcessSummariesResponse", @@ -10015,6 +10051,8 @@ "UpdateAppsDatastoreRequest", "UpdateAppsDatastoreRequestData", "UpdateAppsDatastoreRequestDataAttributes", + "UpdateConnectionGroupRequest", + "UpdateConnectionGroupResponse", "UpdateConnectionRequest", "UpdateConnectionRequestData", "UpdateConnectionRequestDataAttributes", diff --git a/tests/v2/features/action_connection.feature b/tests/v2/features/action_connection.feature index 759615a8fd..1686cae1da 100644 --- a/tests/v2/features/action_connection.feature +++ b/tests/v2/features/action_connection.feature @@ -97,6 +97,34 @@ Feature: Action Connection When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/action-platform + Scenario: List action connections returns "Bad Request" response + Given operation "ListActionConnections" enabled + And new "ListActionConnections" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: List action connections returns "OK" response + Given operation "ListActionConnections" enabled + And new "ListActionConnections" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/action-platform + Scenario: List connection groups returns "Bad Request" response + Given operation "ListConnectionGroups" enabled + And new "ListConnectionGroups" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: List connection groups returns "OK" response + Given operation "ListConnectionGroups" enabled + And new "ListConnectionGroups" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Register a new App Key returns "Bad request" response Given new "RegisterAppKey" request @@ -132,6 +160,33 @@ Feature: Action Connection When the request is sent Then the response status is 404 Not found + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "Bad Request" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "Not Found" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/action-platform + Scenario: Update a connection group returns "OK" response + Given operation "UpdateConnectionGroup" enabled + And new "UpdateConnectionGroup" request + And request contains "connection_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"connections": [], "description": "An updated test connection group for AWS integrations", "name": "My Connection Group Updated", "tag_keys": []}, "type": "connection_group"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Update an existing Action Connection returns "Bad Request" response Given new "UpdateActionConnection" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 7e549784ee..f514c71bb4 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -202,6 +202,12 @@ "type": "idempotent" } }, + "ListActionConnections": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, "CreateActionConnection": { "tag": "Action Connection", "undo": { @@ -215,6 +221,18 @@ "type": "unsafe" } }, + "ListConnectionGroups": { + "tag": "Action Connection", + "undo": { + "type": "safe" + } + }, + "UpdateConnectionGroup": { + "tag": "Action Connection", + "undo": { + "type": "idempotent" + } + }, "DeleteActionConnection": { "tag": "Action Connection", "undo": {