-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 3379aa10 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Jun 15, 2023
1 parent
5a00d58
commit a0d2dbd
Showing
14 changed files
with
414 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...55/Create-a-new-entry-for-your-service-account-returns-OK-response_1766852936/frozen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"2023-06-14T15:44:49.306Z" |
109 changes: 109 additions & 0 deletions
109
.../Create-a-new-entry-for-your-service-account-returns-OK-response_1766852936/recording.har
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "GCP Integration/Create a new entry for your service account returns \"OK\" response", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "45c047d45f039544e8c931d0d2d72f87", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 143, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
}, | ||
{ | ||
"_fromType": "array", | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 576, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "POST", | ||
"postData": { | ||
"mimeType": "application/json", | ||
"params": [], | ||
"text": "{\"data\":{\"attributes\":{\"client_email\":\"[email protected]\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}" | ||
}, | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts" | ||
}, | ||
"response": { | ||
"bodySize": 229, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 229, | ||
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"client_email\":\"[email protected]\",\"host_filters\":[],\"is_cspm_enabled\":false},\"id\":\"c86125c9-ee6d-46ba-997a-23006cfd1575\"}}\n" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 658, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2023-06-14T15:44:49.317Z", | ||
"time": 201 | ||
}, | ||
{ | ||
"_id": "f0b7b4c86a6dc33cb630eaf2b67b1569", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 0, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "*/*" | ||
} | ||
], | ||
"headersSize": 549, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "DELETE", | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/c86125c9-ee6d-46ba-997a-23006cfd1575" | ||
}, | ||
"response": { | ||
"bodySize": 0, | ||
"content": { | ||
"mimeType": "text/html; charset=utf-8", | ||
"size": 0 | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "text/html; charset=utf-8" | ||
} | ||
], | ||
"headersSize": 645, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 204, | ||
"statusText": "No Content" | ||
}, | ||
"startedDateTime": "2023-06-14T15:44:49.533Z", | ||
"time": 133 | ||
} | ||
], | ||
"pages": [], | ||
"version": "1.2" | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...33655/List-all-GCP-STS-enabled-service-accounts-returns-OK-response_883583427/frozen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
"2023-05-18T15:03:23.705Z" | ||
"2023-06-14T15:52:33.117Z" |
107 changes: 101 additions & 6 deletions
107
...655/List-all-GCP-STS-enabled-service-accounts-returns-OK-response_883583427/recording.har
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...egration_2417533655/Update-STS-Service-Account-returns-OK-response_1272656902/frozen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"2023-06-14T16:04:56.302Z" |
162 changes: 162 additions & 0 deletions
162
...ration_2417533655/Update-STS-Service-Account-returns-OK-response_1272656902/recording.har
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "GCP Integration/Update STS Service Account returns \"OK\" response", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "edf64f412ed34016f3f16170b07610f5", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 118, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
}, | ||
{ | ||
"_fromType": "array", | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 578, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "POST", | ||
"postData": { | ||
"mimeType": "application/json", | ||
"params": [], | ||
"text": "{\"data\":{\"attributes\":{\"client_email\":\"[email protected]\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}" | ||
}, | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts" | ||
}, | ||
"response": { | ||
"bodySize": 204, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 204, | ||
"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" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 657, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2023-06-14T16:04:56.313Z", | ||
"time": 202 | ||
}, | ||
{ | ||
"_id": "0901d4b581ea817ba05c3c29f6f38677", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 171, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
}, | ||
{ | ||
"_fromType": "array", | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 616, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "PATCH", | ||
"postData": { | ||
"mimeType": "application/json", | ||
"params": [], | ||
"text": "{\"data\":{\"attributes\":{\"client_email\":\"[email protected]\",\"host_filters\":[\"foo:bar\"]},\"id\":\"fa9bd370-fe91-498b-8d02-a25baecc5a60\",\"type\":\"gcp_service_account\"}}" | ||
}, | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/fa9bd370-fe91-498b-8d02-a25baecc5a60" | ||
}, | ||
"response": { | ||
"bodySize": 213, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 213, | ||
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"client_email\":\"[email protected]\",\"host_filters\":[\"foo:bar\"],\"is_cspm_enabled\":false},\"id\":\"fa9bd370-fe91-498b-8d02-a25baecc5a60\"}}\n" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 657, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 201, | ||
"statusText": "Created" | ||
}, | ||
"startedDateTime": "2023-06-14T16:04:56.530Z", | ||
"time": 155 | ||
}, | ||
{ | ||
"_id": "ae59fc4dca790b1e48b19505ec3f3cab", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 0, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "*/*" | ||
} | ||
], | ||
"headersSize": 551, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "DELETE", | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/fa9bd370-fe91-498b-8d02-a25baecc5a60" | ||
}, | ||
"response": { | ||
"bodySize": 0, | ||
"content": { | ||
"mimeType": "text/html; charset=utf-8", | ||
"size": 0 | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "text/html; charset=utf-8" | ||
} | ||
], | ||
"headersSize": 644, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 204, | ||
"statusText": "No Content" | ||
}, | ||
"startedDateTime": "2023-06-14T16:04:56.697Z", | ||
"time": 147 | ||
} | ||
], | ||
"pages": [], | ||
"version": "1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,7 @@ const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = { | |
body: { | ||
data: { | ||
attributes: { | ||
clientEmail: | ||
"[email protected]", | ||
clientEmail: "[email protected]", | ||
hostFilters: [], | ||
}, | ||
type: "gcp_service_account", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,19 +7,21 @@ import { client, v2 } from "@datadog/datadog-api-client"; | |
const configuration = client.createConfiguration(); | ||
const apiInstance = new v2.GCPIntegrationApi(configuration); | ||
|
||
// there is a valid "gcp_sts_account" in the system | ||
const GCP_STS_ACCOUNT_DATA_ID = process.env.GCP_STS_ACCOUNT_DATA_ID as string; | ||
|
||
const params: v2.GCPIntegrationApiUpdateGCPSTSAccountRequest = { | ||
body: { | ||
data: { | ||
attributes: { | ||
clientEmail: | ||
"[email protected]", | ||
hostFilters: [], | ||
clientEmail: "[email protected]", | ||
hostFilters: ["foo:bar"], | ||
}, | ||
id: "d291291f-12c2-22g4-j290-123456678897", | ||
id: GCP_STS_ACCOUNT_DATA_ID, | ||
type: "gcp_service_account", | ||
}, | ||
}, | ||
accountId: "account_id", | ||
accountId: GCP_STS_ACCOUNT_DATA_ID, | ||
}; | ||
|
||
apiInstance | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,12 +45,14 @@ Feature: GCP Integration | |
When the request is sent | ||
Then the response status is 409 Conflict | ||
|
||
@generated @skip @team:DataDog/gcp-integrations | ||
@team:DataDog/gcp-integrations | ||
Scenario: Create a new entry for your service account returns "OK" response | ||
Given new "CreateGCPSTSAccount" request | ||
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} | ||
And body with value {"data": {"attributes": {"client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} | ||
When the request is sent | ||
Then the response status is 201 OK | ||
Then the response status is 200 OK | ||
And the response "data.type" is equal to "gcp_service_account" | ||
And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com" | ||
|
||
@generated @skip @team:DataDog/gcp-integrations | ||
Scenario: Delete an STS enabled GCP Account returns "Bad Request" response | ||
|
@@ -74,7 +76,8 @@ Feature: GCP Integration | |
|
||
@team:DataDog/gcp-integrations | ||
Scenario: List all GCP STS-enabled service accounts returns "OK" response | ||
Given new "ListGCPSTSAccounts" request | ||
Given there is a valid "gcp_sts_account" in the system | ||
And new "ListGCPSTSAccounts" request | ||
When the request is sent | ||
Then the response status is 200 OK | ||
And the response "data" has item with field "type" with value "gcp_service_account" | ||
|
@@ -102,10 +105,11 @@ Feature: GCP Integration | |
When the request is sent | ||
Then the response status is 404 Not Found | ||
|
||
@generated @skip @team:DataDog/gcp-integrations | ||
@team:DataDog/gcp-integrations | ||
Scenario: Update STS Service Account returns "OK" response | ||
Given new "UpdateGCPSTSAccount" request | ||
And request contains "account_id" parameter from "REPLACE.ME" | ||
And body with value {"data": {"attributes": {"client_email": "[email protected]", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} | ||
Given there is a valid "gcp_sts_account" in the system | ||
And new "UpdateGCPSTSAccount" request | ||
And request contains "account_id" parameter from "gcp_sts_account.data.id" | ||
And body with value {"data": {"attributes": {"client_email": "{{ unique_hash }}@example.com", "host_filters": ["foo:bar"]}, "id": "{{ gcp_sts_account.data.id }}", "type": "gcp_service_account"}} | ||
When the request is sent | ||
Then the response status is 201 OK |
Oops, something went wrong.