Skip to content

Commit 14454e8

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

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
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-08 17:37:18.807428",
8-
"spec_repo_commit": "9a0ffb6a"
7+
"regenerated": "2023-06-08 18:39:08.164533",
8+
"spec_repo_commit": "0df91379"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-06-08 17:37:18.819527",
13-
"spec_repo_commit": "9a0ffb6a"
12+
"regenerated": "2023-06-08 18:39:08.181065",
13+
"spec_repo_commit": "0df91379"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23066,7 +23066,8 @@ paths:
2306623066
x-codegen-request-body-name: body
2306723067
/api/v1/integration/gcp:
2306823068
delete:
23069-
description: Delete a given Datadog-GCP integration.
23069+
deprecated: true
23070+
description: This endpoint is deprecated. Delete a given Datadog-GCP integration.
2307023071
operationId: DeleteGCPIntegration
2307123072
requestBody:
2307223073
content:
@@ -23102,7 +23103,9 @@ paths:
2310223103
- GCP Integration
2310323104
x-codegen-request-body-name: body
2310423105
get:
23105-
description: List all Datadog-GCP integrations configured in your Datadog account.
23106+
deprecated: true
23107+
description: This endpoint is deprecated. List all Datadog-GCP integrations
23108+
configured in your Datadog account.
2310623109
operationId: ListGCPIntegration
2310723110
responses:
2310823111
'200':
@@ -23129,7 +23132,8 @@ paths:
2312923132
tags:
2313023133
- GCP Integration
2313123134
post:
23132-
description: Create a Datadog-GCP integration.
23135+
deprecated: true
23136+
description: This endpoint is deprecated. Create a Datadog-GCP integration.
2313323137
operationId: CreateGCPIntegration
2313423138
requestBody:
2313523139
content:
@@ -23165,7 +23169,9 @@ paths:
2316523169
- GCP Integration
2316623170
x-codegen-request-body-name: body
2316723171
put:
23168-
description: 'Update a Datadog-GCP integrations host_filters and/or auto-mute.
23172+
deprecated: true
23173+
description: 'This endpoint is deprecated. Update a Datadog-GCP integrations
23174+
host_filters and/or auto-mute.
2316923175

2317023176
Requires a `project_id` and `client_email`, however these fields cannot be
2317123177
updated.

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. 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. 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. 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. 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)