Skip to content

Commit

Permalink
Event Notifications: enabled private endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankaj Kumar authored and hkantare committed Feb 6, 2024
1 parent d727172 commit 9d2f3ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ibm/conns/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1884,11 +1884,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://private.%s.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)
}
Expand Down

0 comments on commit 9d2f3ae

Please sign in to comment.