diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 614a39995e..86acb3682c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4193,11 +4193,6 @@ components: AnyValueString: description: A scalar string value. type: string - ApiID: - description: API identifier. - example: "90646597-5fdb-4a17-a240-647003f8c028" - format: uuid - type: string ApmDependencyStatName: description: The APM dependency statistic to query. enum: @@ -16908,29 +16903,6 @@ components: required: - type type: object - CreateOpenAPIResponse: - description: Response for `CreateOpenAPI` operation. - properties: - data: - $ref: "#/components/schemas/CreateOpenAPIResponseData" - type: object - CreateOpenAPIResponseAttributes: - description: Attributes for `CreateOpenAPI`. - properties: - failed_endpoints: - description: List of endpoints which couldn't be parsed. - items: - $ref: "#/components/schemas/OpenAPIEndpoint" - type: array - type: object - CreateOpenAPIResponseData: - description: Data envelope for `CreateOpenAPIResponse`. - properties: - attributes: - $ref: "#/components/schemas/CreateOpenAPIResponseAttributes" - id: - $ref: "#/components/schemas/ApiID" - type: object CreateOrUpdateWidgetRequest: description: Request body for creating or updating a widget. properties: @@ -40455,58 +40427,6 @@ components: - first - last type: object - ListAPIsResponse: - description: Response for `ListAPIs`. - properties: - data: - description: List of API items. - items: - $ref: "#/components/schemas/ListAPIsResponseData" - type: array - meta: - $ref: "#/components/schemas/ListAPIsResponseMeta" - type: object - ListAPIsResponseData: - description: Data envelope for `ListAPIsResponse`. - properties: - attributes: - $ref: "#/components/schemas/ListAPIsResponseDataAttributes" - id: - $ref: "#/components/schemas/ApiID" - type: object - ListAPIsResponseDataAttributes: - description: Attributes for `ListAPIsResponseData`. - properties: - name: - description: API name. - example: "Payments API" - type: string - type: object - ListAPIsResponseMeta: - description: Metadata for `ListAPIsResponse`. - properties: - pagination: - $ref: "#/components/schemas/ListAPIsResponseMetaPagination" - type: object - ListAPIsResponseMetaPagination: - description: Pagination metadata information for `ListAPIsResponse`. - properties: - limit: - description: Number of items in the current page. - example: 20 - format: int64 - type: integer - offset: - description: Offset for pagination. - example: 0 - format: int64 - type: integer - total_count: - description: Total number of items. - example: 35 - format: int64 - type: integer - type: object ListAllocationsResponse: description: Response containing a list of targeting rules (allocations). properties: @@ -51598,24 +51518,6 @@ components: required: - type type: object - OpenAPIEndpoint: - description: Endpoint info extracted from an `OpenAPI` specification. - properties: - method: - description: The endpoint method. - type: string - path: - description: The endpoint path. - type: string - type: object - OpenAPIFile: - description: Object for API data in an `OpenAPI` format as a file. - properties: - openapi_spec_file: - description: Binary `OpenAPI` spec file - format: binary - type: string - type: object OpsgenieServiceCreateAttributes: description: The Opsgenie service attributes for a create request. properties: @@ -80330,29 +80232,6 @@ components: required: - type type: object - UpdateOpenAPIResponse: - description: Response for `UpdateOpenAPI`. - properties: - data: - $ref: "#/components/schemas/UpdateOpenAPIResponseData" - type: object - UpdateOpenAPIResponseAttributes: - description: Attributes for `UpdateOpenAPI`. - properties: - failed_endpoints: - description: List of endpoints which couldn't be parsed. - items: - $ref: "#/components/schemas/OpenAPIEndpoint" - type: array - type: object - UpdateOpenAPIResponseData: - description: Data envelope for `UpdateOpenAPIResponse`. - properties: - attributes: - $ref: "#/components/schemas/UpdateOpenAPIResponseAttributes" - id: - $ref: "#/components/schemas/ApiID" - type: object UpdateOutcomesAsyncAttributes: description: The JSON:API attributes for a batched set of scorecard outcomes. properties: @@ -86638,288 +86517,6 @@ paths: operator: OR permissions: - api_keys_write - /api/v2/apicatalog/api: - get: - deprecated: true - description: List APIs and their IDs. - operationId: ListAPIs - parameters: - - description: Filter APIs by name - in: query - name: query - required: false - schema: - example: "payments" - type: string - - description: Number of items per page. - in: query - name: page[limit] - required: false - schema: - default: 20 - format: int64 - minimum: 1 - type: integer - - description: Offset for pagination. - in: query - name: page[offset] - required: false - schema: - default: 0 - format: int64 - minimum: 0 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ListAPIsResponse" - 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" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_read - summary: List APIs - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_read - x-unstable: |- - **Note**: This endpoint is deprecated. - /api/v2/apicatalog/api/{id}: - delete: - deprecated: true - description: Delete a specific API by ID. - operationId: DeleteOpenAPI - parameters: - - description: ID of the API to delete - in: path - name: id - required: true - schema: - $ref: "#/components/schemas/ApiID" - responses: - "204": - description: API deleted successfully - "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: API not found error - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_write - summary: Delete an API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_write - x-unstable: |- - **Note**: This endpoint is deprecated. - /api/v2/apicatalog/api/{id}/openapi: - get: - deprecated: true - description: Retrieve information about a specific API in [OpenAPI](https://spec.openapis.org/oas/latest.html) format file. - operationId: GetOpenAPI - parameters: - - description: ID of the API to retrieve - in: path - name: id - required: true - schema: - $ref: "#/components/schemas/ApiID" - responses: - "200": - content: - multipart/form-data: - schema: - format: binary - type: string - 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: API not found error - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_read - summary: Get an API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_read - x-unstable: |- - **Note**: This endpoint is deprecated. - put: - deprecated: true - description: |- - Update information about a specific API. The given content will replace all API content of the given ID. - The ID is returned by the create API, or can be found in the URL in the API catalog UI. - operationId: UpdateOpenAPI - parameters: - - description: ID of the API to modify - in: path - name: id - required: true - schema: - $ref: "#/components/schemas/ApiID" - requestBody: - content: - multipart/form-data: - examples: - default: - value: - openapi_spec_file: openapi-spec.yaml - schema: - $ref: "#/components/schemas/OpenAPIFile" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateOpenAPIResponse" - description: API updated successfully - "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: API not found error - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_write - summary: Update an API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_write - x-unstable: |- - **Note**: This endpoint is deprecated. - /api/v2/apicatalog/openapi: - post: - deprecated: true - description: |- - Create a new API from the [OpenAPI](https://spec.openapis.org/oas/latest.html) specification given. - See the [API Catalog documentation](https://docs.datadoghq.com/api_catalog/add_metadata/) for additional - information about the possible metadata. - It returns the created API ID. - operationId: CreateOpenAPI - requestBody: - content: - multipart/form-data: - examples: - default: - value: - openapi_spec_file: openapi-spec.yaml - schema: - $ref: "#/components/schemas/OpenAPIFile" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOpenAPIResponse" - description: API created successfully - "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" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - apm_api_catalog_write - summary: Create a new API - tags: ["API Management"] - "x-permission": - operator: OR - permissions: - - apm_api_catalog_write - x-unstable: |- - **Note**: This endpoint is deprecated. /api/v2/apm/config/metrics: get: description: Get the list of configured span-based metrics with their definitions. @@ -135233,9 +134830,6 @@ servers: default: api description: The subdomain where the API is deployed. tags: - - description: |- - Configure your API endpoints through the Datadog API. - name: API Management - description: Observe, troubleshoot, and improve cloud-scale applications with all telemetry in context name: APM - description: |- diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 79ecbd0439..86904d16e5 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -25,13 +25,6 @@ datadog\_api\_client.v2.api.agentless\_scanning\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.api\_management\_api module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.api.api_management_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.apm\_api module ------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 5c291d979b..f72f478039 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6815,27 +6815,6 @@ datadog\_api\_client.v2.model.create\_on\_call\_notification\_rule\_request\_dat :members: :show-inheritance: -datadog\_api\_client.v2.model.create\_open\_api\_response module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_open_api_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.create\_open\_api\_response\_attributes module ----------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_open_api_response_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.create\_open\_api\_response\_data module ----------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.create_open_api_response_data - :members: - :show-inheritance: - datadog\_api\_client.v2.model.create\_or\_update\_widget\_request module ------------------------------------------------------------------------ @@ -16370,41 +16349,6 @@ datadog\_api\_client.v2.model.list\_allocations\_response module :members: :show-inheritance: -datadog\_api\_client.v2.model.list\_apis\_response module ---------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_apis_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_apis\_response\_data module ---------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_apis_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_apis\_response\_data\_attributes module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_apis_response_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_apis\_response\_meta module ---------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_apis_response_meta - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_apis\_response\_meta\_pagination module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_apis_response_meta_pagination - :members: - :show-inheritance: - datadog\_api\_client.v2.model.list\_app\_key\_registrations\_response module ---------------------------------------------------------------------------- @@ -22530,20 +22474,6 @@ datadog\_api\_client.v2.model.open\_aiapi\_key\_update module :members: :show-inheritance: -datadog\_api\_client.v2.model.open\_api\_endpoint module --------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.open_api_endpoint - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.open\_api\_file module ----------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.open_api_file - :members: - :show-inheritance: - datadog\_api\_client.v2.model.opsgenie\_service\_create\_attributes module -------------------------------------------------------------------------- @@ -35529,27 +35459,6 @@ datadog\_api\_client.v2.model.update\_on\_call\_notification\_rule\_request\_dat :members: :show-inheritance: -datadog\_api\_client.v2.model.update\_open\_api\_response module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.update_open_api_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.update\_open\_api\_response\_attributes module ----------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.update_open_api_response_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.update\_open\_api\_response\_data module ----------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.update_open_api_response_data - :members: - :show-inheritance: - datadog\_api\_client.v2.model.update\_outcomes\_async\_attributes module ------------------------------------------------------------------------ diff --git a/examples/v2/api-management/CreateOpenAPI.py b/examples/v2/api-management/CreateOpenAPI.py deleted file mode 100644 index 5e23e4f4c6..0000000000 --- a/examples/v2/api-management/CreateOpenAPI.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Create a new API returns "API created successfully" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.api_management_api import APIManagementApi - -configuration = Configuration() -configuration.unstable_operations["create_open_api"] = True -with ApiClient(configuration) as api_client: - api_instance = APIManagementApi(api_client) - response = api_instance.create_open_api( - openapi_spec_file=open("openapi-spec.yaml", "rb"), - ) - - print(response) diff --git a/examples/v2/api-management/DeleteOpenAPI.py b/examples/v2/api-management/DeleteOpenAPI.py deleted file mode 100644 index 2bbffa09ef..0000000000 --- a/examples/v2/api-management/DeleteOpenAPI.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Delete an API returns "API deleted successfully" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.api_management_api import APIManagementApi - -# there is a valid "managed_api" in the system -MANAGED_API_DATA_ID = environ["MANAGED_API_DATA_ID"] - -configuration = Configuration() -configuration.unstable_operations["delete_open_api"] = True -with ApiClient(configuration) as api_client: - api_instance = APIManagementApi(api_client) - api_instance.delete_open_api( - id=MANAGED_API_DATA_ID, - ) diff --git a/examples/v2/api-management/GetOpenAPI.py b/examples/v2/api-management/GetOpenAPI.py deleted file mode 100644 index 5354548bec..0000000000 --- a/examples/v2/api-management/GetOpenAPI.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Get an API returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.api_management_api import APIManagementApi - -# there is a valid "managed_api" in the system -MANAGED_API_DATA_ID = environ["MANAGED_API_DATA_ID"] - -configuration = Configuration() -configuration.unstable_operations["get_open_api"] = True -with ApiClient(configuration) as api_client: - api_instance = APIManagementApi(api_client) - response = api_instance.get_open_api( - id=MANAGED_API_DATA_ID, - ) - - print(response.read()) diff --git a/examples/v2/api-management/ListAPIs.py b/examples/v2/api-management/ListAPIs.py deleted file mode 100644 index 6735590e23..0000000000 --- a/examples/v2/api-management/ListAPIs.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -List APIs returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.api_management_api import APIManagementApi - -configuration = Configuration() -configuration.unstable_operations["list_apis"] = True -with ApiClient(configuration) as api_client: - api_instance = APIManagementApi(api_client) - response = api_instance.list_apis() - - print(response) diff --git a/examples/v2/api-management/UpdateOpenAPI.py b/examples/v2/api-management/UpdateOpenAPI.py deleted file mode 100644 index 0c238f0d72..0000000000 --- a/examples/v2/api-management/UpdateOpenAPI.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Update an API returns "API updated successfully" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.api_management_api import APIManagementApi - -# there is a valid "managed_api" in the system -MANAGED_API_DATA_ID = environ["MANAGED_API_DATA_ID"] - -configuration = Configuration() -configuration.unstable_operations["update_open_api"] = True -with ApiClient(configuration) as api_client: - api_instance = APIManagementApi(api_client) - response = api_instance.update_open_api( - id=MANAGED_API_DATA_ID, - openapi_spec_file=open("openapi-spec.yaml", "rb"), - ) - - print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 6e38061ac6..fac6681b44 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -295,11 +295,6 @@ def __init__( "v2.update_llm_obs_experiment": False, "v2.update_llm_obs_project": False, "v2.anonymize_users": False, - "v2.create_open_api": False, - "v2.delete_open_api": False, - "v2.get_open_api": False, - "v2.list_apis": False, - "v2.update_open_api": False, "v2.get_investigation": False, "v2.list_investigations": False, "v2.trigger_investigation": False, diff --git a/src/datadog_api_client/v2/api/api_management_api.py b/src/datadog_api_client/v2/api/api_management_api.py deleted file mode 100644 index 016cf80bfe..0000000000 --- a/src/datadog_api_client/v2/api/api_management_api.py +++ /dev/null @@ -1,277 +0,0 @@ -# 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 Any, Dict, Union -import warnings - -from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint -from datadog_api_client.configuration import Configuration -from datadog_api_client.model_utils import ( - file_type, - UnsetType, - unset, - UUID, -) -from datadog_api_client.v2.model.list_apis_response import ListAPIsResponse -from datadog_api_client.v2.model.update_open_api_response import UpdateOpenAPIResponse -from datadog_api_client.v2.model.create_open_api_response import CreateOpenAPIResponse - - -class APIManagementApi: - """ - Configure your API endpoints through the Datadog API. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._create_open_api_endpoint = _Endpoint( - settings={ - "response_type": (CreateOpenAPIResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/apicatalog/openapi", - "operation_id": "create_open_api", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "openapi_spec_file": { - "openapi_types": (file_type,), - "attribute": "openapi_spec_file", - "location": "form", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]}, - api_client=api_client, - ) - - self._delete_open_api_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/apicatalog/api/{id}", - "operation_id": "delete_open_api", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "id": { - "required": True, - "openapi_types": (UUID,), - "attribute": "id", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - - self._get_open_api_endpoint = _Endpoint( - settings={ - "response_type": (file_type,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/apicatalog/api/{id}/openapi", - "operation_id": "get_open_api", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "id": { - "required": True, - "openapi_types": (UUID,), - "attribute": "id", - "location": "path", - }, - }, - headers_map={ - "accept": ["multipart/form-data", "application/json"], - }, - api_client=api_client, - ) - - self._list_apis_endpoint = _Endpoint( - settings={ - "response_type": (ListAPIsResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/apicatalog/api", - "operation_id": "list_apis", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "query": { - "openapi_types": (str,), - "attribute": "query", - "location": "query", - }, - "page_limit": { - "validation": { - "inclusive_minimum": 1, - }, - "openapi_types": (int,), - "attribute": "page[limit]", - "location": "query", - }, - "page_offset": { - "validation": { - "inclusive_minimum": 0, - }, - "openapi_types": (int,), - "attribute": "page[offset]", - "location": "query", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._update_open_api_endpoint = _Endpoint( - settings={ - "response_type": (UpdateOpenAPIResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/apicatalog/api/{id}/openapi", - "operation_id": "update_open_api", - "http_method": "PUT", - "version": "v2", - }, - params_map={ - "id": { - "required": True, - "openapi_types": (UUID,), - "attribute": "id", - "location": "path", - }, - "openapi_spec_file": { - "openapi_types": (file_type,), - "attribute": "openapi_spec_file", - "location": "form", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]}, - api_client=api_client, - ) - - def create_open_api( - self, - *, - openapi_spec_file: Union[file_type, UnsetType] = unset, - ) -> CreateOpenAPIResponse: - """Create a new API. **Deprecated**. - - Create a new API from the `OpenAPI `_ specification given. - See the `API Catalog documentation `_ for additional - information about the possible metadata. - It returns the created API ID. - - :param openapi_spec_file: Binary ``OpenAPI`` spec file - :type openapi_spec_file: file_type, optional - :rtype: CreateOpenAPIResponse - """ - kwargs: Dict[str, Any] = {} - if openapi_spec_file is not unset: - kwargs["openapi_spec_file"] = openapi_spec_file - - warnings.warn("create_open_api is deprecated", DeprecationWarning, stacklevel=2) - return self._create_open_api_endpoint.call_with_http_info(**kwargs) - - def delete_open_api( - self, - id: UUID, - ) -> None: - """Delete an API. **Deprecated**. - - Delete a specific API by ID. - - :param id: ID of the API to delete - :type id: UUID - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["id"] = id - - warnings.warn("delete_open_api is deprecated", DeprecationWarning, stacklevel=2) - return self._delete_open_api_endpoint.call_with_http_info(**kwargs) - - def get_open_api( - self, - id: UUID, - ) -> file_type: - """Get an API. **Deprecated**. - - Retrieve information about a specific API in `OpenAPI `_ format file. - - :param id: ID of the API to retrieve - :type id: UUID - :rtype: file_type - """ - kwargs: Dict[str, Any] = {} - kwargs["id"] = id - - warnings.warn("get_open_api is deprecated", DeprecationWarning, stacklevel=2) - return self._get_open_api_endpoint.call_with_http_info(**kwargs) - - def list_apis( - self, - *, - query: Union[str, UnsetType] = unset, - page_limit: Union[int, UnsetType] = unset, - page_offset: Union[int, UnsetType] = unset, - ) -> ListAPIsResponse: - """List APIs. **Deprecated**. - - List APIs and their IDs. - - :param query: Filter APIs by name - :type query: str, optional - :param page_limit: Number of items per page. - :type page_limit: int, optional - :param page_offset: Offset for pagination. - :type page_offset: int, optional - :rtype: ListAPIsResponse - """ - kwargs: Dict[str, Any] = {} - if query is not unset: - kwargs["query"] = query - - if page_limit is not unset: - kwargs["page_limit"] = page_limit - - if page_offset is not unset: - kwargs["page_offset"] = page_offset - - warnings.warn("list_apis is deprecated", DeprecationWarning, stacklevel=2) - return self._list_apis_endpoint.call_with_http_info(**kwargs) - - def update_open_api( - self, - id: UUID, - *, - openapi_spec_file: Union[file_type, UnsetType] = unset, - ) -> UpdateOpenAPIResponse: - """Update an API. **Deprecated**. - - Update information about a specific API. The given content will replace all API content of the given ID. - The ID is returned by the create API, or can be found in the URL in the API catalog UI. - - :param id: ID of the API to modify - :type id: UUID - :param openapi_spec_file: Binary ``OpenAPI`` spec file - :type openapi_spec_file: file_type, optional - :rtype: UpdateOpenAPIResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["id"] = id - - if openapi_spec_file is not unset: - kwargs["openapi_spec_file"] = openapi_spec_file - - warnings.warn("update_open_api is deprecated", DeprecationWarning, stacklevel=2) - return self._update_open_api_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 3d8270c1b1..3b6bac3cf5 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -1,4 +1,3 @@ -from datadog_api_client.v2.api.api_management_api import APIManagementApi from datadog_api_client.v2.api.apm_api import APMApi from datadog_api_client.v2.api.apm_retention_filters_api import APMRetentionFiltersApi from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi @@ -110,7 +109,6 @@ __all__ = [ - "APIManagementApi", "APMApi", "APMRetentionFiltersApi", "AWSIntegrationApi", diff --git a/src/datadog_api_client/v2/model/create_open_api_response.py b/src/datadog_api_client/v2/model/create_open_api_response.py deleted file mode 100644 index 4482ffeccb..0000000000 --- a/src/datadog_api_client/v2/model/create_open_api_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.create_open_api_response_data import CreateOpenAPIResponseData - - -class CreateOpenAPIResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_open_api_response_data import CreateOpenAPIResponseData - - return { - "data": (CreateOpenAPIResponseData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[CreateOpenAPIResponseData, UnsetType] = unset, **kwargs): - """ - Response for ``CreateOpenAPI`` operation. - - :param data: Data envelope for ``CreateOpenAPIResponse``. - :type data: CreateOpenAPIResponseData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_open_api_response_attributes.py b/src/datadog_api_client/v2/model/create_open_api_response_attributes.py deleted file mode 100644 index c2287b426e..0000000000 --- a/src/datadog_api_client/v2/model/create_open_api_response_attributes.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.open_api_endpoint import OpenAPIEndpoint - - -class CreateOpenAPIResponseAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.open_api_endpoint import OpenAPIEndpoint - - return { - "failed_endpoints": ([OpenAPIEndpoint],), - } - - attribute_map = { - "failed_endpoints": "failed_endpoints", - } - - def __init__(self_, failed_endpoints: Union[List[OpenAPIEndpoint], UnsetType] = unset, **kwargs): - """ - Attributes for ``CreateOpenAPI``. - - :param failed_endpoints: List of endpoints which couldn't be parsed. - :type failed_endpoints: [OpenAPIEndpoint], optional - """ - if failed_endpoints is not unset: - kwargs["failed_endpoints"] = failed_endpoints - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_open_api_response_data.py b/src/datadog_api_client/v2/model/create_open_api_response_data.py deleted file mode 100644 index 2a99f3c9bd..0000000000 --- a/src/datadog_api_client/v2/model/create_open_api_response_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.create_open_api_response_attributes import CreateOpenAPIResponseAttributes - - -class CreateOpenAPIResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.create_open_api_response_attributes import CreateOpenAPIResponseAttributes - - return { - "attributes": (CreateOpenAPIResponseAttributes,), - "id": (UUID,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - } - - def __init__( - self_, - attributes: Union[CreateOpenAPIResponseAttributes, UnsetType] = unset, - id: Union[UUID, UnsetType] = unset, - **kwargs, - ): - """ - Data envelope for ``CreateOpenAPIResponse``. - - :param attributes: Attributes for ``CreateOpenAPI``. - :type attributes: CreateOpenAPIResponseAttributes, optional - - :param id: API identifier. - :type id: UUID, optional - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if id is not unset: - kwargs["id"] = id - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_apis_response.py b/src/datadog_api_client/v2/model/list_apis_response.py deleted file mode 100644 index e4b65d84f4..0000000000 --- a/src/datadog_api_client/v2/model/list_apis_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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.list_apis_response_data import ListAPIsResponseData - from datadog_api_client.v2.model.list_apis_response_meta import ListAPIsResponseMeta - - -class ListAPIsResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.list_apis_response_data import ListAPIsResponseData - from datadog_api_client.v2.model.list_apis_response_meta import ListAPIsResponseMeta - - return { - "data": ([ListAPIsResponseData],), - "meta": (ListAPIsResponseMeta,), - } - - attribute_map = { - "data": "data", - "meta": "meta", - } - - def __init__( - self_, - data: Union[List[ListAPIsResponseData], UnsetType] = unset, - meta: Union[ListAPIsResponseMeta, UnsetType] = unset, - **kwargs, - ): - """ - Response for ``ListAPIs``. - - :param data: List of API items. - :type data: [ListAPIsResponseData], optional - - :param meta: Metadata for ``ListAPIsResponse``. - :type meta: ListAPIsResponseMeta, optional - """ - if data is not unset: - kwargs["data"] = data - if meta is not unset: - kwargs["meta"] = meta - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_apis_response_data.py b/src/datadog_api_client/v2/model/list_apis_response_data.py deleted file mode 100644 index 589fccfb64..0000000000 --- a/src/datadog_api_client/v2/model/list_apis_response_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.list_apis_response_data_attributes import ListAPIsResponseDataAttributes - - -class ListAPIsResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.list_apis_response_data_attributes import ListAPIsResponseDataAttributes - - return { - "attributes": (ListAPIsResponseDataAttributes,), - "id": (UUID,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - } - - def __init__( - self_, - attributes: Union[ListAPIsResponseDataAttributes, UnsetType] = unset, - id: Union[UUID, UnsetType] = unset, - **kwargs, - ): - """ - Data envelope for ``ListAPIsResponse``. - - :param attributes: Attributes for ``ListAPIsResponseData``. - :type attributes: ListAPIsResponseDataAttributes, optional - - :param id: API identifier. - :type id: UUID, optional - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if id is not unset: - kwargs["id"] = id - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_apis_response_data_attributes.py b/src/datadog_api_client/v2/model/list_apis_response_data_attributes.py deleted file mode 100644 index a67821d107..0000000000 --- a/src/datadog_api_client/v2/model/list_apis_response_data_attributes.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 ListAPIsResponseDataAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "name": (str,), - } - - attribute_map = { - "name": "name", - } - - def __init__(self_, name: Union[str, UnsetType] = unset, **kwargs): - """ - Attributes for ``ListAPIsResponseData``. - - :param name: API name. - :type name: str, optional - """ - if name is not unset: - kwargs["name"] = name - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_apis_response_meta.py b/src/datadog_api_client/v2/model/list_apis_response_meta.py deleted file mode 100644 index 1b0cc4f332..0000000000 --- a/src/datadog_api_client/v2/model/list_apis_response_meta.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.list_apis_response_meta_pagination import ListAPIsResponseMetaPagination - - -class ListAPIsResponseMeta(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.list_apis_response_meta_pagination import ListAPIsResponseMetaPagination - - return { - "pagination": (ListAPIsResponseMetaPagination,), - } - - attribute_map = { - "pagination": "pagination", - } - - def __init__(self_, pagination: Union[ListAPIsResponseMetaPagination, UnsetType] = unset, **kwargs): - """ - Metadata for ``ListAPIsResponse``. - - :param pagination: Pagination metadata information for ``ListAPIsResponse``. - :type pagination: ListAPIsResponseMetaPagination, optional - """ - if pagination is not unset: - kwargs["pagination"] = pagination - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_apis_response_meta_pagination.py b/src/datadog_api_client/v2/model/list_apis_response_meta_pagination.py deleted file mode 100644 index 3581bc4a96..0000000000 --- a/src/datadog_api_client/v2/model/list_apis_response_meta_pagination.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 ListAPIsResponseMetaPagination(ModelNormal): - @cached_property - def openapi_types(_): - return { - "limit": (int,), - "offset": (int,), - "total_count": (int,), - } - - attribute_map = { - "limit": "limit", - "offset": "offset", - "total_count": "total_count", - } - - def __init__( - self_, - limit: Union[int, UnsetType] = unset, - offset: Union[int, UnsetType] = unset, - total_count: Union[int, UnsetType] = unset, - **kwargs, - ): - """ - Pagination metadata information for ``ListAPIsResponse``. - - :param limit: Number of items in the current page. - :type limit: int, optional - - :param offset: Offset for pagination. - :type offset: int, optional - - :param total_count: Total number of items. - :type total_count: int, optional - """ - if limit is not unset: - kwargs["limit"] = limit - if offset is not unset: - kwargs["offset"] = offset - if total_count is not unset: - kwargs["total_count"] = total_count - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/open_api_endpoint.py b/src/datadog_api_client/v2/model/open_api_endpoint.py deleted file mode 100644 index 2cedad985d..0000000000 --- a/src/datadog_api_client/v2/model/open_api_endpoint.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 OpenAPIEndpoint(ModelNormal): - @cached_property - def openapi_types(_): - return { - "method": (str,), - "path": (str,), - } - - attribute_map = { - "method": "method", - "path": "path", - } - - def __init__(self_, method: Union[str, UnsetType] = unset, path: Union[str, UnsetType] = unset, **kwargs): - """ - Endpoint info extracted from an ``OpenAPI`` specification. - - :param method: The endpoint method. - :type method: str, optional - - :param path: The endpoint path. - :type path: str, optional - """ - if method is not unset: - kwargs["method"] = method - if path is not unset: - kwargs["path"] = path - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/open_api_file.py b/src/datadog_api_client/v2/model/open_api_file.py deleted file mode 100644 index 43575ab01e..0000000000 --- a/src/datadog_api_client/v2/model/open_api_file.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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, - file_type, - unset, - UnsetType, -) - - -class OpenAPIFile(ModelNormal): - @cached_property - def openapi_types(_): - return { - "openapi_spec_file": (file_type,), - } - - attribute_map = { - "openapi_spec_file": "openapi_spec_file", - } - - def __init__(self_, openapi_spec_file: Union[file_type, UnsetType] = unset, **kwargs): - """ - Object for API data in an ``OpenAPI`` format as a file. - - :param openapi_spec_file: Binary ``OpenAPI`` spec file - :type openapi_spec_file: file_type, optional - """ - if openapi_spec_file is not unset: - kwargs["openapi_spec_file"] = openapi_spec_file - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_open_api_response.py b/src/datadog_api_client/v2/model/update_open_api_response.py deleted file mode 100644 index 4026a54ed5..0000000000 --- a/src/datadog_api_client/v2/model/update_open_api_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.update_open_api_response_data import UpdateOpenAPIResponseData - - -class UpdateOpenAPIResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.update_open_api_response_data import UpdateOpenAPIResponseData - - return { - "data": (UpdateOpenAPIResponseData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[UpdateOpenAPIResponseData, UnsetType] = unset, **kwargs): - """ - Response for ``UpdateOpenAPI``. - - :param data: Data envelope for ``UpdateOpenAPIResponse``. - :type data: UpdateOpenAPIResponseData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_open_api_response_attributes.py b/src/datadog_api_client/v2/model/update_open_api_response_attributes.py deleted file mode 100644 index 98d70ab123..0000000000 --- a/src/datadog_api_client/v2/model/update_open_api_response_attributes.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.open_api_endpoint import OpenAPIEndpoint - - -class UpdateOpenAPIResponseAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.open_api_endpoint import OpenAPIEndpoint - - return { - "failed_endpoints": ([OpenAPIEndpoint],), - } - - attribute_map = { - "failed_endpoints": "failed_endpoints", - } - - def __init__(self_, failed_endpoints: Union[List[OpenAPIEndpoint], UnsetType] = unset, **kwargs): - """ - Attributes for ``UpdateOpenAPI``. - - :param failed_endpoints: List of endpoints which couldn't be parsed. - :type failed_endpoints: [OpenAPIEndpoint], optional - """ - if failed_endpoints is not unset: - kwargs["failed_endpoints"] = failed_endpoints - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/update_open_api_response_data.py b/src/datadog_api_client/v2/model/update_open_api_response_data.py deleted file mode 100644 index e24a4da83d..0000000000 --- a/src/datadog_api_client/v2/model/update_open_api_response_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.update_open_api_response_attributes import UpdateOpenAPIResponseAttributes - - -class UpdateOpenAPIResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.update_open_api_response_attributes import UpdateOpenAPIResponseAttributes - - return { - "attributes": (UpdateOpenAPIResponseAttributes,), - "id": (UUID,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - } - - def __init__( - self_, - attributes: Union[UpdateOpenAPIResponseAttributes, UnsetType] = unset, - id: Union[UUID, UnsetType] = unset, - **kwargs, - ): - """ - Data envelope for ``UpdateOpenAPIResponse``. - - :param attributes: Attributes for ``UpdateOpenAPI``. - :type attributes: UpdateOpenAPIResponseAttributes, optional - - :param id: API identifier. - :type id: UUID, optional - """ - if attributes is not unset: - kwargs["attributes"] = attributes - if id is not unset: - kwargs["id"] = id - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index e3055977a2..7da470bc7c 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1298,9 +1298,6 @@ from datadog_api_client.v2.model.create_on_call_notification_rule_request_data import ( CreateOnCallNotificationRuleRequestData, ) -from datadog_api_client.v2.model.create_open_api_response import CreateOpenAPIResponse -from datadog_api_client.v2.model.create_open_api_response_attributes import CreateOpenAPIResponseAttributes -from datadog_api_client.v2.model.create_open_api_response_data import CreateOpenAPIResponseData from datadog_api_client.v2.model.create_or_update_widget_request import CreateOrUpdateWidgetRequest from datadog_api_client.v2.model.create_or_update_widget_request_attributes import CreateOrUpdateWidgetRequestAttributes from datadog_api_client.v2.model.create_or_update_widget_request_data import CreateOrUpdateWidgetRequestData @@ -3293,11 +3290,6 @@ from datadog_api_client.v2.model.leaked_key_type import LeakedKeyType from datadog_api_client.v2.model.library import Library from datadog_api_client.v2.model.links import Links -from datadog_api_client.v2.model.list_apis_response import ListAPIsResponse -from datadog_api_client.v2.model.list_apis_response_data import ListAPIsResponseData -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_allocations_response import ListAllocationsResponse 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 @@ -4670,8 +4662,6 @@ from datadog_api_client.v2.model.open_ai_integration import OpenAIIntegration from datadog_api_client.v2.model.open_ai_integration_type import OpenAIIntegrationType from datadog_api_client.v2.model.open_ai_integration_update import OpenAIIntegrationUpdate -from datadog_api_client.v2.model.open_api_endpoint import OpenAPIEndpoint -from datadog_api_client.v2.model.open_api_file import OpenAPIFile from datadog_api_client.v2.model.opsgenie_service_create_attributes import OpsgenieServiceCreateAttributes from datadog_api_client.v2.model.opsgenie_service_create_data import OpsgenieServiceCreateData from datadog_api_client.v2.model.opsgenie_service_create_request import OpsgenieServiceCreateRequest @@ -7248,9 +7238,6 @@ from datadog_api_client.v2.model.update_on_call_notification_rule_request_data import ( UpdateOnCallNotificationRuleRequestData, ) -from datadog_api_client.v2.model.update_open_api_response import UpdateOpenAPIResponse -from datadog_api_client.v2.model.update_open_api_response_attributes import UpdateOpenAPIResponseAttributes -from datadog_api_client.v2.model.update_open_api_response_data import UpdateOpenAPIResponseData from datadog_api_client.v2.model.update_outcomes_async_attributes import UpdateOutcomesAsyncAttributes from datadog_api_client.v2.model.update_outcomes_async_request import UpdateOutcomesAsyncRequest from datadog_api_client.v2.model.update_outcomes_async_request_data import UpdateOutcomesAsyncRequestData @@ -8460,9 +8447,6 @@ "CreateNotificationRuleParametersDataAttributes", "CreateOnCallNotificationRuleRequest", "CreateOnCallNotificationRuleRequestData", - "CreateOpenAPIResponse", - "CreateOpenAPIResponseAttributes", - "CreateOpenAPIResponseData", "CreateOrUpdateWidgetRequest", "CreateOrUpdateWidgetRequestAttributes", "CreateOrUpdateWidgetRequestData", @@ -9957,11 +9941,6 @@ "LeakedKeyType", "Library", "Links", - "ListAPIsResponse", - "ListAPIsResponseData", - "ListAPIsResponseDataAttributes", - "ListAPIsResponseMeta", - "ListAPIsResponseMetaPagination", "ListAllocationsResponse", "ListAppKeyRegistrationsResponse", "ListAppKeyRegistrationsResponseMeta", @@ -10706,8 +10685,6 @@ "OpenAIIntegration", "OpenAIIntegrationType", "OpenAIIntegrationUpdate", - "OpenAPIEndpoint", - "OpenAPIFile", "OpsgenieServiceCreateAttributes", "OpsgenieServiceCreateData", "OpsgenieServiceCreateRequest", @@ -12568,9 +12545,6 @@ "UpdateOnCallNotificationRuleRequest", "UpdateOnCallNotificationRuleRequestAttributes", "UpdateOnCallNotificationRuleRequestData", - "UpdateOpenAPIResponse", - "UpdateOpenAPIResponseAttributes", - "UpdateOpenAPIResponseData", "UpdateOutcomesAsyncAttributes", "UpdateOutcomesAsyncRequest", "UpdateOutcomesAsyncRequestData", diff --git a/tests/v2/features/api_management.feature b/tests/v2/features/api_management.feature deleted file mode 100644 index aefe9f319c..0000000000 --- a/tests/v2/features/api_management.feature +++ /dev/null @@ -1,115 +0,0 @@ -@endpoint(api-management) @endpoint(api-management-v2) -Feature: API Management - Configure your API endpoints through the Datadog API. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "APIManagement" API - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Create a new API returns "API created successfully" response - Given operation "CreateOpenAPI" enabled - And new "CreateOpenAPI" request - And request contains "openapi_spec_file" parameter with value "openapi-spec.yaml" - When the request is sent - Then the response status is 201 API created successfully - And the response "data.attributes.failed_endpoints" has length 0 - - @generated @skip @team:DataDog/apm-aoe - Scenario: Create a new API returns "Bad request" response - Given operation "CreateOpenAPI" enabled - And new "CreateOpenAPI" request - When the request is sent - Then the response status is 400 Bad request - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Delete an API returns "API deleted successfully" response - Given operation "DeleteOpenAPI" enabled - And there is a valid "managed_api" in the system - And new "DeleteOpenAPI" request - And request contains "id" parameter from "managed_api.data.id" - When the request is sent - Then the response status is 204 API deleted successfully - - @generated @skip @team:DataDog/apm-aoe - Scenario: Delete an API returns "API not found error" response - Given operation "DeleteOpenAPI" enabled - And new "DeleteOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API not found error - - @generated @skip @team:DataDog/apm-aoe - Scenario: Delete an API returns "Bad request" response - Given operation "DeleteOpenAPI" enabled - And new "DeleteOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad request - - @generated @skip @team:DataDog/apm-aoe - Scenario: Get an API returns "API not found error" response - Given operation "GetOpenAPI" enabled - And new "GetOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API not found error - - @generated @skip @team:DataDog/apm-aoe - Scenario: Get an API returns "Bad request" response - Given operation "GetOpenAPI" enabled - And new "GetOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad request - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Get an API returns "OK" response - Given operation "GetOpenAPI" enabled - And there is a valid "managed_api" in the system - And new "GetOpenAPI" request - And request contains "id" parameter from "managed_api.data.id" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/apm-aoe - Scenario: List APIs returns "Bad request" response - Given operation "ListAPIs" enabled - And new "ListAPIs" request - When the request is sent - Then the response status is 400 Bad request - - @generated @skip @team:DataDog/apm-aoe - Scenario: List APIs returns "OK" response - Given operation "ListAPIs" enabled - And new "ListAPIs" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/apm-aoe - Scenario: Update an API returns "API not found error" response - Given operation "UpdateOpenAPI" enabled - And new "UpdateOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API not found error - - @integration-only @skip-terraform-config @skip-validation @team:DataDog/apm-aoe - Scenario: Update an API returns "API updated successfully" response - Given operation "UpdateOpenAPI" enabled - And there is a valid "managed_api" in the system - And new "UpdateOpenAPI" request - And request contains "id" parameter from "managed_api.data.id" - And request contains "openapi_spec_file" parameter with value "openapi-spec.yaml" - When the request is sent - Then the response status is 200 API updated successfully - And the response "data.attributes.failed_endpoints" has length 0 - - @generated @skip @team:DataDog/apm-aoe - Scenario: Update an API returns "Bad request" response - Given operation "UpdateOpenAPI" enabled - And new "UpdateOpenAPI" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad request diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 98e2edab7a..6ad08f5edd 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -104,18 +104,6 @@ "tag": "Key Management", "operationId": "CreateAPIKey" }, - { - "parameters": [ - { - "name": "openapi_spec_file", - "value": "\"openapi-spec.yaml\"" - } - ], - "step": "there is a valid \"managed_api\" in the system", - "key": "managed_api", - "tag": "API Management", - "operationId": "CreateOpenAPI" - }, { "parameters": [ { diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 21d7896f03..3456c24457 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -454,43 +454,6 @@ "type": "idempotent" } }, - "ListAPIs": { - "tag": "API Management", - "undo": { - "type": "safe" - } - }, - "DeleteOpenAPI": { - "tag": "API Management", - "undo": { - "type": "idempotent" - } - }, - "GetOpenAPI": { - "tag": "API Management", - "undo": { - "type": "safe" - } - }, - "UpdateOpenAPI": { - "tag": "API Management", - "undo": { - "type": "idempotent" - } - }, - "CreateOpenAPI": { - "tag": "API Management", - "undo": { - "operationId": "DeleteOpenAPI", - "parameters": [ - { - "name": "id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, "ListSpansMetrics": { "tag": "Spans Metrics", "undo": {