From d12dde5fdf1a208212ecbd273953cc1eea91b8d4 Mon Sep 17 00:00:00 2001 From: Matt Searle Date: Fri, 13 Dec 2024 23:11:32 +0100 Subject: [PATCH] feat(chronicle-endpoints): add support for all Google SecOps regions endpoints in the chronicle unstructured log sink --- ...hronicle_regional_endpoints.enhancement.md | 3 + .../gcp_chronicle/chronicle_unstructured.rs | 62 ++++++++++++++++++- 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 changelog.d/add_chronicle_regional_endpoints.enhancement.md diff --git a/changelog.d/add_chronicle_regional_endpoints.enhancement.md b/changelog.d/add_chronicle_regional_endpoints.enhancement.md new file mode 100644 index 0000000000000..91e03f2fd8fba --- /dev/null +++ b/changelog.d/add_chronicle_regional_endpoints.enhancement.md @@ -0,0 +1,3 @@ +Add support for more chronicle regional endpoints as listed - https://cloud.google.com/chronicle/docs/reference/ingestion-api#regional_endpoints + +authors: chocpanda diff --git a/src/sinks/gcp_chronicle/chronicle_unstructured.rs b/src/sinks/gcp_chronicle/chronicle_unstructured.rs index aba02d742452e..5a812856e84e5 100644 --- a/src/sinks/gcp_chronicle/chronicle_unstructured.rs +++ b/src/sinks/gcp_chronicle/chronicle_unstructured.rs @@ -69,14 +69,56 @@ pub enum GcsHealthcheckError { #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[serde(rename_all = "snake_case")] pub enum Region { - /// EU region. + /// European Multi region - "https://europe-malachiteingestion-pa.googleapis.com". Eu, - /// US region. + /// US Multi region - "https://malachiteingestion-pa.googleapis.com". Us, - /// APAC region. + /// APAC region (this is the same as the Singapore region endpoint retained for backwards compatibility) - "https://asia-southeast1-malachiteingestion-pa.googleapis.com". Asia, + + /// SãoPaulo Region - "https://southamerica-east1-malachiteingestion-pa.googleapis.com" + SãoPaulo, + + /// Canada Region - "https://northamerica-northeast2-malachiteingestion-pa.googleapis.com" + Canada, + + /// Dammam Region - "https://me-central2-malachiteingestion-pa.googleapis.com" + Dammam, + + /// Doha Region - "https://me-central1-malachiteingestion-pa.googleapis.com" + Doha, + + /// Frankfurt Region - "https://europe-west3-malachiteingestion-pa.googleapis.com" + Frankfurt, + + /// London Region - "https://europe-west2-malachiteingestion-pa.googleapis.com" + London, + + /// Mumbai Region - "https://asia-south1-malachiteingestion-pa.googleapis.com" + Mumbai, + + /// Paris Region - "https://europe-west9-malachiteingestion-pa.googleapis.com" + Paris, + + /// Singapore Region - "https://asia-southeast1-malachiteingestion-pa.googleapis.com" + Singapore, + + /// Sydney Region - "https://australia-southeast1-malachiteingestion-pa.googleapis.com" + Sydney, + + /// TelAviv Region - "https://me-west1-malachiteingestion-pa.googleapis.com" + TelAviv, + + /// Tokyo Region - "https://asia-northeast1-malachiteingestion-pa.googleapis.com" + Tokyo, + + /// Turin Region - "https://europe-west12-malachiteingestion-pa.googleapis.com" + Turin, + + /// Zurich Region - "https://europe-west6-malachiteingestion-pa.googleapis.com" + Zurich, } impl Region { @@ -86,6 +128,20 @@ impl Region { Region::Eu => "https://europe-malachiteingestion-pa.googleapis.com", Region::Us => "https://malachiteingestion-pa.googleapis.com", Region::Asia => "https://asia-southeast1-malachiteingestion-pa.googleapis.com", + Region::SãoPaulo => "https://southamerica-east1-malachiteingestion-pa.googleapis.com", + Region::Canada => "https://northamerica-northeast2-malachiteingestion-pa.googleapis.com", + Region::Dammam => "https://me-central2-malachiteingestion-pa.googleapis.com", + Region::Doha => "https://me-central1-malachiteingestion-pa.googleapis.com", + Region::Frankfurt => "https://europe-west3-malachiteingestion-pa.googleapis.com", + Region::London => "https://europe-west2-malachiteingestion-pa.googleapis.com", + Region::Mumbai => "https://asia-south1-malachiteingestion-pa.googleapis.com", + Region::Paris => "https://europe-west9-malachiteingestion-pa.googleapis.com", + Region::Singapore => "https://asia-southeast1-malachiteingestion-pa.googleapis.com", + Region::Sydney => "https://australia-southeast1-malachiteingestion-pa.googleapis.com", + Region::TelAviv => "https://me-west1-malachiteingestion-pa.googleapis.com", + Region::Tokyo => "https://asia-northeast1-malachiteingestion-pa.googleapis.com", + Region::Turin => "https://europe-west12-malachiteingestion-pa.googleapis.com", + Region::Zurich => "https://europe-west6-malachiteingestion-pa.googleapis.com", } } }