Skip to content

Commit bee1998

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
mark v1 GCP APIs as deprecated (#1518)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 267bfcd commit bee1998

File tree

3 files changed

+32
-23
lines changed

3 files changed

+32
-23
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2023-06-12 14:39:34.231825",
8-
"spec_repo_commit": "52c2288b"
7+
"regenerated": "2023-06-12 17:40:10.052800",
8+
"spec_repo_commit": "03643056"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-06-12 14:39:34.243959",
13-
"spec_repo_commit": "52c2288b"
12+
"regenerated": "2023-06-12 17:40:10.096150",
13+
"spec_repo_commit": "03643056"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23079,7 +23079,9 @@ paths:
2307923079
x-codegen-request-body-name: body
2308023080
/api/v1/integration/gcp:
2308123081
delete:
23082-
description: Delete a given Datadog-GCP integration.
23082+
deprecated: true
23083+
description: "This endpoint is deprecated \u2013 use the V2 endpoints instead.
23084+
Delete a given Datadog-GCP integration."
2308323085
operationId: DeleteGCPIntegration
2308423086
requestBody:
2308523087
content:
@@ -23115,7 +23117,9 @@ paths:
2311523117
- GCP Integration
2311623118
x-codegen-request-body-name: body
2311723119
get:
23118-
description: List all Datadog-GCP integrations configured in your Datadog account.
23120+
deprecated: true
23121+
description: "This endpoint is deprecated \u2013 use the V2 endpoints instead.
23122+
List all Datadog-GCP integrations configured in your Datadog account."
2311923123
operationId: ListGCPIntegration
2312023124
responses:
2312123125
'200':
@@ -23142,7 +23146,9 @@ paths:
2314223146
tags:
2314323147
- GCP Integration
2314423148
post:
23145-
description: Create a Datadog-GCP integration.
23149+
deprecated: true
23150+
description: "This endpoint is deprecated \u2013 use the V2 endpoints instead.
23151+
Create a Datadog-GCP integration."
2314623152
operationId: CreateGCPIntegration
2314723153
requestBody:
2314823154
content:
@@ -23178,14 +23184,12 @@ paths:
2317823184
- GCP Integration
2317923185
x-codegen-request-body-name: body
2318023186
put:
23181-
description: 'Update a Datadog-GCP integrations host_filters and/or auto-mute.
23182-
23183-
Requires a `project_id` and `client_email`, however these fields cannot be
23184-
updated.
23185-
23186-
If you need to update these fields, delete and use the create (`POST`) endpoint.
23187-
23188-
The unspecified fields will keep their original values.'
23187+
deprecated: true
23188+
description: "This endpoint is deprecated \u2013 use the V2 endpoints instead.
23189+
Update a Datadog-GCP integrations host_filters and/or auto-mute.\nRequires
23190+
a `project_id` and `client_email`, however these fields cannot be updated.\nIf
23191+
you need to update these fields, delete and use the create (`POST`) endpoint.\nThe
23192+
unspecified fields will keep their original values."
2318923193
operationId: UpdateGCPIntegration
2319023194
requestBody:
2319123195
content:

src/datadog_api_client/v1/api/gcp_integration_api.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
from typing import Any, Dict
7+
import warnings
78

89
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
910
from datadog_api_client.configuration import Configuration
@@ -107,9 +108,9 @@ def create_gcp_integration(
107108
self,
108109
body: GCPAccount,
109110
) -> dict:
110-
"""Create a GCP integration.
111+
"""Create a GCP integration. **Deprecated**.
111112
112-
Create a Datadog-GCP integration.
113+
This endpoint is deprecated – use the V2 endpoints instead. Create a Datadog-GCP integration.
113114
114115
:param body: Create a Datadog-GCP integration.
115116
:type body: GCPAccount
@@ -118,15 +119,16 @@ def create_gcp_integration(
118119
kwargs: Dict[str, Any] = {}
119120
kwargs["body"] = body
120121

122+
warnings.warn("create_gcp_integration is deprecated", DeprecationWarning, stacklevel=2)
121123
return self._create_gcp_integration_endpoint.call_with_http_info(**kwargs)
122124

123125
def delete_gcp_integration(
124126
self,
125127
body: GCPAccount,
126128
) -> dict:
127-
"""Delete a GCP integration.
129+
"""Delete a GCP integration. **Deprecated**.
128130
129-
Delete a given Datadog-GCP integration.
131+
This endpoint is deprecated – use the V2 endpoints instead. Delete a given Datadog-GCP integration.
130132
131133
:param body: Delete a given Datadog-GCP integration.
132134
:type body: GCPAccount
@@ -135,27 +137,29 @@ def delete_gcp_integration(
135137
kwargs: Dict[str, Any] = {}
136138
kwargs["body"] = body
137139

140+
warnings.warn("delete_gcp_integration is deprecated", DeprecationWarning, stacklevel=2)
138141
return self._delete_gcp_integration_endpoint.call_with_http_info(**kwargs)
139142

140143
def list_gcp_integration(
141144
self,
142145
) -> GCPAccountListResponse:
143-
"""List all GCP integrations.
146+
"""List all GCP integrations. **Deprecated**.
144147
145-
List all Datadog-GCP integrations configured in your Datadog account.
148+
This endpoint is deprecated – use the V2 endpoints instead. List all Datadog-GCP integrations configured in your Datadog account.
146149
147150
:rtype: GCPAccountListResponse
148151
"""
149152
kwargs: Dict[str, Any] = {}
153+
warnings.warn("list_gcp_integration is deprecated", DeprecationWarning, stacklevel=2)
150154
return self._list_gcp_integration_endpoint.call_with_http_info(**kwargs)
151155

152156
def update_gcp_integration(
153157
self,
154158
body: GCPAccount,
155159
) -> dict:
156-
"""Update a GCP integration.
160+
"""Update a GCP integration. **Deprecated**.
157161
158-
Update a Datadog-GCP integrations host_filters and/or auto-mute.
162+
This endpoint is deprecated – use the V2 endpoints instead. Update a Datadog-GCP integrations host_filters and/or auto-mute.
159163
Requires a ``project_id`` and ``client_email`` , however these fields cannot be updated.
160164
If you need to update these fields, delete and use the create ( ``POST`` ) endpoint.
161165
The unspecified fields will keep their original values.
@@ -167,4 +171,5 @@ def update_gcp_integration(
167171
kwargs: Dict[str, Any] = {}
168172
kwargs["body"] = body
169173

174+
warnings.warn("update_gcp_integration is deprecated", DeprecationWarning, stacklevel=2)
170175
return self._update_gcp_integration_endpoint.call_with_http_info(**kwargs)

0 commit comments

Comments
 (0)