Skip to content

Commit

Permalink
Regenerate client from commit 3379aa10 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jun 15, 2023
1 parent 5a00d58 commit a0d2dbd
Show file tree
Hide file tree
Showing 14 changed files with 414 additions and 29 deletions.
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-14 19:36:50.047106",
"spec_repo_commit": "aafb3db6"
"regenerated": "2023-06-15 13:35:21.734497",
"spec_repo_commit": "3379aa10"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-06-14 19:36:50.066398",
"spec_repo_commit": "aafb3db6"
"regenerated": "2023-06-15 13:35:21.747660",
"spec_repo_commit": "3379aa10"
}
}
}
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17988,7 +17988,7 @@ paths:
$ref: '#/components/schemas/GCPSTSServiceAccountCreateRequest'
required: true
responses:
'201':
'200':
content:
application/json:
schema:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2023-06-14T15:44:49.306Z"
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"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2023-05-18T15:03:23.705Z"
"2023-06-14T15:52:33.117Z"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2023-06-14T16:04:56.302Z"
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"
}
}
3 changes: 1 addition & 2 deletions examples/v2/gcp-integration/CreateGCPSTSAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
body: {
data: {
attributes: {
clientEmail:
"[email protected]",
clientEmail: "[email protected]",
hostFilters: [],
},
type: "gcp_service_account",
Expand Down
12 changes: 7 additions & 5 deletions examples/v2/gcp-integration/UpdateGCPSTSAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 12 additions & 8 deletions features/v2/gcp_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Loading

0 comments on commit a0d2dbd

Please sign in to comment.