Skip to content

Commit

Permalink
fix: allow the ability to use private endpoint from visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tyao117 committed Oct 14, 2024
1 parent 62cb947 commit 79caba1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ibm/conns/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1918,9 +1918,13 @@ func (c *Config) ClientSession() (interface{}, error) {

// SCC (Security and Compliance Center) Service
sccApiClientURL := scc.DefaultServiceURL
// Construct the service options.
if regionURL, sccRegionErr := scc.GetServiceURLForRegion(c.Region); sccRegionErr == nil {
sccApiClientURL = regionURL
// Construct the service configuration.
if c.Visibility == "private" {
sccApiClientURL = ContructEndpoint(fmt.Sprintf("private.%s.compliance", c.Region), cloudEndpoint)
} else {
if regionURL, sccRegionErr := scc.GetServiceURLForRegion(c.Region); sccRegionErr == nil {
sccApiClientURL = regionURL
}
}
sccApiClientOptions := &scc.SecurityAndComplianceCenterApiV3Options{
Authenticator: authenticator,
Expand Down

0 comments on commit 79caba1

Please sign in to comment.