Skip to content

mark v1 GCP APIs as deprecated #1518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
26 changes: 15 additions & 11 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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':
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
21 changes: 13 additions & 8 deletions src/datadog_api_client/v1/api/gcp_integration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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)