Skip to content

Commit 8502a9f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 03fe362e of spec repo
1 parent 441b532 commit 8502a9f

File tree

9 files changed

+187
-22
lines changed

9 files changed

+187
-22
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.6",
7-
"regenerated": "2023-09-28 19:18:51.284056",
8-
"spec_repo_commit": "4b2bab38"
7+
"regenerated": "2023-09-29 12:47:15.081401",
8+
"spec_repo_commit": "03fe362e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-09-28 19:18:51.297998",
13-
"spec_repo_commit": "4b2bab38"
12+
"regenerated": "2023-09-29 12:47:15.100843",
13+
"spec_repo_commit": "03fe362e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5399,6 +5399,13 @@ components:
53995399
GCPSTSServiceAccountAttributes:
54005400
description: Attributes associated with your service account.
54015401
properties:
5402+
account_tags:
5403+
description: Tags to be associated with GCP metrics and service checks from
5404+
your account.
5405+
items:
5406+
description: Account Level Tag
5407+
type: string
5408+
type: array
54025409
automute:
54035410
description: Silence monitors for expected GCE instance shutdowns.
54045411
type: boolean
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-06-16T14:05:25.134Z"
1+
"2023-09-29T12:39:55.710Z"

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": "244386ca785e1a936a8eb76d486ba395",
11+
"_id": "d1521ff2cbc650411e9218068d5d6a7e",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"client_email\":\"47cdd79b4a719ac2@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"client_email\":\"80e3f00106389e6e@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"
3939
},
4040
"response": {
41-
"bodySize": 229,
41+
"bodySize": 247,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 229,
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"
44+
"size": 247,
45+
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"id\":\"d6c68645-2b52-43e9-838c-9b7fdb809a8d\",\"attributes\":{\"host_filters\":[],\"account_tags\":[],\"client_email\":\"80e3f00106389e6e@test-project.iam.gserviceaccount.com\",\"is_cspm_enabled\":false,\"automute\":false}}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 658,
54+
"headersSize": 657,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 201,
5858
"statusText": "Created"
5959
},
60-
"startedDateTime": "2023-06-16T14:05:25.145Z",
61-
"time": 196
60+
"startedDateTime": "2023-09-29T12:39:55.993Z",
61+
"time": 223
6262
},
6363
{
64-
"_id": "20a1fed0dc1a88198825904ecb3db9f0",
64+
"_id": "7683c40f34536c346491142980d75660",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,7 +78,7 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/3aa3ec77-9646-4f6a-bcd0-01e5124e2ad1"
81+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/d6c68645-2b52-43e9-838c-9b7fdb809a8d"
8282
},
8383
"response": {
8484
"bodySize": 0,
@@ -93,14 +93,14 @@
9393
"value": "text/html; charset=utf-8"
9494
}
9595
],
96-
"headersSize": 645,
96+
"headersSize": 644,
9797
"httpVersion": "HTTP/1.1",
9898
"redirectURL": "",
9999
"status": 204,
100100
"statusText": "No Content"
101101
},
102-
"startedDateTime": "2023-06-16T14:05:25.356Z",
103-
"time": 171
102+
"startedDateTime": "2023-09-29T12:39:56.226Z",
103+
"time": 202
104104
}
105105
],
106106
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-09-27T14:45:59.771Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"log": {
3+
"_recordingName": "GCP Integration/Create a new entry for your service account with account_tags returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "4f5b930c5c9b1952a77d6f90ad34f1c6",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 176,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 578,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"account_tags\":[\"lorem\",\"ipsum\"],\"client_email\":\"1f86730b653d0a57@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"
39+
},
40+
"response": {
41+
"bodySize": 262,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 262,
45+
"text": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"host_filters\":[],\"client_email\":\"1f86730b653d0a57@test-project.iam.gserviceaccount.com\",\"is_cspm_enabled\":false,\"automute\":false,\"account_tags\":[\"lorem\",\"ipsum\"]},\"id\":\"1cdedba8-a0a3-4036-82b0-ad8088dd0c02\"}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 658,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 201,
58+
"statusText": "Created"
59+
},
60+
"startedDateTime": "2023-09-27T14:46:00.145Z",
61+
"time": 370
62+
},
63+
{
64+
"_id": "ad93d1da3ff711df78b7add4d376ada9",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 551,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/1cdedba8-a0a3-4036-82b0-ad8088dd0c02"
82+
},
83+
"response": {
84+
"bodySize": 0,
85+
"content": {
86+
"mimeType": "text/html; charset=utf-8",
87+
"size": 0
88+
},
89+
"cookies": [],
90+
"headers": [
91+
{
92+
"name": "content-type",
93+
"value": "text/html; charset=utf-8"
94+
}
95+
],
96+
"headersSize": 645,
97+
"httpVersion": "HTTP/1.1",
98+
"redirectURL": "",
99+
"status": 204,
100+
"statusText": "No Content"
101+
},
102+
"startedDateTime": "2023-09-27T14:46:00.560Z",
103+
"time": 295
104+
}
105+
],
106+
"pages": [],
107+
"version": "1.2"
108+
}
109+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Create a new entry for your service account with account_tags returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.GCPIntegrationApi(configuration);
9+
10+
const params: v2.GCPIntegrationApiCreateGCPSTSAccountRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
accountTags: ["lorem", "ipsum"],
15+
clientEmail: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
16+
hostFilters: [],
17+
},
18+
type: "gcp_service_account",
19+
},
20+
},
21+
};
22+
23+
apiInstance
24+
.createGCPSTSAccount(params)
25+
.then((data: v2.GCPSTSServiceAccountResponse) => {
26+
console.log(
27+
"API called successfully. Returned data: " + JSON.stringify(data)
28+
);
29+
})
30+
.catch((error: any) => console.error(error));

features/v2/gcp_integration.feature

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ Feature: GCP Integration
3434
@generated @skip @team:DataDog/gcp-integrations
3535
Scenario: Create a new entry for your service account returns "Bad Request" response
3636
Given new "CreateGCPSTSAccount" request
37-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
37+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
3838
When the request is sent
3939
Then the response status is 400 Bad Request
4040

4141
@generated @skip @team:DataDog/gcp-integrations
4242
Scenario: Create a new entry for your service account returns "Conflict" response
4343
Given new "CreateGCPSTSAccount" request
44-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
44+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
4545
When the request is sent
4646
Then the response status is 409 Conflict
4747

@@ -54,6 +54,16 @@ Feature: GCP Integration
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

57+
@team:DataDog/gcp-integrations
58+
Scenario: Create a new entry for your service account with account_tags returns "OK" response
59+
Given new "CreateGCPSTSAccount" request
60+
And body with value {"data": {"attributes": {"account_tags": ["lorem", "ipsum"], "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}}
61+
When the request is sent
62+
Then the response status is 201 OK
63+
And the response "data.type" is equal to "gcp_service_account"
64+
And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com"
65+
And the response "data.attributes.account_tags" is equal to ["lorem", "ipsum"]
66+
5767
@generated @skip @team:DataDog/gcp-integrations
5868
Scenario: Delete an STS enabled GCP Account returns "Bad Request" response
5969
Given new "DeleteGCPSTSAccount" request
@@ -93,15 +103,15 @@ Feature: GCP Integration
93103
Scenario: Update STS Service Account returns "Bad Request" response
94104
Given new "UpdateGCPSTSAccount" request
95105
And request contains "account_id" parameter from "REPLACE.ME"
96-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
106+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
97107
When the request is sent
98108
Then the response status is 400 Bad Request
99109

100110
@generated @skip @team:DataDog/gcp-integrations
101111
Scenario: Update STS Service Account returns "Not Found" response
102112
Given new "UpdateGCPSTSAccount" request
103113
And request contains "account_id" parameter from "REPLACE.ME"
104-
And body with value {"data": {"attributes": {"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
114+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
105115
When the request is sent
106116
Then the response status is 404 Not Found
107117

packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1010
* Attributes associated with your service account.
1111
*/
1212
export class GCPSTSServiceAccountAttributes {
13+
/**
14+
* Tags to be associated with GCP metrics and service checks from your account.
15+
*/
16+
"accountTags"?: Array<string>;
1317
/**
1418
* Silence monitors for expected GCE instance shutdowns.
1519
*/
@@ -36,6 +40,10 @@ export class GCPSTSServiceAccountAttributes {
3640
* @ignore
3741
*/
3842
static readonly attributeTypeMap: AttributeTypeMap = {
43+
accountTags: {
44+
baseName: "account_tags",
45+
type: "Array<string>",
46+
},
3947
automute: {
4048
baseName: "automute",
4149
type: "boolean",

0 commit comments

Comments
 (0)