-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Cleanup script to use GCP STS endpoint (#2226)
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
1 parent
84a9028
commit cfea091
Showing
34 changed files
with
112 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
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 |
---|---|---|
|
@@ -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 { | ||
|
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 |
---|---|---|
|
@@ -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 { | ||
|
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 |
---|---|---|
|
@@ -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 { | ||
|
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 |
---|---|---|
|
@@ -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 { | ||
|
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 |
---|---|---|
|
@@ -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 { | ||
|
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 |
---|---|---|
|
@@ -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)); | ||
|
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 |
---|---|---|
|
@@ -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)); | ||
|
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 |
---|---|---|
|
@@ -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)); | ||
|
2 changes: 1 addition & 1 deletion
2
...settes/features/v2/Create_a_new_entry_for_your_service_account_returns_OK_response.freeze
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-09-29T12:39:55.710Z | ||
2024-03-11T19:47:20.859Z |
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 |
---|---|---|
|
@@ -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", | ||
|
@@ -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" | ||
|
@@ -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 | ||
}, | ||
|
@@ -52,6 +52,6 @@ | |
"timeToLive": { | ||
"unlimited": true | ||
}, | ||
"id": "7683c40f-3453-6c34-6491-142980d75660" | ||
"id": "5bac2c7f-8f0f-98ad-2275-555ba6d08d4b" | ||
} | ||
] |
2 changes: 1 addition & 1 deletion
2
.../Create_a_new_entry_for_your_service_account_with_account_tags_returns_OK_response.freeze
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-09-27T14:45:59.771Z | ||
2024-03-11T19:47:22.769Z |
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 |
---|---|---|
|
@@ -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", | ||
|
@@ -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" | ||
|
@@ -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 | ||
}, | ||
|
@@ -52,6 +52,6 @@ | |
"timeToLive": { | ||
"unlimited": true | ||
}, | ||
"id": "ad93d1da-3ff7-11df-78b7-add4d376ada9" | ||
"id": "52057578-77b2-f2d9-840c-6fdaa9864d44" | ||
} | ||
] |
2 changes: 1 addition & 1 deletion
2
...r_your_service_account_with_cloud_run_revision_filters_enabled_returns_OK_response.freeze
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 @@ | ||
2024-01-31T21:16:04.924Z | ||
2024-03-11T19:47:23.464Z |
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
2 changes: 1 addition & 1 deletion
2
.../Create_a_new_entry_for_your_service_account_with_cspm_enabled_returns_OK_response.freeze
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-12-15T08:45:38.020Z | ||
2024-03-11T19:47:24.085Z |
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
2 changes: 1 addition & 1 deletion
2
...resource_collection_enabled_disabled_and_cspm_enabled_returns_Bad_Request_response.freeze
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-12-13T21:29:09.936Z | ||
2024-03-11T19:47:24.676Z |
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
2 changes: 1 addition & 1 deletion
2
...ntry_for_your_service_account_with_resource_collection_enabled_returns_OK_response.freeze
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-12-13T21:29:10.005Z | ||
2024-03-11T19:47:24.798Z |
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 |
---|---|---|
|
@@ -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", | ||
|
@@ -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" | ||
|
@@ -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 | ||
}, | ||
|
@@ -52,6 +52,6 @@ | |
"timeToLive": { | ||
"unlimited": true | ||
}, | ||
"id": "f2ac0fa6-4115-4aad-8c5f-c5bb0c5f377e" | ||
"id": "c70192d3-1d27-57f7-5ff4-f36caeb67a37" | ||
} | ||
] |
2 changes: 1 addition & 1 deletion
2
..._for_your_service_account_with_security_command_center_enabled_returns_OK_response.freeze
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-12-13T21:29:10.722Z | ||
2024-03-11T19:47:25.315Z |
Oops, something went wrong.