diff --git a/sdk/environments/azure_china.go b/sdk/environments/azure_china.go index 056ef77b62f..cdf44dcc866 100644 --- a/sdk/environments/azure_china.go +++ b/sdk/environments/azure_china.go @@ -29,6 +29,8 @@ func AzureChina() *Environment { env.ManagedHSM = ManagedHSMAPI("https://managedhsm.azure.cn", "managedhsm.azure.cn") env.MariaDB = MariaDBAPI("mariadb.database.chinacloudapi.cn").WithResourceIdentifier("https://ossrdbms-aad.database.chinacloudapi.cn") env.MySql = MySqlAPI("mysql.database.chinacloudapi.cn").WithResourceIdentifier("https://ossrdbms-aad.database.chinacloudapi.cn") + env.Office365Compliance = Office365ComplianceAPI("https://ps.compliance.protection.outlook.com") + env.Office365ExchangeOnline = Office365ExchangeOnlineAPI("https://outlook.office365.com") env.OperationalInsights = OperationalInsightsAPI().WithResourceIdentifier("https://api.loganalytics.azure.cn") env.Postgresql = PostgresqlAPI("postgres.database.chinacloudapi.cn").WithResourceIdentifier("https://ossrdbms-aad.database.chinacloudapi.cn") env.ServiceBus = ServiceBusAPI("https://servicebus.chinacloudapi.cn", "servicebus.chinacloudapi.cn").WithResourceIdentifier("https://servicebus.chinacloudapi.cn") diff --git a/sdk/environments/azure_gov.go b/sdk/environments/azure_gov.go index 2331705e81a..e9c14f49a59 100644 --- a/sdk/environments/azure_gov.go +++ b/sdk/environments/azure_gov.go @@ -29,6 +29,8 @@ func AzureUSGovernment() *Environment { env.ManagedHSM = ManagedHSMAPI("https://managedhsm.usgovcloudapi.net", "managedhsm.usgovcloudapi.net") env.MariaDB = MariaDBAPI("mariadb.database.usgovcloudapi.net").WithResourceIdentifier("https://ossrdbms-aad.database.usgovcloudapi.net") env.MySql = MySqlAPI("mysql.database.usgovcloudapi.net").WithResourceIdentifier("https://ossrdbms-aad.database.usgovcloudapi.net") + env.Office365Compliance = Office365ComplianceAPI("https://ps.compliance.protection.outlook.us") + env.Office365ExchangeOnline = Office365ExchangeOnlineAPI("https://outlook.office365.us") env.OperationalInsights = OperationalInsightsAPI().WithResourceIdentifier("https://api.loganalytics.us") env.Postgresql = PostgresqlAPI("postgres.database.usgovcloudapi.net").WithResourceIdentifier("https://ossrdbms-aad.database.usgovcloudapi.net") env.ServiceBus = ServiceBusAPI("https://servicebus.usgovcloudapi.net", "servicebus.usgovcloudapi.net").WithResourceIdentifier("https://servicebus.usgovcloudapi.net") diff --git a/sdk/environments/azure_public.go b/sdk/environments/azure_public.go index 737fbdb2684..6fc735f4616 100644 --- a/sdk/environments/azure_public.go +++ b/sdk/environments/azure_public.go @@ -33,6 +33,8 @@ func AzurePublic() *Environment { env.ManagedHSM = ManagedHSMAPI("https://managedhsm.azure.net", "managedhsm.azure.net") env.MariaDB = MariaDBAPI("mariadb.database.azure.com").WithResourceIdentifier("https://ossrdbms-aad.database.windows.net") env.MySql = MySqlAPI("mysql.database.azure.com").WithResourceIdentifier("https://ossrdbms-aad.database.windows.net") + env.Office365Compliance = Office365ComplianceAPI("https://ps.compliance.protection.outlook.com") + env.Office365ExchangeOnline = Office365ExchangeOnlineAPI("https://outlook.office365.com") env.OperationalInsights = OperationalInsightsAPI().WithResourceIdentifier("https://api.loganalytics.io") env.Postgresql = PostgresqlAPI("postgres.database.azure.com").WithResourceIdentifier("https://ossrdbms-aad.database.windows.net") env.ServiceBus = ServiceBusAPI("https://servicebus.windows.net", "servicebus.windows.net").WithResourceIdentifier("https://servicebus.azure.net") diff --git a/sdk/environments/base.go b/sdk/environments/base.go index 995f6716368..1cc9fc5fa56 100644 --- a/sdk/environments/base.go +++ b/sdk/environments/base.go @@ -81,6 +81,7 @@ func baseEnvironmentWithName(name string) Environment { MileIqRestService: applicationIdOnly("MileIqRestService", mileIqRestServiceAppId), MixedReality: applicationIdOnly("MixedReality", mixedRealityAppId), MySql: applicationIdOnly("MySql", ossRDBMSAppId), + Office365Compliance: applicationIdOnly("Office365Compliance", office365ComplianceAppId), Office365Connectors: applicationIdOnly("Office365Connectors", office365ConnectorsAppId), Office365Demeter: applicationIdOnly("Office365Demeter", office365DemeterAppId), Office365DwEngineV2: applicationIdOnly("Office365DwEngineV2", office365DwEngineV2AppId), diff --git a/sdk/environments/constants.go b/sdk/environments/constants.go index 486a2b20a46..9177b92a7bf 100644 --- a/sdk/environments/constants.go +++ b/sdk/environments/constants.go @@ -75,6 +75,7 @@ const mileIqAdminCenterAppId = "de096ee1-dae7-4ee1-8dd5-d88ccc473815" const mileIqDashboardAppId = "f7069a8d-9edc-4300-b365-ae53c9627fc4" const mileIqRestServiceAppId = "b692184e-b47f-4706-b352-84b288d2d9ee" const mixedRealityAppId = "c7ddd9b4-5172-4e28-bd29-1e0792947d18" +const office365ComplianceAppId = "00000002-0000-0ff1-ce00-000000000000" const office365ConnectorsAppId = "48af08dc-f6d2-435f-b2a7-069abd99c086" const office365DemeterAppId = "982bda36-4632-4165-a46a-9863b1bbcf7d" const office365DwEngineV2AppId = "441509e5-a165-4363-8ee7-bcf0b7d26739" diff --git a/sdk/environments/environment.go b/sdk/environments/environment.go index 95ee694aa76..1f304b764ee 100644 --- a/sdk/environments/environment.go +++ b/sdk/environments/environment.go @@ -91,6 +91,7 @@ type Environment struct { MySql Api OSSRDBMSPostgreSQLFlexibleServerAadAuthentication Api OSSRDMBS Api + Office365Compliance Api Office365Connectors Api Office365Demeter Api Office365DwEngineV2 Api diff --git a/sdk/environments/helpers.go b/sdk/environments/helpers.go index 64ed4bd111c..1a6cdc70bf8 100644 --- a/sdk/environments/helpers.go +++ b/sdk/environments/helpers.go @@ -158,6 +158,26 @@ func MySqlAPI(domainSuffix string) *ApiEndpoint { } } +func Office365ComplianceAPI(resourceId string) *ApiEndpoint { + // endpoint and resource ID are the same, only the resource ID is returned in metadata + return &ApiEndpoint{ + endpoint: pointer.To(resourceId), + appId: pointer.To(office365ComplianceAppId), + name: "Office365Compliance", + resourceIdentifier: pointer.To(resourceId), + } +} + +func Office365ExchangeOnlineAPI(resourceId string) *ApiEndpoint { + // endpoint and resource ID are the same, only the resource ID is returned in metadata + return &ApiEndpoint{ + endpoint: pointer.To(resourceId), + appId: pointer.To(office365ExchangeOnlineAppId), + name: "Office365ExchangeOnline", + resourceIdentifier: pointer.To(resourceId), + } +} + func OperationalInsightsAPI() *ApiEndpoint { return &ApiEndpoint{ domainSuffix: nil,