Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit fc3b03a

Browse files
devignedjhendrixMSFT
authored andcommitted
fix the sb suffix and add the sb aad resource uri (#244)
1 parent d4e6b95 commit fc3b03a

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## v9.10.0
4+
- Fix the Service Bus suffix in Azure public env
5+
- Add Service Bus Endpoint (AAD ResourceURI) for use in [Azure Service Bus RBAC Preview](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-role-based-access-control)
6+
37
## v9.9.0
48

59
### New Features

autorest/azure/environments.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ type Environment struct {
4444
GalleryEndpoint string `json:"galleryEndpoint"`
4545
KeyVaultEndpoint string `json:"keyVaultEndpoint"`
4646
GraphEndpoint string `json:"graphEndpoint"`
47+
ServiceBusEndpoint string `json:"serviceBusEndpoint"`
4748
StorageEndpointSuffix string `json:"storageEndpointSuffix"`
4849
SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"`
4950
TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"`
@@ -66,11 +67,12 @@ var (
6667
GalleryEndpoint: "https://gallery.azure.com/",
6768
KeyVaultEndpoint: "https://vault.azure.net/",
6869
GraphEndpoint: "https://graph.windows.net/",
70+
ServiceBusEndpoint: "https://servicebus.windows.net/",
6971
StorageEndpointSuffix: "core.windows.net",
7072
SQLDatabaseDNSSuffix: "database.windows.net",
7173
TrafficManagerDNSSuffix: "trafficmanager.net",
7274
KeyVaultDNSSuffix: "vault.azure.net",
73-
ServiceBusEndpointSuffix: "servicebus.azure.com",
75+
ServiceBusEndpointSuffix: "servicebus.windows.net",
7476
ServiceManagementVMDNSSuffix: "cloudapp.net",
7577
ResourceManagerVMDNSSuffix: "cloudapp.azure.com",
7678
ContainerRegistryDNSSuffix: "azurecr.io",
@@ -87,6 +89,7 @@ var (
8789
GalleryEndpoint: "https://gallery.usgovcloudapi.net/",
8890
KeyVaultEndpoint: "https://vault.usgovcloudapi.net/",
8991
GraphEndpoint: "https://graph.windows.net/",
92+
ServiceBusEndpoint: "https://servicebus.usgovcloudapi.net/",
9093
StorageEndpointSuffix: "core.usgovcloudapi.net",
9194
SQLDatabaseDNSSuffix: "database.usgovcloudapi.net",
9295
TrafficManagerDNSSuffix: "usgovtrafficmanager.net",
@@ -108,11 +111,12 @@ var (
108111
GalleryEndpoint: "https://gallery.chinacloudapi.cn/",
109112
KeyVaultEndpoint: "https://vault.azure.cn/",
110113
GraphEndpoint: "https://graph.chinacloudapi.cn/",
114+
ServiceBusEndpoint: "https://servicebus.chinacloudapi.cn/",
111115
StorageEndpointSuffix: "core.chinacloudapi.cn",
112116
SQLDatabaseDNSSuffix: "database.chinacloudapi.cn",
113117
TrafficManagerDNSSuffix: "trafficmanager.cn",
114118
KeyVaultDNSSuffix: "vault.azure.cn",
115-
ServiceBusEndpointSuffix: "servicebus.chinacloudapi.net",
119+
ServiceBusEndpointSuffix: "servicebus.chinacloudapi.cn",
116120
ServiceManagementVMDNSSuffix: "chinacloudapp.cn",
117121
ResourceManagerVMDNSSuffix: "cloudapp.azure.cn",
118122
ContainerRegistryDNSSuffix: "azurecr.io",
@@ -129,6 +133,7 @@ var (
129133
GalleryEndpoint: "https://gallery.cloudapi.de/",
130134
KeyVaultEndpoint: "https://vault.microsoftazure.de/",
131135
GraphEndpoint: "https://graph.cloudapi.de/",
136+
ServiceBusEndpoint: "https://servicebus.cloudapi.de/",
132137
StorageEndpointSuffix: "core.cloudapi.de",
133138
SQLDatabaseDNSSuffix: "database.cloudapi.de",
134139
TrafficManagerDNSSuffix: "azuretrafficmanager.de",

autorest/azure/environments_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ func TestDeserializeEnvironment(t *testing.T) {
127127
"ActiveDirectoryEndpoint": "--active-directory-endpoint--",
128128
"galleryEndpoint": "--gallery-endpoint--",
129129
"graphEndpoint": "--graph-endpoint--",
130+
"serviceBusEndpoint": "--service-bus-endpoint--",
130131
"keyVaultDNSSuffix": "--key-vault-dns-suffix--",
131132
"keyVaultEndpoint": "--key-vault-endpoint--",
132133
"managementPortalURL": "--management-portal-url--",
@@ -172,6 +173,9 @@ func TestDeserializeEnvironment(t *testing.T) {
172173
if "--key-vault-endpoint--" != testSubject.KeyVaultEndpoint {
173174
t.Errorf("Expected KeyVaultEndpoint to be \"--key-vault-endpoint--\", but got %q", testSubject.KeyVaultEndpoint)
174175
}
176+
if "--service-bus-endpoint--" != testSubject.ServiceBusEndpoint {
177+
t.Errorf("Expected ServiceBusEndpoint to be \"--service-bus-endpoint--\", but goet %q", testSubject.ServiceBusEndpoint)
178+
}
175179
if "--graph-endpoint--" != testSubject.GraphEndpoint {
176180
t.Errorf("Expected GraphEndpoint to be \"--graph-endpoint--\", but got %q", testSubject.GraphEndpoint)
177181
}
@@ -209,6 +213,7 @@ func TestRoundTripSerialization(t *testing.T) {
209213
GalleryEndpoint: "--gallery-endpoint--",
210214
KeyVaultEndpoint: "--key-vault--endpoint--",
211215
GraphEndpoint: "--graph-endpoint--",
216+
ServiceBusEndpoint: "--service-bus-endpoint--",
212217
StorageEndpointSuffix: "--storage-endpoint-suffix--",
213218
SQLDatabaseDNSSuffix: "--sql-database-dns-suffix--",
214219
TrafficManagerDNSSuffix: "--traffic-manager-dns-suffix--",
@@ -251,6 +256,9 @@ func TestRoundTripSerialization(t *testing.T) {
251256
if env.GalleryEndpoint != testSubject.GalleryEndpoint {
252257
t.Errorf("Expected GalleryEndpoint to be %q, but got %q", env.GalleryEndpoint, testSubject.GalleryEndpoint)
253258
}
259+
if env.ServiceBusEndpoint != testSubject.ServiceBusEndpoint {
260+
t.Errorf("Expected ServiceBusEnpoint to be %q, but got %q", env.ServiceBusEndpoint, testSubject.ServiceBusEndpoint)
261+
}
254262
if env.KeyVaultEndpoint != testSubject.KeyVaultEndpoint {
255263
t.Errorf("Expected KeyVaultEndpoint to be %q, but got %q", env.KeyVaultEndpoint, testSubject.KeyVaultEndpoint)
256264
}

0 commit comments

Comments
 (0)