Skip to content

Commit f7b979f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3379aa10 of spec repo
1 parent 42a975f commit f7b979f

13 files changed

+177
-21
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-14 19:36:43.904832",
8-
"spec_repo_commit": "aafb3db6"
7+
"regenerated": "2023-06-15 13:35:24.180035",
8+
"spec_repo_commit": "3379aa10"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-06-14 19:36:43.917759",
13-
"spec_repo_commit": "aafb3db6"
12+
"regenerated": "2023-06-15 13:35:24.199262",
13+
"spec_repo_commit": "3379aa10"
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-
'201':
17991+
'200':
1799217992
content:
1799317993
application/json:
1799417994
schema:

examples/v2/gcp-integration/CreateGCPSTSAccount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
body = GCPSTSServiceAccountCreateRequest(
1313
data=GCPSTSServiceAccountData(
1414
attributes=GCPSTSServiceAccountAttributes(
15-
client_email="datadog-service-account@test-project.iam.gserviceaccount.com",
15+
client_email="252bf553ef04b351@test-project.iam.gserviceaccount.com",
1616
host_filters=[],
1717
),
1818
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,

examples/v2/gcp-integration/UpdateGCPSTSAccount.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@
22
Update STS Service Account returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client import ApiClient, Configuration
67
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
78
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
89
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
910
from datadog_api_client.v2.model.gcpsts_service_account_update_request import GCPSTSServiceAccountUpdateRequest
1011
from datadog_api_client.v2.model.gcpsts_service_account_update_request_data import GCPSTSServiceAccountUpdateRequestData
1112

13+
# there is a valid "gcp_sts_account" in the system
14+
GCP_STS_ACCOUNT_DATA_ID = environ["GCP_STS_ACCOUNT_DATA_ID"]
15+
1216
body = GCPSTSServiceAccountUpdateRequest(
1317
data=GCPSTSServiceAccountUpdateRequestData(
1418
attributes=GCPSTSServiceAccountAttributes(
15-
client_email="[email protected]",
16-
host_filters=[],
19+
client_email="[email protected]",
20+
host_filters=[
21+
"foo:bar",
22+
],
1723
),
18-
id="d291291f-12c2-22g4-j290-123456678897",
24+
id=GCP_STS_ACCOUNT_DATA_ID,
1925
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
2026
),
2127
)
2228

2329
configuration = Configuration()
2430
with ApiClient(configuration) as api_client:
2531
api_instance = GCPIntegrationApi(api_client)
26-
response = api_instance.update_gcpsts_account(account_id="account_id", body=body)
32+
response = api_instance.update_gcpsts_account(account_id=GCP_STS_ACCOUNT_DATA_ID, body=body)
2733

2834
print(response)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-06-14T15:44:49.306Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"client_email":"[email protected]","host_filters":[]},"type":"gcp_service_account"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts
11+
response:
12+
body:
13+
string: '{"data":{"type":"gcp_service_account","attributes":{"automute":false,"client_email":"[email protected]","host_filters":[],"is_cspm_enabled":false},"id":"c86125c9-ee6d-46ba-997a-23006cfd1575"}}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: null
24+
headers:
25+
accept:
26+
- '*/*'
27+
method: DELETE
28+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts/c86125c9-ee6d-46ba-997a-23006cfd1575
29+
response:
30+
body:
31+
string: ''
32+
headers:
33+
content-type:
34+
- text/html; charset=utf-8
35+
status:
36+
code: 204
37+
message: No Content
38+
version: 1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-05-18T15:03:23.705Z
1+
2023-06-14T15:52:33.117Z

tests/v2/cassettes/test_scenarios/test_list_all_gcp_stsenabled_service_accounts_returns_ok_response.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"client_email":"[email protected]","host_filters":[]},"type":"gcp_service_account"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts
11+
response:
12+
body:
13+
string: '{"data":{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"00fecf2b-ccf5-4b7f-954c-845173d99179"}}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
222
- request:
323
body: null
424
headers:
@@ -8,7 +28,7 @@ interactions:
828
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts
929
response:
1030
body:
11-
string: '{"data":[{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":["lots","of","filters"],"automute":true,"is_cspm_enabled":true},"id":"4287ec45-bd6b-40d5-b378-de5b3c569155","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"d4738a71-7f23-4af4-a5bf-ad6143b3a5f0","meta":{"accessible_projects":["datadog-staging"]}},{"type":"gcp_service_account","attributes":{"client_email":"joshua-delete-me-terraform-testing-2","host_filters":[],"automute":true,"is_cspm_enabled":true},"id":"f96f39ea-77b0-4886-a46d-2612e5290664","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"c5a7ebfd-c4fd-4542-86f0-9eafc413589e","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"0828a7c8-d9c0-4d62-bd8e-f05b71ac3f6f","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"9a505da5-e01e-4f8a-963f-f8d8302f7cd6","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"testing_v2_endpoint_josh_2","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"1fee30d3-2432-4145-9e1a-9ded9a311d2a","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"joshuatesting","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"6a274bbb-fd4e-4864-9afc-36d19a7d7fb5","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"3e4a32a5-158a-4441-9040-bf2fdcb7b655","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"3d723d45-04ee-46f5-a699-c35a39c4b5a3","meta":{"accessible_projects":["datadog-sandbox"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":["test:true"],"automute":false,"is_cspm_enabled":true},"id":"17a82d20-1a7f-47b8-8342-7b8f42c1ea89","meta":{"accessible_projects":["datadog-sandbox"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":["potato:potahto"],"automute":false,"is_cspm_enabled":true},"id":"950b23da-adb7-4625-825d-20ec6118803a","meta":{"accessible_projects":["datadog-sandbox"]}},{"type":"gcp_service_account","attributes":{"client_email":"mitch-hierarchy-test-account@datadog-gcp-ints-test-b.iam.gserviceaccount.com","host_filters":[],"automute":true,"is_cspm_enabled":true},"id":"b7bd7831-26c0-426b-a72f-797fc2a35514","meta":{"accessible_projects":["datadog-gcp-ints-test-b"]}},{"type":"gcp_service_account","attributes":{"client_email":"staging-crawl-account@datadog-gcp-ints-test-c.iam.gserviceaccount.com","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"c71fc786-2ee3-4643-9b2b-753f0c59e04e","meta":{"accessible_projects":["datadog-gcp-ints-test-c"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"fe6926ed-3ec8-477a-993d-7b960f4c6da4","meta":{"accessible_projects":["datadog-eventarc-dev"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"b85bb514-e997-4b50-88b5-d3c38a44d84d","meta":{"accessible_projects":["datadog-sandbox"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"064f8cd5-2545-46d2-a21d-dad13b637d24","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"e45e015c-13d7-4b03-bae5-a79bc7c55706","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"7e638eed-f4b4-4b2b-a854-5a50d6b25325","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"josh-testing-v2","host_filters":[],"automute":true,"is_cspm_enabled":false},"id":"173a52cb-4218-42ef-b977-08ffd7c49d88","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"6df000a2-515e-4541-845d-54dd475a6b4c","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"cf0f3638-bb5d-4d05-81cd-1c8c0d038ffb","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"cd896a52-f6c2-4c89-a060-fba960e6d847","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"ae5a0b9d-1ddf-4a87-b9f2-562f7fde8364","meta":{"accessible_projects":["datadog-gcp-ints-test-b","datadog-gcp-ints-test-c"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"47f9fa86-0854-441d-b2b4-1e7e0c721de3","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"d3a64dfc-60cb-4765-9d8d-c5cba145be71","meta":{"accessible_projects":["cspm-terraform"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"dbc365c2-108b-45ec-8b32-da9c817ef116","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":["brand","new"],"automute":false,"is_cspm_enabled":false},"id":"fac2c99e-7ba8-4a13-9558-003a13d019da","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":["k:v"],"automute":false,"is_cspm_enabled":false},"id":"d8e508ec-546f-407a-b16f-08f525a0a8d8","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"7b325857-bfb5-477f-a1dd-84386590b76d","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"testing_v2_endpoint_josh_3","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"2056ea74-f0b1-42f0-91d0-7e3bf73224c7","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"joshua-delete-me-terraform-testing-3","host_filters":[],"automute":false,"is_cspm_enabled":true},"id":"c590766f-fef1-46e9-9b25-a84d27ab1882","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"68140f7e-8f70-4a67-a3b9-88f0c2594a31","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"a80dd4b7-beed-4152-a13a-e5b4e5ce225f","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"18009dfa-0dce-4e8b-a16f-4156c0a5ceae","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"9ce798c8-9703-4e72-ad86-00f85ededd4c","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"91e006f6-38bf-46aa-93d4-09987cb8cf71","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"8724c8b2-f186-4471-8be1-44ccbd33d3b0","meta":{"accessible_projects":["datadog-cloud-ints-staging"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"d88004c8-221b-4d28-922f-9a124f8b508a","meta":{"accessible_projects":["datadog-sandbox"]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"a0c294d2-f57b-4cf7-8944-8739b1566f8e","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"testing_v2_endpoint_josh","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"9e690d47-d975-4c40-9900-6d5eae6dd3d6","meta":{"accessible_projects":[]}},{"type":"gcp_service_account","attributes":{"client_email":"[email protected]","host_filters":[],"automute":false,"is_cspm_enabled":false},"id":"b46c7744-b4ad-4b3b-b521-0114960b935b","meta":{"accessible_projects":["datadog-sandbox"]}}]}
31+
string: '{"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"}]}
1232
1333
'
1434
headers:
@@ -17,4 +37,20 @@ interactions:
1737
status:
1838
code: 200
1939
message: OK
40+
- request:
41+
body: null
42+
headers:
43+
accept:
44+
- '*/*'
45+
method: DELETE
46+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts/00fecf2b-ccf5-4b7f-954c-845173d99179
47+
response:
48+
body:
49+
string: ''
50+
headers:
51+
content-type:
52+
- text/html; charset=utf-8
53+
status:
54+
code: 204
55+
message: No Content
2056
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-06-14T16:04:56.302Z
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"client_email":"[email protected]","host_filters":[]},"type":"gcp_service_account"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts
11+
response:
12+
body:
13+
string: '{"data":{"type":"gcp_service_account","attributes":{"is_cspm_enabled":false,"host_filters":[],"automute":false,"client_email":"[email protected]"},"id":"fa9bd370-fe91-498b-8d02-a25baecc5a60"}}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"data":{"attributes":{"client_email":"[email protected]","host_filters":["foo:bar"]},"id":"fa9bd370-fe91-498b-8d02-a25baecc5a60","type":"gcp_service_account"}}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: PATCH
30+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts/fa9bd370-fe91-498b-8d02-a25baecc5a60
31+
response:
32+
body:
33+
string: '{"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"}}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 201
41+
message: Created
42+
- request:
43+
body: null
44+
headers:
45+
accept:
46+
- '*/*'
47+
method: DELETE
48+
uri: https://api.datadoghq.com/api/v2/integration/gcp/accounts/fa9bd370-fe91-498b-8d02-a25baecc5a60
49+
response:
50+
body:
51+
string: ''
52+
headers:
53+
content-type:
54+
- text/html; charset=utf-8
55+
status:
56+
code: 204
57+
message: No Content
58+
version: 1

0 commit comments

Comments
 (0)