/// <summary> /// Gets a list of all the ServiceObjective for a server /// </summary> /// <param name="resourceGroupName">The name of the resource group</param> /// <param name="serverName">The name of the server</param> /// <returns>A list of all the ServiceObjectives</returns> public List <AzureSqlServerServiceObjectiveModel> ListServiceObjectives(string resourceGroupName, string serverName) { var server = ServerCommunicator.Get(resourceGroupName, serverName); var capabilities = CapabilitiesCommunicator.Get(server.Location); return(( from serverVersion in FilterByName(capabilities.SupportedServerVersions, server.Version) from edition in serverVersion.SupportedEditions from serviceObjective in edition.SupportedServiceLevelObjectives select CreateServiceObjectiveModelFromResponse(edition, serviceObjective, resourceGroupName, serverName)).ToList()); }
/// <summary> /// Gets a list of all the ServiceObjective for a location /// </summary> /// <param name="locationName">The name of the location</param> /// <param name="serviceObjectiveNamePattern">The name of the serviceObjective, or null to get all.</param> /// <returns>A list of all the ServiceObjectives</returns> public List <AzureSqlServerServiceObjectiveModel> ListServiceObjectivesByLocation( string locationName, WildcardPattern serviceObjectiveNamePattern) { var capabilities = CapabilitiesCommunicator.Get(locationName); return(( from serverVersion in capabilities.SupportedServerVersions from edition in serverVersion.SupportedEditions from serviceObjective in FilterByName(edition.SupportedServiceLevelObjectives, serviceObjectiveNamePattern) select CreateServiceObjectiveModelFromResponse(edition, serviceObjective)).ToList()); }