Framework/Helpers/SVTMapping.ps1
Set-StrictMode -Version Latest class SVTMapping { static [string] GetResourceTypeEnumItems() { return ([SVTMapping]::Mapping | Where-Object { -not [string]::IsNullOrEmpty($_.ResourceTypeName) } | ForEach-Object { "$($_.ResourceTypeName.Replace(' ', '')) `r`n" } | Sort-Object); } static [ResourceTypeMapping[]] $Mapping = ( [ResourceTypeMapping]@{ ResourceType = "Microsoft.Logic/Workflows"; JsonFileName = "LogicApps.json"; ClassName = "LogicApps"; ResourceTypeName = "LogicApps"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Compute/virtualMachines"; JsonFileName = "VirtualMachine.json"; ClassName = "VirtualMachine"; ResourceTypeName = "VirtualMachine"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.DataLakeStore/accounts"; JsonFileName = "DataLakeStore.json"; ClassName = "DataLakeStore"; ResourceTypeName = "DataLakeStore"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.DataLakeAnalytics/accounts"; JsonFileName = "DataLakeAnalytics.json"; ClassName = "DataLakeAnalytics"; ResourceTypeName = "DataLakeAnalytics"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.KeyVault/vaults"; JsonFileName = "KeyVault.json"; ClassName = "KeyVault"; ResourceTypeName = "KeyVault"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Sql/servers"; JsonFileName = "SQLDatabase.json"; ClassName = "SQLDatabase"; ResourceTypeName = "SQLDatabase"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Web/sites"; JsonFileName = "AppService.json"; ClassName = "AppService"; ResourceTypeName = "AppService"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.DataFactory/dataFactories"; JsonFileName = "DataFactory.json"; ClassName = "DataFactory"; ResourceTypeName = "DataFactory"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Storage/storageAccounts"; JsonFileName = "Storage.json"; ClassName = "Storage"; ResourceTypeName = "StorageAccount"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.NotificationHubs/namespaces/notificationHubs"; JsonFileName = "NotificationHub.json"; ClassName = "NotificationHub"; ResourceTypeName = "NotificationHub"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Cdn/profiles"; JsonFileName = "CDN.json"; ClassName = "CDN"; ResourceTypeName = "CDN"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Network/virtualNetworks"; JsonFileName = "VirtualNetwork.json"; ClassName = "VirtualNetwork"; ResourceTypeName = "VirtualNetwork"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Network/virtualNetworks"; JsonFileName = "ERvNet.json"; ClassName = "ERvNet"; ResourceTypeName = "ERvNet"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.AnalysisServices/servers"; JsonFileName = "AnalysisServices.json"; ClassName = "AnalysisServices"; ResourceTypeName = "AnalysisService"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Search/searchServices"; JsonFileName = "Search.json"; ClassName = "Search"; ResourceTypeName = "Search"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Batch/batchAccounts"; JsonFileName = "Batch.json"; ClassName = "Batch"; ResourceTypeName = "Batch"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.ClassicCompute/domainNames"; JsonFileName = "CloudService.json"; ClassName = "CloudService"; ResourceTypeName = "CloudService"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.ServiceBus/namespaces"; JsonFileName = "ServiceBus.json"; ClassName = "ServiceBus"; ResourceTypeName = "ServiceBus"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Eventhub/namespaces"; JsonFileName = "EventHub.json"; ClassName = "EventHub"; ResourceTypeName = "EventHub"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.Cache/Redis"; JsonFileName = "RedisCache.json"; ClassName = "RedisCache"; ResourceTypeName = "RedisCache"; }, [ResourceTypeMapping]@{ ResourceType = "Microsoft.ServiceFabric/clusters"; JsonFileName = "ServiceFabric.json"; ClassName = "ServiceFabric"; ResourceTypeName = "ServiceFabric"; } ); static [SubscriptionMapping] $SubscriptionMapping =@{ ClassName = "SubscriptionCore"; JsonFileName = "SubscriptionCore.json"; }; } Invoke-Expression "enum ResourceTypeName { `r`n All `r`n $([SVTMapping]::GetResourceTypeEnumItems()) }"; |