Skip to content

Commit

Permalink
Update Cleanup script to use GCP STS endpoint (#2226)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Co-authored-by: Kevin Zou <[email protected]>
  • Loading branch information
3 people authored Mar 13, 2024
1 parent 84a9028 commit cfea091
Show file tree
Hide file tree
Showing 34 changed files with 112 additions and 106 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.6",
"regenerated": "2024-03-13 18:09:01.243635",
"spec_repo_commit": "29884c34"
"regenerated": "2024-03-13 19:22:40.099752",
"spec_repo_commit": "5745e5bb"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-03-13 18:09:01.260148",
"spec_repo_commit": "29884c34"
"regenerated": "2024-03-13 19:22:40.114877",
"spec_repo_commit": "5745e5bb"
}
}
}
3 changes: 2 additions & 1 deletion examples/v2/gcp-integration/CreateGCPSTSAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public static void main(String[] args) {
new GCPSTSServiceAccountData()
.attributes(
new GCPSTSServiceAccountAttributes()
.clientEmail("[email protected]"))
.clientEmail(
"[email protected]"))
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void main(String[] args) {
.attributes(
new GCPSTSServiceAccountAttributes()
.accountTags(Arrays.asList("lorem", "ipsum"))
.clientEmail("[email protected]"))
.clientEmail(
"[email protected]"))
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void main(String[] args) {
.attributes(
new GCPSTSServiceAccountAttributes()
.resourceCollectionEnabled(true)
.clientEmail("[email protected]"))
.clientEmail(
"[email protected]"))
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public static void main(String[] args) {
.attributes(
new GCPSTSServiceAccountAttributes()
.cloudRunRevisionFilters(Collections.singletonList("meh:bleh"))
.clientEmail("[email protected]"))
.clientEmail(
"[email protected]"))
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void main(String[] args) {
.attributes(
new GCPSTSServiceAccountAttributes()
.isSecurityCommandCenterEnabled(true)
.clientEmail("[email protected]"))
.clientEmail(
"[email protected]"))
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void main(String[] args) {
new GCPSTSServiceAccountAttributes()
.isCspmEnabled(true)
.resourceCollectionEnabled(true)
.clientEmail("[email protected]"))
.clientEmail(
"[email protected]"))
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));

try {
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/gcp-integration/UpdateGCPSTSAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void main(String[] args) {
new GCPSTSServiceAccountUpdateRequestData()
.attributes(
new GCPSTSServiceAccountAttributes()
.clientEmail("[email protected]")
.clientEmail("Test-[email protected]")
.hostFilters(Collections.singletonList("foo:bar")))
.id(GCP_STS_ACCOUNT_DATA_ID)
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void main(String[] args) {
new GCPSTSServiceAccountUpdateRequestData()
.attributes(
new GCPSTSServiceAccountAttributes()
.clientEmail("[email protected]")
.clientEmail("Test-[email protected]")
.cloudRunRevisionFilters(Collections.singletonList("merp:derp")))
.id(GCP_STS_ACCOUNT_DATA_ID)
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void main(String[] args) {
new GCPSTSServiceAccountUpdateRequestData()
.attributes(
new GCPSTSServiceAccountAttributes()
.clientEmail("[email protected]")
.clientEmail("Test-[email protected]")
.resourceCollectionEnabled(true))
.id(GCP_STS_ACCOUNT_DATA_ID)
.type(GCPServiceAccountType.GCP_SERVICE_ACCOUNT));
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-09-29T12:39:55.710Z
2024-03-11T19:47:20.859Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"client_email\":\"80e3f00106389e6e@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
"json": "{\"data\":{\"attributes\":{\"client_email\":\"Test-8b2b196dd4bab7e2@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"id\":\"d6c68645-2b52-43e9-838c-9b7fdb809a8d\",\"attributes\":{\"host_filters\":[],\"account_tags\":[],\"client_email\":\"[email protected]\",\"is_cspm_enabled\":false,\"automute\":false}}}\n",
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"[email protected]\",\"is_security_command_center_enabled\":false,\"resource_collection_enabled\":false,\"cloud_run_revision_filters\":[],\"automute\":false,\"is_cspm_enabled\":false,\"account_tags\":[],\"host_filters\":[]},\"id\":\"e6f0237e-b9c2-4513-9940-d2473502e39e\"}}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "d1521ff2-cbc6-5041-1e92-18068d5d6a7e"
"id": "4a486d97-4ff0-dd09-4e91-6f0ae1f10a15"
},
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/integration/gcp/accounts/d6c68645-2b52-43e9-838c-9b7fdb809a8d",
"path": "/api/v2/integration/gcp/accounts/e6f0237e-b9c2-4513-9940-d2473502e39e",
"keepAlive": false,
"secure": true
},
Expand All @@ -52,6 +52,6 @@
"timeToLive": {
"unlimited": true
},
"id": "7683c40f-3453-6c34-6491-142980d75660"
"id": "5bac2c7f-8f0f-98ad-2275-555ba6d08d4b"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-09-27T14:45:59.771Z
2024-03-11T19:47:22.769Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"account_tags\":[\"lorem\",\"ipsum\"],\"client_email\":\"1f86730b653d0a57@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
"json": "{\"data\":{\"attributes\":{\"account_tags\":[\"lorem\",\"ipsum\"],\"client_email\":\"Test-e5f8eebedfc95a5e@test-project.iam.gserviceaccount.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"host_filters\":[],\"client_email\":\"[email protected]\",\"is_cspm_enabled\":false,\"automute\":false,\"account_tags\":[\"lorem\",\"ipsum\"]},\"id\":\"1cdedba8-a0a3-4036-82b0-ad8088dd0c02\"}}\n",
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"account_tags\":[\"lorem\",\"ipsum\"],\"cloud_run_revision_filters\":[],\"is_security_command_center_enabled\":false,\"host_filters\":[],\"client_email\":\"[email protected]\",\"automute\":false},\"id\":\"62f1287b-89d6-414d-8b80-713208d91299\"}}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "4f5b930c-5c9b-1952-a77d-6f90ad34f1c6"
"id": "3061850e-ade4-1e3b-1709-32ad999d6c88"
},
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/integration/gcp/accounts/1cdedba8-a0a3-4036-82b0-ad8088dd0c02",
"path": "/api/v2/integration/gcp/accounts/62f1287b-89d6-414d-8b80-713208d91299",
"keepAlive": false,
"secure": true
},
Expand All @@ -52,6 +52,6 @@
"timeToLive": {
"unlimited": true
},
"id": "ad93d1da-3ff7-11df-78b7-add4d376ada9"
"id": "52057578-77b2-f2d9-840c-6fdaa9864d44"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-01-31T21:16:04.924Z
2024-03-11T19:47:23.464Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"client_email\":\"feb37f50ee7be467@test-project.iam.gserviceaccount.com\",\"cloud_run_revision_filters\":[\"meh:bleh\"],\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
"json": "{\"data\":{\"attributes\":{\"client_email\":\"Test-1701e5fecd52895c@test-project.iam.gserviceaccount.com\",\"cloud_run_revision_filters\":[\"meh:bleh\"],\"host_filters\":[]},\"type\":\"gcp_service_account\"}}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"cloud_run_revision_filters\":[\"meh:bleh\"],\"resource_collection_enabled\":false,\"host_filters\":[],\"automute\":false,\"is_cspm_enabled\":false,\"account_tags\":[],\"client_email\":\"feb37f50ee7be467@test-project.iam.gserviceaccount.com\",\"is_security_command_center_enabled\":false},\"id\":\"e1157377-8d5c-4a94-9730-10c3fa9d6ff5\"}}\n",
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"id\":\"58054a77-4ee0-44a8-8260-4eec67ddcced\",\"attributes\":{\"is_cspm_enabled\":false,\"automute\":false,\"is_security_command_center_enabled\":false,\"client_email\":\"Test-1701e5fecd52895c@test-project.iam.gserviceaccount.com\",\"resource_collection_enabled\":false,\"account_tags\":[],\"host_filters\":[],\"cloud_run_revision_filters\":[\"meh:bleh\"]}}}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "47a66398-572b-0d1d-83f9-556e64ce5555"
"id": "68a01f0d-c95d-3bcd-643b-72a378f86cfd"
},
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/integration/gcp/accounts/e1157377-8d5c-4a94-9730-10c3fa9d6ff5",
"path": "/api/v2/integration/gcp/accounts/58054a77-4ee0-44a8-8260-4eec67ddcced",
"keepAlive": false,
"secure": true
},
Expand All @@ -52,6 +52,6 @@
"timeToLive": {
"unlimited": true
},
"id": "1a91e883-4df7-6cf0-f341-faea9cbad7e6"
"id": "1aa9a33d-4096-3ed0-7ae9-414b22a39cb1"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-15T08:45:38.020Z
2024-03-11T19:47:24.085Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"client_email\":\"9f53cbf93a21704b@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":true,\"resource_collection_enabled\":true},\"type\":\"gcp_service_account\"}}"
"json": "{\"data\":{\"attributes\":{\"client_email\":\"Test-e7179b69d4d565ed@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":true,\"resource_collection_enabled\":true},\"type\":\"gcp_service_account\"}}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":true,\"account_tags\":[],\"host_filters\":[],\"resource_collection_enabled\":true,\"is_security_command_center_enabled\":false,\"client_email\":\"9f53cbf93a21704b@test-project.iam.gserviceaccount.com\",\"automute\":false},\"id\":\"cf3c6e32-dad2-452e-8c09-f34c5f2211a1\"}}\n",
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":true,\"host_filters\":[],\"resource_collection_enabled\":true,\"cloud_run_revision_filters\":[],\"client_email\":\"Test-e7179b69d4d565ed@test-project.iam.gserviceaccount.com\",\"automute\":false,\"is_security_command_center_enabled\":false,\"account_tags\":[]},\"id\":\"9d359745-b1c0-41ba-9624-db7abb36904b\"}}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "9f43c5f2-0e3a-3f77-eabe-c51f945c2d38"
"id": "13ca4d0c-4f3d-0620-9dd7-622c896dd7df"
},
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/integration/gcp/accounts/cf3c6e32-dad2-452e-8c09-f34c5f2211a1",
"path": "/api/v2/integration/gcp/accounts/9d359745-b1c0-41ba-9624-db7abb36904b",
"keepAlive": false,
"secure": true
},
Expand All @@ -52,6 +52,6 @@
"timeToLive": {
"unlimited": true
},
"id": "ad85416a-ab2d-0560-382c-2997af729573"
"id": "9be7f5e0-526e-6b08-63da-1824cdca9c1a"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-13T21:29:09.936Z
2024-03-11T19:47:24.676Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"client_email\":\"328d5a676e7e2219@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":true,\"resource_collection_enabled\":false},\"type\":\"gcp_service_account\"}}"
"json": "{\"data\":{\"attributes\":{\"client_email\":\"Test-f92057aa6491025d@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":true,\"resource_collection_enabled\":false},\"type\":\"gcp_service_account\"}}"
},
"headers": {},
"method": "POST",
Expand All @@ -27,6 +27,6 @@
"timeToLive": {
"unlimited": true
},
"id": "bb5dd9c9-0fae-a055-d44e-d8aadeb2ad6f"
"id": "7f6b902d-a633-05ee-c62a-40cbe34bba70"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-13T21:29:10.005Z
2024-03-11T19:47:24.798Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"data\":{\"attributes\":{\"client_email\":\"c200eb5fe37e7d26@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"resource_collection_enabled\":true},\"type\":\"gcp_service_account\"}}"
"json": "{\"data\":{\"attributes\":{\"client_email\":\"Test-c8176325bf516421@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"resource_collection_enabled\":true},\"type\":\"gcp_service_account\"}}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"is_security_command_center_enabled\":false,\"host_filters\":[],\"client_email\":\"[email protected]\",\"resource_collection_enabled\":true,\"account_tags\":[],\"is_cspm_enabled\":false},\"id\":\"e0e0b030-aba8-4eff-bcf2-7d4266d0d7fd\"}}\n",
"body": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":false,\"automute\":false,\"cloud_run_revision_filters\":[],\"host_filters\":[],\"is_security_command_center_enabled\":false,\"account_tags\":[],\"resource_collection_enabled\":true,\"client_email\":\"[email protected]\"},\"id\":\"584395b0-91b7-4ac0-83b2-3259a49ea34f\"}}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "bd2a1b51-9954-a7fe-88bc-dab21eba06ab"
"id": "d680746a-89f9-c2fc-c3ca-b64ce7efcf39"
},
{
"httpRequest": {
"headers": {},
"method": "DELETE",
"path": "/api/v2/integration/gcp/accounts/e0e0b030-aba8-4eff-bcf2-7d4266d0d7fd",
"path": "/api/v2/integration/gcp/accounts/584395b0-91b7-4ac0-83b2-3259a49ea34f",
"keepAlive": false,
"secure": true
},
Expand All @@ -52,6 +52,6 @@
"timeToLive": {
"unlimited": true
},
"id": "f2ac0fa6-4115-4aad-8c5f-c5bb0c5f377e"
"id": "c70192d3-1d27-57f7-5ff4-f36caeb67a37"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-13T21:29:10.722Z
2024-03-11T19:47:25.315Z
Loading

0 comments on commit cfea091

Please sign in to comment.