static private FromResourceSku ( ResourceSku resourceSku ) : |
||
resourceSku | ResourceSku | |
return |
internal static AzureAnalysisServicesServer FromAnalysisServicesServer(AnalysisServicesServer server) { if (server == null) { return(null); } PsAzureAnalysisServicesFirewallConfig config = null; if (server.IpV4FirewallSettings != null) { List <PsAzureAnalysisServicesFirewallRule> rules = null; bool enablePowerBIService = false; if (server.IpV4FirewallSettings.FirewallRules != null) { rules = new List <PsAzureAnalysisServicesFirewallRule>(); foreach (var rule in server.IpV4FirewallSettings.FirewallRules) { rules.Add(new PsAzureAnalysisServicesFirewallRule(rule.FirewallRuleName, rule.RangeStart, rule.RangeEnd)); } } if (server.IpV4FirewallSettings.EnablePowerBIService != null) { enablePowerBIService = Convert.ToBoolean(server.IpV4FirewallSettings.EnablePowerBIService); } config = new PsAzureAnalysisServicesFirewallConfig(enablePowerBIService, rules); } ResourceIdentifier resourceIdentifier = new ResourceIdentifier(server.Id); return(new AzureAnalysisServicesServer() { AsAdministrators = server.AsAdministrators == null ? new List <string>() : new List <string>(server.AsAdministrators.Members), Location = server.Location, Name = server.Name, Type = server.Type, State = server.State, ProvisioningState = server.ProvisioningState, Id = server.Id, ServerFullName = server.ServerFullName, Sku = server.Sku != null?ServerSku.FromResourceSku(server.Sku) : new ServerSku(), Tag = server.Tags != null ? new Dictionary <string, string>(server.Tags) : new Dictionary <string, string>(), BackupBlobContainerUri = server.BackupBlobContainerUri == null ? String.Empty : server.BackupBlobContainerUri, ResourceGroupName = resourceIdentifier.ResourceGroupName, DefaultConnectionMode = server.QuerypoolConnectionMode.ToString(), FirewallConfig = config, GatewayInfo = server.GatewayDetails != null?ServerGateway.FromResourceGateway(server.GatewayDetails) : null }); }
internal static AzureAnalysisServicesServer FromAnalysisServicesServer(AnalysisServicesServer server) { if (server == null) { return(null); } return(new AzureAnalysisServicesServer() { AsAdministrators = server.AsAdministrators == null ? new List <string>() : new List <string>(server.AsAdministrators.Members), Location = server.Location, Name = server.Name, Type = server.Type, ProvisioningState = server.ProvisioningState, Id = server.Id, Sku = ServerSku.FromResourceSku(server.Sku), Tag = new Dictionary <string, string>(server.Tags) }); }
internal static AzureAnalysisServicesServerDetail FromAnalysisServicesServer(AnalysisServicesServer server) { if (server == null) { return(null); } return(new AzureAnalysisServicesServerDetail() { AsAdministrators = server.AsAdministrators == null ? new List <string>() : new List <string>(server.AsAdministrators.Members), Location = server.Location, Name = server.Name, Type = server.Type, State = server.State, ProvisioningState = server.ProvisioningState, Id = server.Id, ServerFullName = server.ServerFullName, Sku = server.Sku != null?ServerSku.FromResourceSku(server.Sku) : new Dictionary <string, string>(), Tag = server.Tags != null ? new Dictionary <string, string>(server.Tags) : new Dictionary <string, string>(), BackupBlobContainerUri = server.BackupBlobContainerUri == null ? String.Empty : server.BackupBlobContainerUri }); }