Skip to content

Commit b2b1ee2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix CreateGCPSTSAccount response status code (#1198)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 78300ba commit b2b1ee2

File tree

10 files changed

+60
-60
lines changed

10 files changed

+60
-60
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-15 14:21:28.636683",
8-
"spec_repo_commit": "aa16daa0"
7+
"regenerated": "2023-06-16 17:50:44.503416",
8+
"spec_repo_commit": "15c4b13f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-06-15 14:21:28.649631",
13-
"spec_repo_commit": "aa16daa0"
12+
"regenerated": "2023-06-16 17:50:44.516638",
13+
"spec_repo_commit": "15c4b13f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17988,7 +17988,7 @@ paths:
1798817988
$ref: '#/components/schemas/GCPSTSServiceAccountCreateRequest'
1798917989
required: true
1799017990
responses:
17991-
'200':
17991+
'201':
1799217992
content:
1799317993
application/json:
1799417994
schema:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-06-14T15:44:49.306Z"
1+
"2023-06-16T14:05:25.134Z"

cassettes/v2/GCP-Integration_2417533655/Create-a-new-entry-for-your-service-account-returns-OK-response_1766852936/recording.har

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "45c047d45f039544e8c931d0d2d72f87",
11+
"_id": "244386ca785e1a936a8eb76d486ba395",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -26,13 +26,13 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 576,
29+
"headersSize": 578,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"client_email\":\"5a4e63ef9fe94949@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"client_email\":\"47cdd79b4a719ac2@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 229,
45-
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"client_email\":\"5a4e63ef9fe94949@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":false},\"id\":\"c86125c9-ee6d-46ba-997a-23006cfd1575\"}}\n"
45+
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"host_filters\":[],\"client_email\":\"47cdd79b4a719ac2@test-project.iam.gserviceaccount.com\",\"is_cspm_enabled\":false,\"automute\":false},\"id\":\"3aa3ec77-9646-4f6a-bcd0-01e5124e2ad1\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -54,14 +54,14 @@
5454
"headersSize": 658,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
57-
"status": 200,
58-
"statusText": "OK"
57+
"status": 201,
58+
"statusText": "Created"
5959
},
60-
"startedDateTime": "2023-06-14T15:44:49.317Z",
61-
"time": 201
60+
"startedDateTime": "2023-06-16T14:05:25.145Z",
61+
"time": 196
6262
},
6363
{
64-
"_id": "f0b7b4c86a6dc33cb630eaf2b67b1569",
64+
"_id": "20a1fed0dc1a88198825904ecb3db9f0",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,11 +74,11 @@
7474
"value": "*/*"
7575
}
7676
],
77-
"headersSize": 549,
77+
"headersSize": 551,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/c86125c9-ee6d-46ba-997a-23006cfd1575"
81+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/3aa3ec77-9646-4f6a-bcd0-01e5124e2ad1"
8282
},
8383
"response": {
8484
"bodySize": 0,
@@ -99,8 +99,8 @@
9999
"status": 204,
100100
"statusText": "No Content"
101101
},
102-
"startedDateTime": "2023-06-14T15:44:49.533Z",
103-
"time": 133
102+
"startedDateTime": "2023-06-16T14:05:25.356Z",
103+
"time": 171
104104
}
105105
],
106106
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-06-14T15:52:33.117Z"
1+
"2023-06-16T14:06:34.123Z"

cassettes/v2/GCP-Integration_2417533655/List-all-GCP-STS-enabled-service-accounts-returns-OK-response_883583427/recording.har

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "10386b7f2533b647b9f3f1a30e6c39a6",
11+
"_id": "b17372b2348181089c572209d51c996e",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,7 +32,7 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"client_email\":\"64786de2b265b150@example.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"client_email\":\"94b5da11cdec906f@example.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 204,
45-
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false,\"is_cspm_enabled\":false},\"id\":\"00fecf2b-ccf5-4b7f-954c-845173d99179\"}}\n"
45+
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":false,\"automute\":false,\"client_email\":\"[email protected]\",\"host_filters\":[]},\"id\":\"4c69f9f2-ab71-4f67-8932-6322579d6dc6\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -54,11 +54,11 @@
5454
"headersSize": 658,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
57-
"status": 200,
58-
"statusText": "OK"
57+
"status": 201,
58+
"statusText": "Created"
5959
},
60-
"startedDateTime": "2023-06-14T15:52:33.127Z",
61-
"time": 199
60+
"startedDateTime": "2023-06-16T14:06:34.132Z",
61+
"time": 247
6262
},
6363
{
6464
"_id": "8fce3338c2dbc972fce4f7d8281a3f46",
@@ -81,11 +81,11 @@
8181
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"
8282
},
8383
"response": {
84-
"bodySize": 755,
84+
"bodySize": 1467,
8585
"content": {
8686
"mimeType": "application/json",
87-
"size": 755,
88-
"text": "{\"data\":[{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"[email protected]\",\"automute\":false,\"is_cspm_enabled\":false,\"host_filters\":[]},\"meta\":{\"accessible_projects\":[]},\"id\":\"3acadf04-13a2-4422-995b-1b8780dd23e6\"},{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"[email protected]\",\"automute\":false,\"is_cspm_enabled\":false,\"host_filters\":[]},\"meta\":{\"accessible_projects\":[]},\"id\":\"bfef2d23-0d85-4735-850a-c8f77407bcda\"},{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"[email protected]\",\"automute\":false,\"is_cspm_enabled\":false,\"host_filters\":[]},\"meta\":{\"accessible_projects\":[]},\"id\":\"00fecf2b-ccf5-4b7f-954c-845173d99179\"}]}\n"
87+
"size": 1467,
88+
"text": "{\"data\":[{\"type\":\"gcp_service_account\",\"meta\":{\"accessible_projects\":[]},\"attributes\":{\"is_cspm_enabled\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false},\"id\":\"3acadf04-13a2-4422-995b-1b8780dd23e6\"},{\"type\":\"gcp_service_account\",\"meta\":{\"accessible_projects\":[]},\"attributes\":{\"is_cspm_enabled\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false},\"id\":\"bfef2d23-0d85-4735-850a-c8f77407bcda\"},{\"type\":\"gcp_service_account\",\"meta\":{\"accessible_projects\":[]},\"attributes\":{\"is_cspm_enabled\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false},\"id\":\"c5f0a5fc-a1d1-4216-b0dc-7a97c4c0ddd6\"},{\"type\":\"gcp_service_account\",\"meta\":{\"accessible_projects\":[]},\"attributes\":{\"is_cspm_enabled\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false},\"id\":\"a3c40eff-1275-4a5b-97f1-1af3d53911e2\"},{\"type\":\"gcp_service_account\",\"meta\":{\"accessible_projects\":[]},\"attributes\":{\"is_cspm_enabled\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false},\"id\":\"aa745f71-a36d-4653-90c1-c00798256bea\"},{\"type\":\"gcp_service_account\",\"meta\":{\"accessible_projects\":[]},\"attributes\":{\"is_cspm_enabled\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false},\"id\":\"4c69f9f2-ab71-4f67-8932-6322579d6dc6\"}]}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -94,17 +94,17 @@
9494
"value": "application/json"
9595
}
9696
],
97-
"headersSize": 657,
97+
"headersSize": 658,
9898
"httpVersion": "HTTP/1.1",
9999
"redirectURL": "",
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2023-06-14T15:52:33.336Z",
104-
"time": 179
103+
"startedDateTime": "2023-06-16T14:06:34.391Z",
104+
"time": 135
105105
},
106106
{
107-
"_id": "f832cb231509e9a0437f4f04894f6aa5",
107+
"_id": "32b079ba5d490abe77cfeed5d59639a8",
108108
"_order": 0,
109109
"cache": {},
110110
"request": {
@@ -121,7 +121,7 @@
121121
"httpVersion": "HTTP/1.1",
122122
"method": "DELETE",
123123
"queryString": [],
124-
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/00fecf2b-ccf5-4b7f-954c-845173d99179"
124+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/4c69f9f2-ab71-4f67-8932-6322579d6dc6"
125125
},
126126
"response": {
127127
"bodySize": 0,
@@ -142,8 +142,8 @@
142142
"status": 204,
143143
"statusText": "No Content"
144144
},
145-
"startedDateTime": "2023-06-14T15:52:33.528Z",
146-
"time": 147
145+
"startedDateTime": "2023-06-16T14:06:34.538Z",
146+
"time": 170
147147
}
148148
],
149149
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-06-14T16:04:56.302Z"
1+
"2023-06-16T14:07:02.873Z"

cassettes/v2/GCP-Integration_2417533655/Update-STS-Service-Account-returns-OK-response_1272656902/recording.har

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "edf64f412ed34016f3f16170b07610f5",
11+
"_id": "0524cf1c7a238a77659044a2c18167f6",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,7 +32,7 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"client_email\":\"876f595d133dac09@example.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"client_email\":\"89e7e1c05bdec66f@example.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 204,
45-
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":false,\"host_filters\":[],\"automute\":false,\"client_email\":\"[email protected]\"},\"id\":\"fa9bd370-fe91-498b-8d02-a25baecc5a60\"}}\n"
45+
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"[email protected]\",\"host_filters\":[],\"automute\":false,\"is_cspm_enabled\":false},\"id\":\"91cde1ef-1da8-4340-9563-5b491f1176a7\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 657,
54+
"headersSize": 658,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
57-
"status": 200,
58-
"statusText": "OK"
57+
"status": 201,
58+
"statusText": "Created"
5959
},
60-
"startedDateTime": "2023-06-14T16:04:56.313Z",
61-
"time": 202
60+
"startedDateTime": "2023-06-16T14:07:02.882Z",
61+
"time": 145
6262
},
6363
{
64-
"_id": "0901d4b581ea817ba05c3c29f6f38677",
64+
"_id": "05319ea4ea7b9e9ee309809b75ae98f1",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -85,17 +85,17 @@
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"data\":{\"attributes\":{\"client_email\":\"876f595d133dac09@example.com\",\"host_filters\":[\"foo:bar\"]},\"id\":\"fa9bd370-fe91-498b-8d02-a25baecc5a60\",\"type\":\"gcp_service_account\"}}"
88+
"text": "{\"data\":{\"attributes\":{\"client_email\":\"89e7e1c05bdec66f@example.com\",\"host_filters\":[\"foo:bar\"]},\"id\":\"91cde1ef-1da8-4340-9563-5b491f1176a7\",\"type\":\"gcp_service_account\"}}"
8989
},
9090
"queryString": [],
91-
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/fa9bd370-fe91-498b-8d02-a25baecc5a60"
91+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/91cde1ef-1da8-4340-9563-5b491f1176a7"
9292
},
9393
"response": {
9494
"bodySize": 213,
9595
"content": {
9696
"mimeType": "application/json",
9797
"size": 213,
98-
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"client_email\":\"876f595d133dac09@example.com\",\"host_filters\":[\"foo:bar\"],\"is_cspm_enabled\":false},\"id\":\"fa9bd370-fe91-498b-8d02-a25baecc5a60\"}}\n"
98+
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"id\":\"91cde1ef-1da8-4340-9563-5b491f1176a7\",\"attributes\":{\"client_email\":\"89e7e1c05bdec66f@example.com\",\"is_cspm_enabled\":false,\"automute\":false,\"host_filters\":[\"foo:bar\"]}}}\n"
9999
},
100100
"cookies": [],
101101
"headers": [
@@ -104,17 +104,17 @@
104104
"value": "application/json"
105105
}
106106
],
107-
"headersSize": 657,
107+
"headersSize": 658,
108108
"httpVersion": "HTTP/1.1",
109109
"redirectURL": "",
110110
"status": 201,
111111
"statusText": "Created"
112112
},
113-
"startedDateTime": "2023-06-14T16:04:56.530Z",
114-
"time": 155
113+
"startedDateTime": "2023-06-16T14:07:03.036Z",
114+
"time": 217
115115
},
116116
{
117-
"_id": "ae59fc4dca790b1e48b19505ec3f3cab",
117+
"_id": "2d3cff9192fbb0197526ebfc1c7ad778",
118118
"_order": 0,
119119
"cache": {},
120120
"request": {
@@ -131,7 +131,7 @@
131131
"httpVersion": "HTTP/1.1",
132132
"method": "DELETE",
133133
"queryString": [],
134-
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/fa9bd370-fe91-498b-8d02-a25baecc5a60"
134+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/91cde1ef-1da8-4340-9563-5b491f1176a7"
135135
},
136136
"response": {
137137
"bodySize": 0,
@@ -146,14 +146,14 @@
146146
"value": "text/html; charset=utf-8"
147147
}
148148
],
149-
"headersSize": 644,
149+
"headersSize": 645,
150150
"httpVersion": "HTTP/1.1",
151151
"redirectURL": "",
152152
"status": 204,
153153
"statusText": "No Content"
154154
},
155-
"startedDateTime": "2023-06-14T16:04:56.697Z",
156-
"time": 147
155+
"startedDateTime": "2023-06-16T14:07:03.265Z",
156+
"time": 193
157157
}
158158
],
159159
"pages": [],

features/v2/gcp_integration.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Feature: GCP Integration
5050
Given new "CreateGCPSTSAccount" request
5151
And body with value {"data": {"attributes": {"client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
5252
When the request is sent
53-
Then the response status is 200 OK
53+
Then the response status is 201 OK
5454
And the response "data.type" is equal to "gcp_service_account"
5555
And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com"
5656

packages/datadog-api-client-v2/apis/GCPIntegrationApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class GCPIntegrationApiResponseProcessor {
256256
const contentType = ObjectSerializer.normalizeMediaType(
257257
response.headers["content-type"]
258258
);
259-
if (response.httpStatusCode == 200) {
259+
if (response.httpStatusCode == 201) {
260260
const body: GCPSTSServiceAccountResponse = ObjectSerializer.deserialize(
261261
ObjectSerializer.parse(await response.body.text(), contentType),
262262
"GCPSTSServiceAccountResponse"

0 commit comments

Comments
 (0)