diff --git a/.apigentools-info b/.apigentools-info index 561531d435..03b5586cc7 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-12 14:39:34.231825", - "spec_repo_commit": "52c2288b" + "regenerated": "2023-06-12 17:40:10.052800", + "spec_repo_commit": "03643056" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-12 14:39:34.243959", - "spec_repo_commit": "52c2288b" + "regenerated": "2023-06-12 17:40:10.096150", + "spec_repo_commit": "03643056" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 8f3b0088a6..979b7ea567 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -23079,7 +23079,9 @@ paths: x-codegen-request-body-name: body /api/v1/integration/gcp: delete: - description: Delete a given Datadog-GCP integration. + deprecated: true + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + Delete a given Datadog-GCP integration." operationId: DeleteGCPIntegration requestBody: content: @@ -23115,7 +23117,9 @@ paths: - GCP Integration x-codegen-request-body-name: body get: - description: List all Datadog-GCP integrations configured in your Datadog account. + deprecated: true + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + List all Datadog-GCP integrations configured in your Datadog account." operationId: ListGCPIntegration responses: '200': @@ -23142,7 +23146,9 @@ paths: tags: - GCP Integration post: - description: Create a Datadog-GCP integration. + deprecated: true + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + Create a Datadog-GCP integration." operationId: CreateGCPIntegration requestBody: content: @@ -23178,14 +23184,12 @@ paths: - GCP Integration x-codegen-request-body-name: body put: - description: 'Update a Datadog-GCP integrations host_filters and/or auto-mute. - - Requires a `project_id` and `client_email`, however these fields cannot be - updated. - - If you need to update these fields, delete and use the create (`POST`) endpoint. - - The unspecified fields will keep their original values.' + deprecated: true + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + Update a Datadog-GCP integrations host_filters and/or auto-mute.\nRequires + a `project_id` and `client_email`, however these fields cannot be updated.\nIf + you need to update these fields, delete and use the create (`POST`) endpoint.\nThe + unspecified fields will keep their original values." operationId: UpdateGCPIntegration requestBody: content: diff --git a/src/datadog_api_client/v1/api/gcp_integration_api.py b/src/datadog_api_client/v1/api/gcp_integration_api.py index e854979102..e2e36584d9 100644 --- a/src/datadog_api_client/v1/api/gcp_integration_api.py +++ b/src/datadog_api_client/v1/api/gcp_integration_api.py @@ -4,6 +4,7 @@ from __future__ import annotations from typing import Any, Dict +import warnings from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration @@ -107,9 +108,9 @@ def create_gcp_integration( self, body: GCPAccount, ) -> dict: - """Create a GCP integration. + """Create a GCP integration. **Deprecated**. - Create a Datadog-GCP integration. + This endpoint is deprecated – use the V2 endpoints instead. Create a Datadog-GCP integration. :param body: Create a Datadog-GCP integration. :type body: GCPAccount @@ -118,15 +119,16 @@ def create_gcp_integration( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("create_gcp_integration is deprecated", DeprecationWarning, stacklevel=2) return self._create_gcp_integration_endpoint.call_with_http_info(**kwargs) def delete_gcp_integration( self, body: GCPAccount, ) -> dict: - """Delete a GCP integration. + """Delete a GCP integration. **Deprecated**. - Delete a given Datadog-GCP integration. + This endpoint is deprecated – use the V2 endpoints instead. Delete a given Datadog-GCP integration. :param body: Delete a given Datadog-GCP integration. :type body: GCPAccount @@ -135,27 +137,29 @@ def delete_gcp_integration( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("delete_gcp_integration is deprecated", DeprecationWarning, stacklevel=2) return self._delete_gcp_integration_endpoint.call_with_http_info(**kwargs) def list_gcp_integration( self, ) -> GCPAccountListResponse: - """List all GCP integrations. + """List all GCP integrations. **Deprecated**. - List all Datadog-GCP integrations configured in your Datadog account. + This endpoint is deprecated – use the V2 endpoints instead. List all Datadog-GCP integrations configured in your Datadog account. :rtype: GCPAccountListResponse """ kwargs: Dict[str, Any] = {} + warnings.warn("list_gcp_integration is deprecated", DeprecationWarning, stacklevel=2) return self._list_gcp_integration_endpoint.call_with_http_info(**kwargs) def update_gcp_integration( self, body: GCPAccount, ) -> dict: - """Update a GCP integration. + """Update a GCP integration. **Deprecated**. - Update a Datadog-GCP integrations host_filters and/or auto-mute. + This endpoint is deprecated – use the V2 endpoints instead. Update a Datadog-GCP integrations host_filters and/or auto-mute. Requires a ``project_id`` and ``client_email`` , however these fields cannot be updated. If you need to update these fields, delete and use the create ( ``POST`` ) endpoint. The unspecified fields will keep their original values. @@ -167,4 +171,5 @@ def update_gcp_integration( kwargs: Dict[str, Any] = {} kwargs["body"] = body + warnings.warn("update_gcp_integration is deprecated", DeprecationWarning, stacklevel=2) return self._update_gcp_integration_endpoint.call_with_http_info(**kwargs)