private EnvironmentParameters(ARMEnvironment environment, OutputMethod outputMethod, string subscriptionId = null, string userId = null) { this.AADUri = EnvironmentParameters.GetAADUri(environment: environment); this.GraphUri = EnvironmentParameters.GetGraphUri(environment: environment); this.GraphApiVersion = "2013-04-05"; this.ResourceManagerUri = EnvironmentParameters.GetResourceManagerUri(environment: environment); this.ResourceManagerApiVersion = "2014-01-01"; this.ProvidedSubscriptionId = subscriptionId; this.ProvidedUserId = userId; this.OutputMethod = outputMethod; }
private static string GetGraphUri(ARMEnvironment environment) { switch (environment) { case ARMEnvironment.Next: case ARMEnvironment.Current: case ARMEnvironment.Dogfood: return("https://graph.ppe.windows.net"); case ARMEnvironment.Production: return("https://graph.windows.net"); default: throw new ArgumentException(message: string.Format("Unknown environment: '{0}'", environment)); } }
private static string GetResourceManagerUri(ARMEnvironment environment) { switch (environment) { case ARMEnvironment.Next: return("https://api-next.resources.windows-int.net"); case ARMEnvironment.Current: return("https://api-current.resources.windows-int.net"); case ARMEnvironment.Dogfood: return("https://api-dogfood.resources.windows-int.net"); case ARMEnvironment.Production: return("https://management.azure.com"); default: throw new ArgumentException(message: string.Format("Unknown environment: '{0}'", environment)); } }