From b0b7a9996e5bde69e4d85d022f32833e52c3c4ba Mon Sep 17 00:00:00 2001 From: Pankaj Kumar Date: Thu, 14 Dec 2023 10:12:05 +0530 Subject: [PATCH] Event Notifications: enabled private endpoint --- ibm/conns/config.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ibm/conns/config.go b/ibm/conns/config.go index fd99350034..c7bf750ee3 100644 --- a/ibm/conns/config.go +++ b/ibm/conns/config.go @@ -1881,11 +1881,14 @@ func (c *Config) ClientSession() (interface{}, error) { }) } session.pushServiceClient = pnclient + // event notifications enurl := fmt.Sprintf("https://%s.event-notifications.cloud.ibm.com/event-notifications", c.Region) - if c.Visibility == "private" { - session.eventNotificationsApiClientErr = fmt.Errorf("Event Notifications Service does not support private endpoints") + + if c.Visibility == "private" || c.Visibility == "public-and-private" { + enurl = fmt.Sprintf("https://%s.private.event-notifications.cloud.ibm.com/event-notifications", c.Region) } + if fileMap != nil && c.Visibility != "public-and-private" { enurl = fileFallBack(fileMap, c.Visibility, "IBMCLOUD_EVENT_NOTIFICATIONS_API_ENDPOINT", c.Region, enurl) }